public class ParsedClassType_c extends ClassType_c implements ParsedClassType
ClassType.Kind
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ConstructorInstance> |
constructors |
protected java.util.List<FieldInstance> |
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<ReferenceType> |
interfaces |
protected Job |
job |
protected ClassType.Kind |
kind |
protected java.util.List<ClassType> |
memberClasses |
protected boolean |
membersAdded |
protected java.util.List<MethodInstance> |
methods |
protected java.lang.String |
name |
protected boolean |
needSerialization
Whether we need to serialize this class.
|
protected ClassType |
outer |
protected Package |
package_ |
protected boolean |
signaturesResolved |
protected Type |
superType |
protected boolean |
supertypesResolved |
decl, memberCache
position, ts
Modifier | Constructor and Description |
---|---|
protected |
ParsedClassType_c() |
|
ParsedClassType_c(TypeSystem ts,
LazyClassInitializer init,
Source fromSource) |
Modifier and Type | Method and Description |
---|---|
void |
addConstructor(ConstructorInstance ci)
Add a constructor to the class.
|
void |
addField(FieldInstance fi)
Add a field to the class.
|
void |
addInterface(ReferenceType 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<? extends ConstructorInstance> |
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<? extends FieldInstance> |
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<? extends ReferenceType> |
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: top-level, member, local, or anonymous.
|
void |
kind(ClassType.Kind kind)
Set the class's kind.
|
java.util.List<? extends ClassType> |
memberClasses()
Return an immutable list of member classes
|
boolean |
membersAdded() |
java.util.List<? extends MethodInstance> |
methods()
Return an immutable list of methods.
|
java.util.List<? extends MethodInstance> |
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()
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<? extends ConstructorInstance> l)
Set the class's constructors.
|
void |
setContainer(ReferenceType container)
Destructively set the member's container.
|
void |
setFields(java.util.List<? extends FieldInstance> 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<? extends ReferenceType> l)
Set the class's interfaces.
|
void |
setJob(Job job) |
void |
setMemberClasses(java.util.List<? extends ClassType> l)
Set the class's member classes.
|
void |
setMembersAdded(boolean membersAdded) |
void |
setMethods(java.util.List<? extends MethodInstance> 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.
|
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
hasMethod, hasMethodImpl, isReference, methods, toReference
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
equals, equalsImpl, hashCode, position, typeSystem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isEnclosed, isEnclosedImpl, isInner, isInnerClass, isLocal, isMember, isNested, isTopLevel, memberClassNamed, resolver
hasMethod, hasMethodImpl, members, methods
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
equalsImpl, isCanonical, position, typeSystem
container
declaration, setDeclaration
protected transient LazyClassInitializer init
protected transient Source fromSource
protected transient Job job
protected Type superType
protected java.util.List<ReferenceType> interfaces
protected java.util.List<MethodInstance> methods
protected java.util.List<FieldInstance> fields
protected java.util.List<ConstructorInstance> constructors
protected Package package_
protected Flags flags
protected ClassType.Kind kind
protected java.lang.String name
protected ClassType outer
protected transient java.util.List<ClassType> memberClasses
protected boolean inStaticContext
protected boolean needSerialization
protected boolean membersAdded
protected boolean supertypesResolved
protected boolean signaturesResolved
protected ParsedClassType_c()
public ParsedClassType_c(TypeSystem ts, LazyClassInitializer init, Source fromSource)
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
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
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
flags
- the flags to setpublic 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
container
- the container to setpublic 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(ReferenceType 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<? extends ReferenceType> l)
ParsedClassType
setInterfaces
in interface ParsedClassType
public void setMethods(java.util.List<? extends MethodInstance> l)
ParsedClassType
setMethods
in interface ParsedClassType
public void setFields(java.util.List<? extends FieldInstance> l)
ParsedClassType
setFields
in interface ParsedClassType
public void setConstructors(java.util.List<? extends ConstructorInstance> l)
ParsedClassType
setConstructors
in interface ParsedClassType
public void setMemberClasses(java.util.List<? extends ClassType> l)
ParsedClassType
setMemberClasses
in interface ParsedClassType
public boolean defaultConstructorNeeded()
defaultConstructorNeeded
in interface ParsedClassType
public java.util.List<? extends ConstructorInstance> constructors()
constructors
in interface ClassType
constructors
in class ClassType_c
ConstructorInstance
public java.util.List<? extends ClassType> memberClasses()
memberClasses
in interface ClassType
memberClasses
in class ClassType_c
ClassType
public java.util.List<? extends MethodInstance> methods()
methods
in interface ReferenceType
methods
in class ClassType_c
MethodInstance
.MethodInstance
public java.util.List<? extends MethodInstance> 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<? extends FieldInstance> 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<? extends ReferenceType> 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
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