|
|||||||||
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 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 Type |
superType
|
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
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 ParsedTypeObject
public void setInitializer(LazyInitializer init)
setInitializer
in interface ParsedTypeObject
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 Job job()
ParsedTypeObject
job
in interface ParsedTypeObject
job
in class ClassType_c
public void setJob(Job job)
setJob
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
public void setFlags(Flags flags)
MemberInstance
setFlags
in interface MemberInstance
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 setContainer(ReferenceType container)
MemberInstance
setContainer
in interface MemberInstance
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 void setInterfaces(java.util.List l)
ParsedClassType
setInterfaces
in interface ParsedClassType
public void setMethods(java.util.List l)
ParsedClassType
setMethods
in interface ParsedClassType
public void setFields(java.util.List l)
ParsedClassType
setFields
in interface ParsedClassType
public void setConstructors(java.util.List l)
ParsedClassType
setConstructors
in interface ParsedClassType
public void setMemberClasses(java.util.List l)
ParsedClassType
setMemberClasses
in interface ParsedClassType
public boolean defaultConstructorNeeded()
defaultConstructorNeeded
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 methodsNamed(java.lang.String name)
methodsNamed
in interface ReferenceType
methodsNamed
in class ReferenceType_c
name
- Name of the method to search for.
MethodInstance
.MethodInstance
public java.util.List fields()
fields
in interface ReferenceType
fields
in class ClassType_c
FieldInstance
.FieldInstance
public FieldInstance fieldNamed(java.lang.String name)
fieldNamed
in interface ClassType
fieldNamed
in interface ReferenceType
fieldNamed
in class ClassType_c
public java.util.List interfaces()
interfaces
in interface ReferenceType
interfaces
in class ClassType_c
Type
.Type
public boolean membersAdded()
membersAdded
in interface ParsedClassType
public void setMembersAdded(boolean membersAdded)
setMembersAdded
in interface ParsedClassType
membersAdded
- The membersAdded to set.public void setSignaturesResolved(boolean signaturesDisambiguated)
setSignaturesResolved
in interface ParsedClassType
signaturesDisambiguated
- The signaturesDisambiguated to set.public boolean supertypesResolved()
supertypesResolved
in interface ParsedClassType
public void setSupertypesResolved(boolean supertypesResolved)
setSupertypesResolved
in interface ParsedClassType
supertypesResolved
- The supertypesResolved to set.public int numSignaturesUnresolved()
numSignaturesUnresolved
in interface ParsedClassType
public boolean signaturesResolved()
signaturesResolved
in interface ParsedClassType
public java.lang.String toString()
Type_c
toString
in interface Type
toString
in class ClassType_c
public void needSerialization(boolean b)
needSerialization
in interface ParsedClassType
public boolean needSerialization()
needSerialization
in interface ParsedClassType
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |