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, PaoParsedClassType_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/interfaces inherited from interface 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.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

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


fromSource

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_

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


superType

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


addInterface

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


addField

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


addMethod

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


addConstructor

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


addMemberClass

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


flags

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


outer

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


name

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


kind

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


inStaticContext

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