polyglot.types
Interface ParsedClassType

All Superinterfaces:
ClassType, java.lang.Cloneable, Copy, Importable, MemberInstance, Named, Qualifier, ReferenceType, java.io.Serializable, Type, TypeObject
All Known Subinterfaces:
CofferParsedClassType
All Known Implementing Classes:
CofferParsedClassType_c, ParsedClassType_c

public interface ParsedClassType
extends ClassType

A ParsedClassType represents a class loaded from a source file. ParsedClassTypes 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

position

public void position(Position pos)
Position of the type's declaration.


fromSource

public Source fromSource()
The Source that this class type was loaded from. Should be null if it was not loaded from a Source during this compilation.


package_

public void package_(Package p)
Set the class's package.


superType

public void superType(Type t)
Set the class's super type.


addInterface

public void addInterface(Type t)
Add an interface to the class.


addField

public void addField(FieldInstance fi)
Add a field to the class.


addMethod

public void addMethod(MethodInstance mi)
Add a method to the class.


addConstructor

public void addConstructor(ConstructorInstance ci)
Add a constructor to the class.


addMemberClass

public void addMemberClass(ClassType t)
Add a member class to the class.


flags

public void flags(Flags flags)
Set the flags of the class.


outer

public void outer(ClassType t)
Set the class's outer class.


name

public void name(java.lang.String name)
Set the name of the class. Throws InternalCompilerError if called on an anonymous class.


kind

public void kind(ClassType.Kind kind)
Set the class's kind.


inStaticContext

public void inStaticContext(boolean inStaticContext)
Set whether the class was declared in a static context.