|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.types.TypeObject_c
polyglot.types.Type_c
polyglot.types.ReferenceType_c
polyglot.types.ClassType_c
polyglot.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 Job |
job
|
protected ClassType.Kind |
kind
|
protected java.util.List |
memberClasses
|
protected boolean |
membersAdded
|
protected java.util.List |
methods
|
protected java.lang.String |
name
|
protected boolean |
needSerialization
Wether we need to serialize this class. |
protected ClassType |
outer
|
protected Package |
package_
|
protected boolean |
signaturesResolved
|
protected Type |
superType
|
protected boolean |
supertypesResolved
|
| Fields inherited from class polyglot.types.ClassType_c |
|---|
decl, memberCache |
| Fields inherited from class polyglot.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 an immutable list of constructors |
boolean |
defaultConstructorNeeded()
|
FieldInstance |
fieldNamed(java.lang.String name)
Get a field of the class by name. |
java.util.List |
fields()
Return an immutable list of fields |
Flags |
flags()
Get the class's flags. |
void |
flags(Flags flags)
Set the flags of the class. |
Source |
fromSource()
The Source that this class type
was loaded from. |
LazyClassInitializer |
init()
|
LazyInitializer |
initializer()
|
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 an immutable list of interfaces |
Job |
job()
Get the job (i.e., compilation unit) associated with this class; or null. |
ClassType.Kind |
kind()
Get the class's kind. |
void |
kind(ClassType.Kind kind)
Set the class's kind. |
java.util.List |
memberClasses()
Return an immutable list of member classes |
boolean |
membersAdded()
|
java.util.List |
methods()
Return an immutable list of methods. |
java.util.List |
methodsNamed(java.lang.String name)
Return a list of all methods with the given name. |
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. |
boolean |
needSerialization()
|
void |
needSerialization(boolean b)
|
int |
numSignaturesUnresolved()
|
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. |
void |
setConstructors(java.util.List l)
Set the class's constructors. |
void |
setContainer(ReferenceType container)
Destructively set the member's container. |
void |
setFields(java.util.List l)
Set the class's fields. |
void |
setFlags(Flags flags)
Destructively set the member's flags. |
void |
setInit(LazyClassInitializer init)
|
void |
setInitializer(LazyInitializer init)
|
void |
setInterfaces(java.util.List l)
Set the class's interfaces. |
void |
setJob(Job job)
|
void |
setMemberClasses(java.util.List l)
Set the class's member classes. |
void |
setMembersAdded(boolean membersAdded)
|
void |
setMethods(java.util.List l)
Set the class's methods. |
void |
setSignaturesResolved(boolean signaturesDisambiguated)
|
void |
setSupertypesResolved(boolean supertypesResolved)
|
boolean |
signaturesResolved()
|
Type |
superType()
Get the class's super type. |
void |
superType(Type t)
Set the class's super type. |
boolean |
supertypesResolved()
|
java.lang.String |
toString()
Yields a string representing this type. |
| Methods inherited from class polyglot.types.ClassType_c |
|---|
container, copy, declaration, descendsFromImpl, fullName, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isCanonical, isCastValidImpl, isClass, isEnclosed, isEnclosedImpl, isImplicitCastValidImpl, isInner, isInnerClass, isLocal, isMember, isNested, isThrowable, isTopLevel, isUncheckedException, memberClassNamed, members, print, resolver, setDeclaration, toClass, translate |
| Methods inherited from class polyglot.types.ReferenceType_c |
|---|
hasMethod, hasMethodImpl, isReference, methods, toReference |
| Methods inherited from class polyglot.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, typeEquals, typeEqualsImpl |
| Methods inherited from class polyglot.types.TypeObject_c |
|---|
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 |
|---|
hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isEnclosed, isEnclosedImpl, isInner, isInnerClass, isLocal, isMember, isNested, isTopLevel, memberClassNamed, resolver |
| Methods inherited from interface polyglot.types.Named |
|---|
fullName |
| Methods inherited from interface polyglot.types.ReferenceType |
|---|
hasMethod, hasMethodImpl, members, methods |
| 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, print, toArray, toClass, toNull, toPrimitive, toReference, translate, typeEquals, typeEqualsImpl |
| Methods inherited from interface polyglot.types.Qualifier |
|---|
isPackage, isType, toPackage, toType |
| Methods inherited from interface polyglot.types.MemberInstance |
|---|
container |
| Methods inherited from interface polyglot.types.Declaration |
|---|
declaration, setDeclaration |
| Field Detail |
|---|
protected transient LazyClassInitializer init
protected transient Source fromSource
protected transient Job job
protected Type superType
protected java.util.List interfaces
protected java.util.List methods
protected java.util.List fields
protected java.util.List constructors
protected Package package_
protected Flags flags
protected ClassType.Kind kind
protected java.lang.String name
protected ClassType outer
protected transient java.util.List memberClasses
protected boolean inStaticContext
protected boolean needSerialization
protected boolean membersAdded
protected boolean supertypesResolved
protected boolean signaturesResolved
| Constructor Detail |
|---|
protected ParsedClassType_c()
public ParsedClassType_c(TypeSystem ts,
LazyClassInitializer init,
Source fromSource)
| Method Detail |
|---|
public LazyClassInitializer init()
public void setInit(LazyClassInitializer init)
public LazyInitializer initializer()
initializer in interface ParsedTypeObjectpublic void setInitializer(LazyInitializer init)
setInitializer in interface ParsedTypeObjectpublic Source fromSource()
ParsedClassTypeSource that this class type
was loaded from. Should be null if it was not loaded from
a Source during this compilation.
fromSource in interface ParsedClassTypepublic Job job()
ParsedTypeObject
job in interface ParsedTypeObjectjob in class ClassType_cpublic void setJob(Job job)
setJob in interface ParsedClassTypepublic ClassType.Kind kind()
ClassType_c
kind in interface ClassTypekind in class ClassType_cpublic void inStaticContext(boolean inStaticContext)
ParsedClassType
inStaticContext in interface ParsedClassTypepublic boolean inStaticContext()
ClassType
inStaticContext in interface ClassTypepublic ClassType outer()
ClassType_c
outer in interface ClassTypeouter in class ClassType_cpublic java.lang.String name()
ClassType_c
name in interface Namedname in class ClassType_cpublic Type superType()
superType in interface ReferenceTypesuperType in class ClassType_cpublic Package package_()
package_ in interface Importablepackage_ in class ClassType_cpublic Flags flags()
flags in interface MemberInstanceflags in class ClassType_cpublic void setFlags(Flags flags)
MemberInstance
setFlags in interface MemberInstancepublic void flags(Flags flags)
ParsedClassType
flags in interface ParsedClassTypepublic void kind(ClassType.Kind kind)
ParsedClassType
kind in interface ParsedClassTypepublic void outer(ClassType outer)
ParsedClassType
outer in interface ParsedClassTypepublic void setContainer(ReferenceType container)
MemberInstance
setContainer in interface MemberInstancepublic void name(java.lang.String name)
ParsedClassTypeInternalCompilerError
if called on an anonymous class.
name in interface ParsedClassTypepublic void position(Position pos)
ParsedClassType
position in interface ParsedClassTypepublic void package_(Package p)
ParsedClassType
package_ in interface ParsedClassTypepublic void superType(Type t)
ParsedClassType
superType in interface ParsedClassTypepublic void addInterface(Type t)
ParsedClassType
addInterface in interface ParsedClassTypepublic void addMethod(MethodInstance mi)
ParsedClassType
addMethod in interface ParsedClassTypepublic void addConstructor(ConstructorInstance ci)
ParsedClassType
addConstructor in interface ParsedClassTypepublic void addField(FieldInstance fi)
ParsedClassType
addField in interface ParsedClassTypepublic void addMemberClass(ClassType t)
ParsedClassType
addMemberClass in interface ParsedClassTypepublic void setInterfaces(java.util.List l)
ParsedClassType
setInterfaces in interface ParsedClassTypepublic void setMethods(java.util.List l)
ParsedClassType
setMethods in interface ParsedClassTypepublic void setFields(java.util.List l)
ParsedClassType
setFields in interface ParsedClassTypepublic void setConstructors(java.util.List l)
ParsedClassType
setConstructors in interface ParsedClassTypepublic void setMemberClasses(java.util.List l)
ParsedClassType
setMemberClasses in interface ParsedClassTypepublic boolean defaultConstructorNeeded()
defaultConstructorNeeded in interface ParsedClassTypepublic java.util.List constructors()
constructors in interface ClassTypeconstructors in class ClassType_cConstructorInstancepublic java.util.List memberClasses()
memberClasses in interface ClassTypememberClasses in class ClassType_cClassTypepublic java.util.List methods()
methods in interface ReferenceTypemethods in class ClassType_cMethodInstance.MethodInstancepublic java.util.List methodsNamed(java.lang.String name)
methodsNamed in interface ReferenceTypemethodsNamed in class ReferenceType_cname - Name of the method to search for.
MethodInstance.MethodInstancepublic java.util.List fields()
fields in interface ReferenceTypefields in class ClassType_cFieldInstance.FieldInstancepublic FieldInstance fieldNamed(java.lang.String name)
fieldNamed in interface ClassTypefieldNamed in interface ReferenceTypefieldNamed in class ClassType_cpublic java.util.List interfaces()
interfaces in interface ReferenceTypeinterfaces in class ClassType_cType.Typepublic boolean membersAdded()
membersAdded in interface ParsedClassTypepublic void setMembersAdded(boolean membersAdded)
setMembersAdded in interface ParsedClassTypemembersAdded - The membersAdded to set.public void setSignaturesResolved(boolean signaturesDisambiguated)
setSignaturesResolved in interface ParsedClassTypesignaturesDisambiguated - The signaturesDisambiguated to set.public boolean supertypesResolved()
supertypesResolved in interface ParsedClassTypepublic void setSupertypesResolved(boolean supertypesResolved)
setSupertypesResolved in interface ParsedClassTypesupertypesResolved - The supertypesResolved to set.public int numSignaturesUnresolved()
numSignaturesUnresolved in interface ParsedClassTypepublic boolean signaturesResolved()
signaturesResolved in interface ParsedClassTypepublic java.lang.String toString()
Type_c
toString in interface TypetoString in class ClassType_cpublic void needSerialization(boolean b)
needSerialization in interface ParsedClassTypepublic boolean needSerialization()
needSerialization in interface ParsedClassType
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||