polyglot.ext.coffer.types
Class CofferTypeSystem_c
java.lang.Object
polyglot.types.TypeSystem_c
polyglot.ext.param.types.ParamTypeSystem_c
polyglot.ext.coffer.types.CofferTypeSystem_c
- All Implemented Interfaces:
- CofferTypeSystem, ParamTypeSystem, TypeSystem
public class CofferTypeSystem_c
- extends ParamTypeSystem_c
- implements CofferTypeSystem
Fields inherited from class polyglot.types.TypeSystem_c |
ABSTRACT_METHOD_FLAGS, ACCESS_FLAGS, BOOLEAN_, BYTE_, CHAR_, CLASS_, CONSTRUCTOR_FLAGS, DOUBLE_, extInfo, FIELD_FLAGS, flagsForName, FLOAT_, INITIALIZER_FLAGS, INT_, INTERFACE_FLAGS, loadedResolver, LOCAL_CLASS_FLAGS, LOCAL_FLAGS, LONG_, MEMBER_CLASS_FLAGS, METHOD_FLAGS, NULL_, OBJECT_, SHORT_, STRING_, systemResolver, THROWABLE_, TOP_LEVEL_CLASS_FLAGS, unknownPackage, unknownQualifier, unknownType, VOID_ |
Method Summary |
boolean |
canOverride(MethodInstance mi,
MethodInstance mj)
Return true if mi can override mj . |
CofferConstructorInstance |
cofferConstructorInstance(Position pos,
ClassType container,
Flags flags,
java.util.List argTypes,
KeySet entryKeys,
KeySet returnKeys,
java.util.List throwConstraints)
|
CofferMethodInstance |
cofferMethodInstance(Position pos,
ReferenceType container,
Flags flags,
Type returnType,
java.lang.String name,
java.util.List argTypes,
KeySet entryKeys,
KeySet returnKeys,
java.util.List throwConstraints)
|
ConstructorInstance |
constructorInstance(Position pos,
ClassType container,
Flags flags,
java.util.List argTypes,
java.util.List excTypes)
Create a constructor instance. |
ParsedClassType |
createClassType(LazyClassInitializer init,
Source fromSource)
Create a new empty class. |
Context |
createContext()
Create a new context object for looking up variables, types, etc. |
KeySet |
emptyKeySet(Position pos)
|
protected void |
initTypes()
|
InstKey |
instKey(Position pos,
java.lang.String name)
|
MethodInstance |
methodInstance(Position pos,
ReferenceType container,
Flags flags,
Type returnType,
java.lang.String name,
java.util.List argTypes,
java.util.List excTypes)
Create a method instance. |
ParamKey |
paramKey(Position pos,
java.lang.String name)
|
Subst |
subst(java.util.Map substMap,
java.util.Map cache)
Create a substitutor. |
ThrowConstraint |
throwConstraint(Position pos,
Type type,
KeySet keys)
|
java.util.Collection |
uncheckedExceptions()
Returns a list of the Throwable types that need not be declared
in method and constructor signatures. |
UnknownKey |
unknownKey(Position pos,
java.lang.String name)
|
Methods inherited from class polyglot.types.TypeSystem_c |
Abstract, abstractSuperInterfaces, accessibleFromPackage, ArithmeticException, arrayOf, arrayOf, arrayOf, arrayOf, ArrayStoreException, arrayType, assert_, assert_, Boolean, Byte, callValid, canCoerceToString, Char, checkAccessFlags, checkClassConformance, checkConstructorFlags, checkCycles, checkCycles, checkFieldFlags, checkInitializerFlags, checkLocalClassFlags, checkLocalFlags, checkMemberClassFlags, checkMethodFlags, checkOverride, checkTopLevelClassFlags, Class, classAccessible, classAccessible, classAccessibleFromPackage, ClassCastException, classContextResolver, classContextResolver, Cloneable, createClassContextResolver, createClassType, createClassType, createClassType, createNewFlag, createNull, createPackage, createPackage, createPackageContextResolver, createPrimitive, defaultClassInitializer, defaultConstructor, defaultPackageImports, descendsFrom, deserializedClassInitializer, Double, equals, Error, Exception, extensionInfo, fieldInstance, Final, findAcceptableConstructors, findAcceptableMethods, findConstructor, findConstructor, findField, findField, findField, findFields, findImplementingMethod, findMemberClass, findMemberClass, findMemberClass, findMethod, findMethod, findMostSpecificProcedures, findProcedure, flagsForBits, flagsForName, Float, forName, getTransformedClassName, getTypeEncoderRootSet, hasEnclosingInstance, hasFormals, hasMethod, hasMethodNamed, implemented, importTable, importTable, initEnums, initFlags, initialize, initializerInstance, Int, Interface, interfaces, isAccessible, isAccessible, isCanonical, isCastValid, isEnclosed, isImplicitCastValid, isSameMethod, isSubtype, isThrowable, isUncheckedException, leastCommonAncestor, legalAbstractMethodFlags, legalAccessFlags, legalConstructorFlags, legalFieldFlags, legalInitializerFlags, legalInterfaceFlags, legalLocalClassFlags, legalLocalFlags, legalMemberClassFlags, legalMethodFlags, legalTopLevelClassFlags, listToString, load, loadedResolver, localInstance, Long, methodCallValid, moreSpecific, Native, NoFlags, Null, NullPointerException, numericConversionValid, numericConversionValid, Object, OutOfBoundsException, overrides, packageContextResolver, packageContextResolver, packageContextResolver, packageEquals, packageExists, packageForName, packageForName, parsedResolver, placeHolder, placeHolder, primitiveForName, Private, promote, promote, promoteNumeric, promoteNumeric, Protected, Public, restoreSystemResolver, RuntimeException, saveSystemResolver, Serializable, Short, Static, staticTarget, StrictFP, String, superType, Synchronized, systemResolver, Throwable, throwsSubset, toString, Transient, translateArray, translateClass, translatePackage, translatePrimitive, typeEquals, typeForClass, typeForName, unknownPackage, unknownQualifier, unknownType, Void, Volatile, wrapperTypeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.types.TypeSystem |
Abstract, ArithmeticException, arrayOf, arrayOf, arrayOf, arrayOf, ArrayStoreException, Boolean, Byte, callValid, canCoerceToString, Char, checkAccessFlags, checkClassConformance, checkConstructorFlags, checkCycles, checkFieldFlags, checkInitializerFlags, checkLocalClassFlags, checkLocalFlags, checkMemberClassFlags, checkMethodFlags, checkOverride, checkTopLevelClassFlags, Class, classAccessible, classAccessible, classAccessibleFromPackage, ClassCastException, classContextResolver, classContextResolver, Cloneable, createClassContextResolver, createClassType, createClassType, createClassType, createNewFlag, createPackage, createPackage, createPackageContextResolver, defaultClassInitializer, defaultConstructor, defaultPackageImports, descendsFrom, deserializedClassInitializer, Double, equals, Error, Exception, extensionInfo, fieldInstance, Final, findConstructor, findConstructor, findField, findField, findField, findImplementingMethod, findMemberClass, findMemberClass, findMemberClass, findMethod, findMethod, flagsForBits, Float, forName, getTransformedClassName, getTypeEncoderRootSet, hasEnclosingInstance, hasFormals, hasMethod, hasMethodNamed, implemented, importTable, importTable, initialize, initializerInstance, Int, Interface, interfaces, isAccessible, isAccessible, isCanonical, isCastValid, isEnclosed, isImplicitCastValid, isSameMethod, isSubtype, isThrowable, isUncheckedException, leastCommonAncestor, legalAbstractMethodFlags, legalAccessFlags, legalConstructorFlags, legalFieldFlags, legalInitializerFlags, legalInterfaceFlags, legalLocalClassFlags, legalLocalFlags, legalMemberClassFlags, legalMethodFlags, legalTopLevelClassFlags, loadedResolver, localInstance, Long, methodCallValid, moreSpecific, Native, NoFlags, Null, NullPointerException, numericConversionValid, numericConversionValid, Object, OutOfBoundsException, overrides, packageContextResolver, packageContextResolver, packageContextResolver, packageEquals, packageExists, packageForName, packageForName, parsedResolver, placeHolder, placeHolder, primitiveForName, Private, promote, promote, Protected, Public, restoreSystemResolver, RuntimeException, saveSystemResolver, Serializable, Short, Static, staticTarget, StrictFP, String, superType, Synchronized, systemResolver, Throwable, throwsSubset, Transient, translateArray, translateClass, translatePackage, translatePrimitive, typeEquals, typeForName, unknownPackage, unknownQualifier, unknownType, Void, Volatile, wrapperTypeString |
CofferTypeSystem_c
public CofferTypeSystem_c()
initTypes
protected void initTypes()
- Overrides:
initTypes
in class TypeSystem_c
createClassType
public ParsedClassType createClassType(LazyClassInitializer init,
Source fromSource)
- Description copied from interface:
TypeSystem
- Create a new empty class.
- Specified by:
createClassType
in interface TypeSystem
- Overrides:
createClassType
in class TypeSystem_c
methodInstance
public MethodInstance methodInstance(Position pos,
ReferenceType container,
Flags flags,
Type returnType,
java.lang.String name,
java.util.List argTypes,
java.util.List excTypes)
- Description copied from interface:
TypeSystem
- Create a method instance.
- Specified by:
methodInstance
in interface TypeSystem
- Overrides:
methodInstance
in class TypeSystem_c
- Parameters:
pos
- Position of the method.container
- Containing type of the method.flags
- The method's flags.returnType
- The method's return type.name
- The method's name.argTypes
- The method's formal parameter types.excTypes
- The method's exception throw types.
cofferMethodInstance
public CofferMethodInstance cofferMethodInstance(Position pos,
ReferenceType container,
Flags flags,
Type returnType,
java.lang.String name,
java.util.List argTypes,
KeySet entryKeys,
KeySet returnKeys,
java.util.List throwConstraints)
- Specified by:
cofferMethodInstance
in interface CofferTypeSystem
constructorInstance
public ConstructorInstance constructorInstance(Position pos,
ClassType container,
Flags flags,
java.util.List argTypes,
java.util.List excTypes)
- Description copied from interface:
TypeSystem
- Create a constructor instance.
- Specified by:
constructorInstance
in interface TypeSystem
- Overrides:
constructorInstance
in class TypeSystem_c
- Parameters:
pos
- Position of the constructor.container
- Containing class of the constructor.flags
- The constructor's flags.argTypes
- The constructor's formal parameter types.excTypes
- The constructor's exception throw types.
cofferConstructorInstance
public CofferConstructorInstance cofferConstructorInstance(Position pos,
ClassType container,
Flags flags,
java.util.List argTypes,
KeySet entryKeys,
KeySet returnKeys,
java.util.List throwConstraints)
- Specified by:
cofferConstructorInstance
in interface CofferTypeSystem
canOverride
public boolean canOverride(MethodInstance mi,
MethodInstance mj)
- Description copied from interface:
TypeSystem
- Return true if
mi
can override mj
.
- Specified by:
canOverride
in interface TypeSystem
- Overrides:
canOverride
in class TypeSystem_c
emptyKeySet
public KeySet emptyKeySet(Position pos)
- Specified by:
emptyKeySet
in interface CofferTypeSystem
instKey
public InstKey instKey(Position pos,
java.lang.String name)
- Specified by:
instKey
in interface CofferTypeSystem
unknownKey
public UnknownKey unknownKey(Position pos,
java.lang.String name)
- Specified by:
unknownKey
in interface CofferTypeSystem
paramKey
public ParamKey paramKey(Position pos,
java.lang.String name)
- Specified by:
paramKey
in interface CofferTypeSystem
subst
public Subst subst(java.util.Map substMap,
java.util.Map cache)
- Description copied from class:
ParamTypeSystem_c
- Create a substitutor.
- Specified by:
subst
in interface ParamTypeSystem
- Overrides:
subst
in class ParamTypeSystem_c
- Parameters:
substMap
- Map from formal parameters to actuals; the formals are
not necessarily formals of t
.cache
- Cache of substitutions performed, implemented as a map from
type to substituted type. This is passed in to ensure pointers to
outer classes are substituted correctly.
throwConstraint
public ThrowConstraint throwConstraint(Position pos,
Type type,
KeySet keys)
- Specified by:
throwConstraint
in interface CofferTypeSystem
createContext
public Context createContext()
- Description copied from interface:
TypeSystem
- Create a new context object for looking up variables, types, etc.
- Specified by:
createContext
in interface TypeSystem
- Overrides:
createContext
in class TypeSystem_c
uncheckedExceptions
public java.util.Collection uncheckedExceptions()
- Description copied from class:
TypeSystem_c
- Returns a list of the Throwable types that need not be declared
in method and constructor signatures.
- Specified by:
uncheckedExceptions
in interface TypeSystem
- Overrides:
uncheckedExceptions
in class TypeSystem_c