polyglot.ext.param.types
Interface ParamTypeSystem

All Superinterfaces:
TypeSystem
All Known Subinterfaces:
CofferTypeSystem
All Known Implementing Classes:
CofferTypeSystem_c, ParamTypeSystem_c

public interface ParamTypeSystem
extends TypeSystem

Type system for parameterized types.


Method Summary
 ClassType instantiate(Position pos, PClass base, java.util.List actuals)
          Instantiate a parametric type on a list of actual parameters.
 MuPClass mutablePClass(Position pos)
          Create a new mutable PClass.
 Subst subst(java.util.Map substMap, java.util.Map cache)
          Create a substitutor.
 Type subst(Type base, java.util.Map substMap)
          Apply a parameter substitution to a type.
 Type subst(Type base, java.util.Map substMap, java.util.Map cache)
          Apply a parameter substitution to a type.
 
Methods inherited from interface polyglot.types.TypeSystem
Abstract, ArithmeticException, arrayOf, arrayOf, arrayOf, arrayOf, ArrayStoreException, Boolean, Byte, callValid, canCoerceToString, canOverride, Char, checkAccessFlags, checkClassConformance, checkConstructorFlags, checkCycles, checkFieldFlags, checkInitializerFlags, checkLocalClassFlags, checkLocalFlags, checkMemberClassFlags, checkMethodFlags, checkOverride, checkTopLevelClassFlags, Class, classAccessible, classAccessibleFromPackage, ClassCastException, classContextResolver, Cloneable, constructorInstance, createClassType, createClassType, createClassType, createClassType, createContext, createNewFlag, createPackage, createPackage, defaultClassInitializer, defaultConstructor, defaultPackageImports, descendsFrom, Double, equals, Error, Exception, fieldInstance, Final, findConstructor, findConstructor, findField, findField, findField, findMemberClass, findMemberClass, findMemberClass, findMethod, findMethod, flagsForBits, Float, forName, getTransformedClassName, getTypeEncoderRootSet, hasEnclosingInstance, hasFormals, hasMethod, hasMethodNamed, implemented, importTable, importTable, initialize, initializerInstance, Int, Interface, interfaces, isAccessible, isCanonical, isCastValid, isEnclosed, isImplicitCastValid, isSameMethod, isSubtype, isThrowable, isUncheckedException, leastCommonAncestor, loadedResolver, localInstance, Long, methodCallValid, methodInstance, moreSpecific, Native, NoFlags, Null, NullPointerException, numericConversionValid, numericConversionValid, Object, OutOfBoundsException, overrides, packageContextResolver, packageExists, packageForName, packageForName, parsedResolver, placeHolder, placeHolder, primitiveForName, Private, promote, promote, Protected, Public, RuntimeException, Serializable, Short, Static, staticTarget, StrictFP, String, superType, Synchronized, systemResolver, Throwable, throwsSubset, Transient, translateArray, translateClass, translatePackage, translatePrimitive, typeForName, uncheckedExceptions, unknownPackage, unknownQualifier, unknownType, Void, Volatile, wrapperTypeString
 

Method Detail

mutablePClass

MuPClass mutablePClass(Position pos)
Create a new mutable PClass.

Parameters:
pos - The position of the pclass

instantiate

ClassType instantiate(Position pos,
                      PClass base,
                      java.util.List actuals)
                      throws SemanticException
Instantiate a parametric type on a list of actual parameters.

Parameters:
pos - The position of the instantiated type
base - The parameterized type
actuals - The list of actuals
Throws:
SemanticException - when the actuals do not agree with the formals

subst

Type subst(Type base,
           java.util.Map substMap)
Apply a parameter substitution to a type.

Parameters:
base - The type on which we perform substitutions.
substMap - Map from formal parameters to actuals; the formals are not necessarily formals of base.

subst

Type subst(Type base,
           java.util.Map substMap,
           java.util.Map cache)
Apply a parameter substitution to a type.

Parameters:
base - The type on which we perform substitutions.
substMap - Map from formal parameters to actuals; the formals are not necessarily formals of base.
cache - Cache of substitutions performed, implemented as a map from base type to substituted type. This is passed in to ensure pointers to outer classes are substituted correctly.

subst

Subst subst(java.util.Map substMap,
            java.util.Map cache)
Create a substitutor.

Parameters:
substMap - Map from formal parameters to actuals; the formals are not necessarily formals of base.
cache - Cache of substitutions performed, implemented as a map from base type to substituted type. This is passed in to ensure pointers to outer classes are substituted correctly.