|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object polyglot.ext.jl.types.TypeObject_c polyglot.ext.jl.types.Type_c polyglot.ext.jl.types.ReferenceType_c polyglot.ext.jl.types.ClassType_c polyglot.ext.jl.types.ParsedClassType_c
public class ParsedClassType_c
ParsedClassType Overview: A ParsedClassType represents a information that has been parsed (but not necessarily type checked) from a .java file.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface polyglot.types.ClassType |
---|
ClassType.Kind |
Field Summary | |
---|---|
protected java.util.List |
constructors
|
protected java.util.List |
fields
|
protected Flags |
flags
|
protected Source |
fromSource
|
protected LazyClassInitializer |
init
|
protected boolean |
inStaticContext
Was the class declared in a static context? |
protected java.util.List |
interfaces
|
protected ClassType.Kind |
kind
|
protected java.util.List |
memberClasses
|
protected java.util.List |
methods
|
protected java.lang.String |
name
|
protected ClassType |
outer
|
protected Package |
package_
|
protected Type |
superType
|
Fields inherited from class polyglot.ext.jl.types.TypeObject_c |
---|
position, ts |
Fields inherited from interface polyglot.types.ClassType |
---|
ANONYMOUS, LOCAL, MEMBER, TOP_LEVEL |
Constructor Summary | |
---|---|
protected |
ParsedClassType_c()
|
|
ParsedClassType_c(TypeSystem ts,
LazyClassInitializer init,
Source fromSource)
|
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. |
java.util.List |
constructors()
Return a mutable list of constructors |
java.util.List |
fields()
Return a mutable list of fields |
Flags |
flags()
Get the class's flags. |
void |
flags(Flags flags)
Set the flags of the class. |
protected void |
freeInit()
Free the initializer object if we no longer need it. |
Source |
fromSource()
The Source that this class type
was loaded from. |
protected boolean |
initialized()
Return true if we no longer need the initializer object. |
boolean |
inStaticContext()
Return true if the class declaration occurs in a static context. |
void |
inStaticContext(boolean inStaticContext)
Set whether the class was declared in a static context. |
java.util.List |
interfaces()
Return a mutable list of interfaces |
ClassType.Kind |
kind()
Get the class's kind. |
void |
kind(ClassType.Kind kind)
Set the class's kind. |
java.util.List |
memberClasses()
Return a mutable list of member classes |
java.util.List |
methods()
Return a mutable list of methods |
java.lang.String |
name()
Get the short name of the class, if possible. |
void |
name(java.lang.String name)
Set the name of the class. |
ClassType |
outer()
Get the class's outer class, or null if a top-level class. |
void |
outer(ClassType outer)
Set the class's outer class. |
Package |
package_()
Get the class's package. |
void |
package_(Package p)
Set the class's package. |
void |
position(Position pos)
Position of the type's declaration. |
Type |
superType()
Get the class's super type. |
void |
superType(Type t)
Set the class's super type. |
Methods inherited from class polyglot.ext.jl.types.ClassType_c |
---|
container, descendsFromImpl, fieldNamed, fullName, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isCanonical, isCastValidImpl, isClass, isEnclosed, isEnclosedImpl, isImplicitCastValidImpl, isInner, isInnerClass, isLocal, isMember, isNested, isThrowable, isTopLevel, isUncheckedException, memberClassNamed, toClass, toString, translate |
Methods inherited from class polyglot.ext.jl.types.ReferenceType_c |
---|
hasMethod, hasMethodImpl, isReference, methods, methodsNamed, toReference |
Methods inherited from class polyglot.ext.jl.types.Type_c |
---|
arrayOf, arrayOf, descendsFrom, isArray, isBoolean, isByte, isCastValid, isChar, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPackage, isPrimitive, isShort, isSubtype, isSubtypeImpl, isType, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toNull, toPackage, toPrimitive, toType |
Methods inherited from class polyglot.ext.jl.types.TypeObject_c |
---|
copy, equals, equalsImpl, hashCode, position, typeSystem |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.types.ClassType |
---|
fieldNamed, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isEnclosed, isEnclosedImpl, isInner, isInnerClass, isLocal, isMember, isNested, isTopLevel, memberClassNamed |
Methods inherited from interface polyglot.types.Named |
---|
fullName |
Methods inherited from interface polyglot.types.ReferenceType |
---|
hasMethod, hasMethodImpl, methods, methodsNamed |
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 |
Field Detail |
---|
protected transient LazyClassInitializer init
protected transient Source fromSource
protected Type superType
protected java.util.List interfaces
protected java.util.List methods
protected java.util.List fields
protected java.util.List constructors
protected java.util.List memberClasses
protected Package package_
protected Flags flags
protected ClassType.Kind kind
protected java.lang.String name
protected ClassType outer
protected boolean inStaticContext
Constructor Detail |
---|
protected ParsedClassType_c()
public ParsedClassType_c(TypeSystem ts, LazyClassInitializer init, Source fromSource)
Method Detail |
---|
public Source fromSource()
ParsedClassType
Source
that this class type
was loaded from. Should be null
if it was not loaded from
a Source
during this compilation.
fromSource
in interface ParsedClassType
public ClassType.Kind kind()
ClassType_c
kind
in interface ClassType
kind
in class ClassType_c
public void inStaticContext(boolean inStaticContext)
ParsedClassType
inStaticContext
in interface ParsedClassType
public boolean inStaticContext()
ClassType
inStaticContext
in interface ClassType
public ClassType outer()
ClassType_c
outer
in interface ClassType
outer
in class ClassType_c
public java.lang.String name()
ClassType_c
name
in interface Named
name
in class ClassType_c
public Type superType()
superType
in interface ReferenceType
superType
in class ClassType_c
public Package package_()
package_
in interface Importable
package_
in class ClassType_c
public Flags flags()
flags
in interface MemberInstance
flags
in class ClassType_c
protected boolean initialized()
protected void freeInit()
public void flags(Flags flags)
ParsedClassType
flags
in interface ParsedClassType
public void kind(ClassType.Kind kind)
ParsedClassType
kind
in interface ParsedClassType
public void outer(ClassType outer)
ParsedClassType
outer
in interface ParsedClassType
public void name(java.lang.String name)
ParsedClassType
InternalCompilerError
if called on an anonymous class.
name
in interface ParsedClassType
public void position(Position pos)
ParsedClassType
position
in interface ParsedClassType
public void package_(Package p)
ParsedClassType
package_
in interface ParsedClassType
public void superType(Type t)
ParsedClassType
superType
in interface ParsedClassType
public void addInterface(Type t)
ParsedClassType
addInterface
in interface ParsedClassType
public void addMethod(MethodInstance mi)
ParsedClassType
addMethod
in interface ParsedClassType
public void addConstructor(ConstructorInstance ci)
ParsedClassType
addConstructor
in interface ParsedClassType
public void addField(FieldInstance fi)
ParsedClassType
addField
in interface ParsedClassType
public void addMemberClass(ClassType t)
ParsedClassType
addMemberClass
in interface ParsedClassType
public java.util.List constructors()
constructors
in interface ClassType
constructors
in class ClassType_c
ConstructorInstance
public java.util.List memberClasses()
memberClasses
in interface ClassType
memberClasses
in class ClassType_c
ClassType
public java.util.List methods()
methods
in interface ReferenceType
methods
in class ClassType_c
MethodInstance
.MethodInstance
public java.util.List fields()
fields
in interface ReferenceType
fields
in class ClassType_c
FieldInstance
.FieldInstance
public java.util.List interfaces()
interfaces
in interface ReferenceType
interfaces
in class ClassType_c
Type
.Type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |