|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ParsedClassType
represents a class loaded from a source file.
ParsedClassType
s are mutable.
Nested Class Summary |
Nested classes inherited from class polyglot.types.ClassType |
ClassType.Kind |
Field Summary |
Fields inherited from interface polyglot.types.ClassType |
ANONYMOUS, LOCAL, MEMBER, TOP_LEVEL |
Method Summary | |
void |
addConstructor(ConstructorInstance ci)
Add a constructor to the class. |
void |
addField(FieldInstance fi)
Add a field to the class. |
void |
addInterface(Type t)
Add an interface to the class. |
void |
addMemberClass(ClassType t)
Add a member class to the class. |
void |
addMethod(MethodInstance mi)
Add a method to the class. |
void |
flags(Flags flags)
Set the flags of the class. |
Source |
fromSource()
The Source that this class type
was loaded from. |
void |
inStaticContext(boolean inStaticContext)
Set whether the class was declared in a static context. |
void |
kind(ClassType.Kind kind)
Set the class's kind. |
void |
name(java.lang.String name)
Set the name of the class. |
void |
outer(ClassType t)
Set the class's outer class. |
void |
package_(Package p)
Set the class's package. |
void |
position(Position pos)
Position of the type's declaration. |
void |
superType(Type t)
Set the class's super type. |
Methods inherited from interface polyglot.types.ClassType |
constructors, fieldNamed, hasEnclosingInstance, hasEnclosingInstanceImpl, inStaticContext, isAnonymous, isEnclosed, isEnclosedImpl, isInner, isInnerClass, isLocal, isMember, isNested, isTopLevel, kind, memberClasses, memberClassNamed, outer |
Methods inherited from interface polyglot.types.Importable |
package_ |
Methods inherited from interface polyglot.types.Named |
fullName, name |
Methods inherited from interface polyglot.types.TypeObject |
equalsImpl, isCanonical, position, typeSystem |
Methods inherited from interface polyglot.util.Copy |
copy |
Methods inherited from interface polyglot.types.ReferenceType |
fields, hasMethod, hasMethodImpl, interfaces, methods, methods, methodsNamed, superType |
Methods inherited from interface polyglot.types.Type |
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isArray, isBoolean, isByte, isCastValid, isCastValidImpl, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isImplicitCastValidImpl, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toClass, toNull, toPrimitive, toReference, toString, translate |
Methods inherited from interface polyglot.types.Qualifier |
isPackage, isType, toPackage, toType |
Methods inherited from interface polyglot.types.MemberInstance |
container, flags |
Method Detail |
public void position(Position pos)
public Source fromSource()
Source
that this class type
was loaded from. Should be null
if it was not loaded from
a Source
during this compilation.
public void package_(Package p)
public void superType(Type t)
public void addInterface(Type t)
public void addField(FieldInstance fi)
public void addMethod(MethodInstance mi)
public void addConstructor(ConstructorInstance ci)
public void addMemberClass(ClassType t)
public void flags(Flags flags)
public void outer(ClassType t)
public void name(java.lang.String name)
InternalCompilerError
if called on an anonymous class.
public void kind(ClassType.Kind kind)
public void inStaticContext(boolean inStaticContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |