|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object polyglot.types.TypeSystem_c polyglot.ext.param.types.ParamTypeSystem_c jif.types.JifTypeSystem_c
public class JifTypeSystem_c
An implementation of the JifTypeSystem
interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class polyglot.types.TypeSystem_c |
---|
polyglot.types.TypeSystem_c.MostSpecificComparator |
Field Summary | |
---|---|
protected polyglot.types.TypeSystem |
jlts
|
protected polyglot.types.PrimitiveType |
LABEL_
|
protected LabelTypeCheckUtil |
ltcu
|
protected polyglot.types.PrimitiveType |
PRINCIPAL_
|
protected polyglot.types.Type |
PRINCIPAL_CLASS_
|
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_ |
Fields inherited from interface polyglot.types.TypeSystem |
---|
SERIALIZE_MEMBERS_WITH_CONTAINER |
Constructor Summary | |
---|---|
JifTypeSystem_c(polyglot.types.TypeSystem jlts)
|
Method Summary | |
---|---|
java.util.List |
abstractSuperInterfaces(polyglot.types.ReferenceType rt)
Exposes utility method of TypeSystem_c |
boolean |
actsFor(Principal p,
Principal q)
Returns true iff p actsfor q in the empty environment. |
ActsForConstraint |
actsForConstraint(polyglot.util.Position pos,
Principal actor,
Principal granter,
boolean isEquiv)
Construct an acts-for constraint. |
ArgLabel |
argLabel(polyglot.util.Position pos,
polyglot.types.LocalInstance vi,
polyglot.types.CodeInstance ci)
|
ArgLabel |
argLabel(polyglot.util.Position pos,
ParamInstance pi)
|
protected polyglot.types.ArrayType |
arrayType(polyglot.util.Position pos,
polyglot.types.Type type)
|
AuthConstraint |
authConstraint(polyglot.util.Position pos,
java.util.List principals)
Construct an authority constraint. |
AutoEndorseConstraint |
autoEndorseConstraint(polyglot.util.Position pos,
Label endorseTo)
Construct an autoendorse constraint. |
polyglot.types.Resolver |
bodyContextResolver(polyglot.types.ClassType type,
polyglot.types.Resolver outer)
|
ConfPolicy |
bottomConfPolicy(polyglot.util.Position pos)
|
IntegPolicy |
bottomIntegPolicy(polyglot.util.Position pos)
|
Label |
bottomLabel()
|
Label |
bottomLabel(polyglot.util.Position pos)
|
BottomPrincipal |
bottomPrincipal(polyglot.util.Position pos)
|
CallerConstraint |
callerConstraint(polyglot.util.Position pos,
java.util.List principals)
Construct a caller constraint. |
Label |
callSitePCLabel(JifProcedureInstance pi)
|
boolean |
canCoerceToString(polyglot.types.Type t,
polyglot.types.Context c)
In general, type t can be coerced to a String if t is a String, a primitive, or it has a toString() method. |
void |
checkInstantiation(polyglot.util.Position pos,
polyglot.ext.param.types.PClass t,
java.util.List args)
|
polyglot.types.Resolver |
classContextResolver(polyglot.types.ClassType type)
|
ConfPolicy |
confProjection(Label L)
|
Principal |
conjunctivePrincipal(polyglot.util.Position pos,
java.util.Collection ps)
|
Principal |
conjunctivePrincipal(polyglot.util.Position pos,
Principal l,
Principal r)
|
ConstArrayType |
constArrayOf(polyglot.util.Position pos,
polyglot.types.Type type)
|
ConstArrayType |
constArrayOf(polyglot.util.Position pos,
polyglot.types.Type type,
boolean castableToNonConst)
|
ConstArrayType |
constArrayOf(polyglot.util.Position pos,
polyglot.types.Type type,
int dims)
|
ConstArrayType |
constArrayOf(polyglot.util.Position pos,
polyglot.types.Type type,
int dims,
boolean castableToNonConst)
|
ConstArrayType |
constArrayOf(polyglot.util.Position pos,
polyglot.types.Type type,
int dims,
boolean castableToNonConst,
boolean recurseIntoBaseType)
|
ConstArrayType |
constArrayOf(polyglot.types.Type type)
|
ConstArrayType |
constArrayOf(polyglot.types.Type type,
int dims)
|
polyglot.types.ConstructorInstance |
constructorInstance(polyglot.util.Position pos,
polyglot.types.ClassType container,
polyglot.types.Flags flags,
java.util.List formalTypes,
java.util.List excTypes)
|
CovariantParamLabel |
covariantLabel(polyglot.util.Position pos,
ParamInstance pi)
|
polyglot.types.ParsedClassType |
createClassType(polyglot.types.LazyClassInitializer init,
polyglot.frontend.Source fromSource)
|
polyglot.types.Context |
createContext()
|
protected LabelEnv |
createEmptyLabelEnv()
|
LabelEnv |
createLabelEnv()
|
Solver |
createSolver(java.lang.String solverName)
Returns a new label constraint system solver. |
polyglot.types.LazyClassInitializer |
defaultClassInitializer()
|
polyglot.types.ConstructorInstance |
defaultConstructor(polyglot.util.Position pos,
polyglot.types.ClassType container)
|
java.util.List |
defaultPackageImports()
|
DefaultSignature |
defaultSignature()
|
boolean |
descendsFrom(polyglot.types.Type child,
polyglot.types.Type ancestor)
|
Principal |
disjunctivePrincipal(polyglot.util.Position pos,
java.util.Collection ps)
|
Principal |
disjunctivePrincipal(polyglot.util.Position pos,
Principal l,
Principal r)
|
DynamicLabel |
dynamicLabel(polyglot.util.Position pos,
AccessPath path)
|
protected LabelToJavaExpr |
dynamicLabelTranslator()
|
DynamicPrincipal |
dynamicPrincipal(polyglot.util.Position pos,
AccessPath path)
|
protected PrincipalToJavaExpr |
dynamicPrincipalTranslator()
|
boolean |
equals(polyglot.types.TypeObject t1,
polyglot.types.TypeObject t2)
|
boolean |
equalsNoStrip(polyglot.types.TypeObject t1,
polyglot.types.TypeObject t2)
Compares t1 to t2 without stripping off all the parameters and labels |
boolean |
equalsStrip(polyglot.types.TypeObject t1,
polyglot.types.TypeObject t2)
Compares t1 to t2, stripping off all the parameters and labels |
ExceptionPath |
exceptionPath(polyglot.types.Type type)
|
ExternalPrincipal |
externalPrincipal(polyglot.util.Position pos,
java.lang.String name)
|
polyglot.types.FieldInstance |
fieldInstance(polyglot.util.Position pos,
polyglot.types.ReferenceType container,
polyglot.types.Flags flags,
polyglot.types.Type type,
java.lang.String name)
|
VarLabel |
freshLabelVariable(polyglot.util.Position pos,
java.lang.String s,
java.lang.String description)
|
VarPrincipal |
freshPrincipalVariable(polyglot.util.Position pos,
java.lang.String s,
java.lang.String description)
|
Path |
gotoPath(polyglot.ast.Branch.Kind kind,
java.lang.String target)
|
boolean |
hasSafeConstructors(polyglot.types.ClassType ct)
Check if the class has safe constructors, that is, if the constructors of the class definitely do not access a final field (possibly on a subclass) before that field has been initalized. |
polyglot.types.ClassType |
hasUntrustedAncestor(polyglot.types.Type t)
Check if the class has an untrusted non-jif ancestor. |
void |
initialize(polyglot.types.TopLevelResolver loadedResolver,
polyglot.frontend.ExtensionInfo extInfo)
Initializes the type system and its internal constants. |
polyglot.types.InitializerInstance |
initializerInstance(polyglot.util.Position pos,
polyglot.types.ClassType container,
polyglot.types.Flags flags)
|
IntegPolicy |
integProjection(Label L)
|
boolean |
isAccessible(polyglot.types.MemberInstance mi,
polyglot.types.ClassType contextClass)
Exposes utility method of TypeSystem_c |
boolean |
isCastValid(polyglot.types.Type fromType,
polyglot.types.Type toType)
|
boolean |
isImplicitCastValid(polyglot.types.Type fromType,
polyglot.types.Type toType)
|
boolean |
isJifClass(polyglot.types.Type type)
Returns true if the type is a Jif class (will return false if the type is just a jif signature for a java class). |
boolean |
isLabel(polyglot.types.Type type)
Tests if the type is "label". |
boolean |
isLabeled(polyglot.types.Type type)
Returns true if the type is labeled. |
boolean |
isMarkerFieldName(java.lang.String s)
Is the string s a special marker field name? |
boolean |
isParamsRuntimeRep(polyglot.types.Type t)
Returns true if the type is a Jif class, or if it is a non-Jif class that represents parameters at runtime. |
boolean |
isPrincipal(polyglot.types.Type type)
Tests if the type is "principal". |
boolean |
isSubtype(polyglot.types.Type child,
polyglot.types.Type ancestor)
|
JifConstructorInstance |
jifConstructorInstance(polyglot.util.Position pos,
polyglot.types.ClassType container,
polyglot.types.Flags flags,
Label startLabel,
boolean isDefaultStartLabel,
Label returnLabel,
boolean isDefaultReturnLabel,
java.util.List formalTypes,
java.util.List formalArgLabels,
java.util.List excTypes,
java.util.List constraints)
|
JifMethodInstance |
jifMethodInstance(polyglot.util.Position pos,
polyglot.types.ReferenceType container,
polyglot.types.Flags flags,
polyglot.types.Type returnType,
java.lang.String name,
Label startLabel,
boolean isDefaultStartLabel,
java.util.List formalTypes,
java.util.List formalArgLabels,
Label endLabel,
boolean isDefaultEndLabel,
java.util.List excTypes,
java.util.List constraints)
|
ConfPolicy |
join(ConfPolicy p1,
ConfPolicy p2)
|
IntegPolicy |
join(IntegPolicy p1,
IntegPolicy p2)
|
Label |
join(Label L1,
Label L2)
Returns the join of L1 and L2. |
ConfPolicy |
joinConfPolicy(polyglot.util.Position pos,
java.util.Set components)
|
IntegPolicy |
joinIntegPolicy(polyglot.util.Position pos,
java.util.Set components)
|
Label |
joinLabel(polyglot.util.Position pos,
java.util.Set components)
|
LabelToJavaExpr |
joinLabelTranslator()
|
polyglot.types.PrimitiveType |
Label()
Returns the "label" type. |
LabeledType |
labeledType(polyglot.util.Position pos,
polyglot.types.Type type,
Label label)
Jif specific stuff |
LabelLeAssertion |
labelLeAssertion(polyglot.util.Position pos,
Label lhs,
Label rhs)
Construct an acts-for constraint. |
Label |
labelOfField(polyglot.types.FieldInstance vi,
Label pc)
Get the label of the field, folding in the PC if appropriate. |
Label |
labelOfLocal(polyglot.types.LocalInstance vi,
Label pc)
Get the label of the local, folding in the PC if appropriate. |
Label |
labelOfType(polyglot.types.Type type)
Get the label of the type, or bottom if unlabeled |
Label |
labelOfType(polyglot.types.Type type,
Label defaultLabel)
Get the label of the type, or defaultLabel if unlabeled. |
LabelTypeCheckUtil |
labelTypeCheckUtil()
|
polyglot.types.Type |
leastCommonAncestor(polyglot.types.Type type1,
polyglot.types.Type type2)
Override the superclass implementation, to handle label and principal parameters, and array base types correctly. |
protected polyglot.types.Type |
leastCommonAncestorSubtype(polyglot.types.Type subtype,
polyglot.types.Type supertype)
Find out if the least common ancestor of subtype and supertype is supertype, given that strip(subtype) is a sub type of strip(supertype). |
boolean |
leq(Label L1,
Label L2)
Returns true iff L1 <= L2 in the empty environment. |
boolean |
leq(Policy p1,
Policy p2)
|
polyglot.types.LocalInstance |
localInstance(polyglot.util.Position pos,
polyglot.types.Flags flags,
polyglot.types.Type type,
java.lang.String name)
|
ConfPolicy |
meet(ConfPolicy p1,
ConfPolicy p2)
|
IntegPolicy |
meet(IntegPolicy p1,
IntegPolicy p2)
|
Label |
meet(Label L1,
Label L2)
Returns the meet of L1 and L2. |
ConfPolicy |
meetConfPolicy(polyglot.util.Position pos,
java.util.Set components)
|
IntegPolicy |
meetIntegPolicy(polyglot.util.Position pos,
java.util.Set components)
|
Label |
meetLabel(polyglot.util.Position pos,
java.util.Set components)
|
LabelToJavaExpr |
meetLabelTranslator()
|
polyglot.types.MethodInstance |
methodInstance(polyglot.util.Position pos,
polyglot.types.ReferenceType container,
polyglot.types.Flags flags,
polyglot.types.Type returnType,
java.lang.String name,
java.util.List formalTypes,
java.util.List excTypes)
|
polyglot.ext.param.types.MuPClass |
mutablePClass(polyglot.util.Position pos)
|
Label |
noComponentsLabel()
|
Label |
noComponentsLabel(polyglot.util.Position pos)
|
Label |
notTaken()
|
Label |
notTaken(polyglot.util.Position pos)
|
polyglot.types.ClassType |
nullInstantiate(polyglot.util.Position pos,
polyglot.ext.param.types.PClass pc)
|
boolean |
numericConversionValid(polyglot.types.Type t,
java.lang.Object value)
|
polyglot.types.Package |
packageForName(polyglot.types.Package prefix,
java.lang.String name)
|
PairLabel |
pairLabel(polyglot.util.Position pos,
ConfPolicy confPol,
IntegPolicy integPol)
|
protected LabelToJavaExpr |
pairLabelTranslator()
|
ParamInstance |
paramInstance(polyglot.util.Position pos,
JifClassType container,
ParamInstance.Kind kind,
java.lang.String name)
Constructs a parameter instance for a class parameter declaration |
ParamLabel |
paramLabel(polyglot.util.Position pos,
ParamInstance pi)
|
PathMap |
pathMap()
|
PathMap |
pathMap(Path path,
Label L)
|
Label |
pathToLabel(polyglot.util.Position pos,
AccessPath path)
|
Principal |
pathToPrincipal(polyglot.util.Position pos,
AccessPath path)
|
polyglot.types.PrimitiveType |
primitiveForName(java.lang.String name)
|
polyglot.types.PrimitiveType |
Principal()
Returns the "principal" type. |
polyglot.types.Type |
PrincipalClass()
Returns the class jif.lang.Principal. |
PrincipalInstance |
principalInstance(polyglot.util.Position pos,
ExternalPrincipal principal)
Constructs a principal instance for an external principal. |
ParamPrincipal |
principalParam(polyglot.util.Position pos,
ParamInstance pi)
|
ReaderPolicy |
readerPolicy(polyglot.util.Position pos,
Principal owner,
java.util.Collection readers)
|
ReaderPolicy |
readerPolicy(polyglot.util.Position pos,
Principal owner,
Principal reader)
|
polyglot.types.Type |
staticTarget(polyglot.types.Type t)
|
protected polyglot.types.Type |
strip(polyglot.types.Type type)
|
polyglot.ext.param.types.Subst |
subst(java.util.Map substMap,
java.util.Map cache)
|
ThisLabel |
thisLabel(polyglot.types.ArrayType at)
|
ThisLabel |
thisLabel(JifClassType ct)
|
ThisLabel |
thisLabel(polyglot.util.Position pos,
JifClassType ct)
|
ThisLabel |
thisLabel(polyglot.util.Position pos,
polyglot.types.ReferenceType ct)
|
ConfPolicy |
topConfPolicy(polyglot.util.Position pos)
|
IntegPolicy |
topIntegPolicy(polyglot.util.Position pos)
|
Label |
topLabel()
|
Label |
topLabel(polyglot.util.Position pos)
|
TopPrincipal |
topPrincipal(polyglot.util.Position pos)
|
java.lang.String |
translateClass(polyglot.types.Resolver c,
polyglot.types.ClassType t)
|
java.lang.String |
translatePrimitive(polyglot.types.Resolver c,
polyglot.types.PrimitiveType t)
|
boolean |
typeEquals(polyglot.types.Type t1,
polyglot.types.Type t2)
|
java.util.Collection |
uncheckedExceptions()
|
polyglot.types.ClassType |
uncheckedInstantiate(polyglot.util.Position pos,
polyglot.ext.param.types.PClass t,
java.util.List actuals)
|
UnknownLabel |
unknownLabel(polyglot.util.Position pos)
|
Param |
unknownParam(polyglot.util.Position pos)
|
UnknownPrincipal |
unknownPrincipal(polyglot.util.Position pos)
|
polyglot.types.UnknownQualifier |
unknownQualifier(polyglot.util.Position pos)
|
polyglot.types.UnknownType |
unknownType(polyglot.util.Position pos)
|
polyglot.types.Type |
unlabel(polyglot.types.Type type)
Remove the label from a type, if any. |
WriterPolicy |
writerPolicy(polyglot.util.Position pos,
Principal owner,
java.util.Collection writers)
|
WriterPolicy |
writerPolicy(polyglot.util.Position pos,
Principal owner,
Principal writer)
|
WritersToReadersLabel |
writersToReadersLabel(polyglot.util.Position pos,
Label L)
|
Methods inherited from class polyglot.ext.param.types.ParamTypeSystem_c |
---|
instantiate, subst, subst |
Methods inherited from class polyglot.types.TypeSystem_c |
---|
Abstract, accessibleFromPackage, ArithmeticException, arrayOf, arrayOf, arrayOf, arrayOf, ArrayStoreException, assert_, assert_, Boolean, Byte, callValid, canOverride, Char, checkAccessFlags, checkClassConformance, checkConstructorFlags, checkCycles, checkCycles, checkFieldFlags, checkInitializerFlags, checkLocalClassFlags, checkLocalFlags, checkMemberClassFlags, checkMethodFlags, checkOverride, checkTopLevelClassFlags, Class, classAccessible, classAccessible, classAccessibleFromPackage, ClassCastException, classContextResolver, classFileLazyClassInitializer, Cloneable, createArrayType, createClassContextResolver, createClassType, createClassType, createClassType, createNewFlag, createNull, createPackage, createPackage, createPackageContextResolver, createPrimitive, deserializedClassInitializer, Double, Error, Exception, extensionInfo, Final, findAcceptableConstructors, findAcceptableMethods, findConstructor, findConstructor, findField, findField, findField, findFields, findImplementingMethod, findMemberClass, findMemberClass, findMemberClass, findMethod, findMethod, findMostSpecificProcedures, findProcedure, flagsForBits, flagsForName, Float, forName, forName, getTransformedClassName, getTypeEncoderRootSet, hasEnclosingInstance, hasFormals, hasMethod, hasMethodNamed, implemented, importTable, importTable, initEnums, initFlags, initTypes, Int, Interface, interfaces, isAccessible, isCanonical, isEnclosed, isSameMethod, isThrowable, isUncheckedException, legalAbstractMethodFlags, legalAccessFlags, legalConstructorFlags, legalFieldFlags, legalInitializerFlags, legalInterfaceFlags, legalLocalClassFlags, legalLocalFlags, legalMemberClassFlags, legalMethodFlags, legalTopLevelClassFlags, listToString, load, loadedResolver, Long, methodCallValid, moreSpecific, Native, NoFlags, Null, NullPointerException, numericConversionValid, Object, OutOfBoundsException, overrides, packageContextResolver, packageContextResolver, packageContextResolver, packageEquals, packageExists, packageForName, parsedResolver, placeHolder, placeHolder, Private, promote, promote, promoteNumeric, promoteNumeric, Protected, Public, restoreSystemResolver, RuntimeException, saveSystemResolver, Serializable, Short, Static, StrictFP, String, superType, Synchronized, systemResolver, Throwable, throwsSubset, toString, Transient, translateArray, translatePackage, typeForClass, typeForClass, typeForName, unknownPackage, 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.ext.param.types.ParamTypeSystem |
---|
instantiate, subst, subst |
Methods inherited from interface polyglot.types.TypeSystem |
---|
Abstract, ArithmeticException, arrayOf, arrayOf, arrayOf, arrayOf, ArrayStoreException, Boolean, Byte, callValid, canOverride, Char, checkAccessFlags, checkClassConformance, checkConstructorFlags, checkCycles, checkFieldFlags, checkInitializerFlags, checkLocalClassFlags, checkLocalFlags, checkMemberClassFlags, checkMethodFlags, checkOverride, checkTopLevelClassFlags, Class, classAccessible, classAccessible, classAccessibleFromPackage, ClassCastException, classContextResolver, classFileLazyClassInitializer, Cloneable, createClassContextResolver, createClassType, createClassType, createClassType, createNewFlag, createPackage, createPackage, createPackageContextResolver, deserializedClassInitializer, Double, Error, Exception, extensionInfo, Final, findConstructor, findConstructor, findField, findField, findField, findImplementingMethod, findMemberClass, findMemberClass, findMemberClass, findMethod, findMethod, flagsForBits, Float, forName, getTransformedClassName, getTypeEncoderRootSet, hasEnclosingInstance, hasFormals, hasMethod, hasMethodNamed, implemented, importTable, importTable, Int, Interface, interfaces, isAccessible, isCanonical, isEnclosed, isSameMethod, isThrowable, isUncheckedException, legalAbstractMethodFlags, legalAccessFlags, legalConstructorFlags, legalFieldFlags, legalInitializerFlags, legalInterfaceFlags, legalLocalClassFlags, legalLocalFlags, legalMemberClassFlags, legalMethodFlags, legalTopLevelClassFlags, loadedResolver, Long, methodCallValid, moreSpecific, Native, NoFlags, Null, NullPointerException, numericConversionValid, Object, OutOfBoundsException, overrides, packageContextResolver, packageContextResolver, packageContextResolver, packageEquals, packageExists, packageForName, parsedResolver, placeHolder, placeHolder, Private, promote, promote, Protected, Public, restoreSystemResolver, RuntimeException, saveSystemResolver, Serializable, Short, Static, StrictFP, String, superType, Synchronized, systemResolver, Throwable, throwsSubset, Transient, translateArray, translatePackage, typeForName, unknownPackage, Void, Volatile, wrapperTypeString |
Field Detail |
---|
protected final polyglot.types.TypeSystem jlts
protected polyglot.types.PrimitiveType PRINCIPAL_
protected polyglot.types.PrimitiveType LABEL_
protected polyglot.types.Type PRINCIPAL_CLASS_
protected LabelTypeCheckUtil ltcu
Constructor Detail |
---|
public JifTypeSystem_c(polyglot.types.TypeSystem jlts)
Method Detail |
---|
public Solver createSolver(java.lang.String solverName)
JifTypeSystem
createSolver
in interface JifTypeSystem
protected LabelEnv createEmptyLabelEnv()
public LabelEnv createLabelEnv()
createLabelEnv
in interface JifTypeSystem
public polyglot.ext.param.types.MuPClass mutablePClass(polyglot.util.Position pos)
mutablePClass
in interface polyglot.ext.param.types.ParamTypeSystem
mutablePClass
in class polyglot.ext.param.types.ParamTypeSystem_c
public polyglot.types.LazyClassInitializer defaultClassInitializer()
defaultClassInitializer
in interface polyglot.types.TypeSystem
defaultClassInitializer
in class polyglot.types.TypeSystem_c
public void initialize(polyglot.types.TopLevelResolver loadedResolver, polyglot.frontend.ExtensionInfo extInfo) throws polyglot.types.SemanticException
initialize
in interface polyglot.types.TypeSystem
initialize
in class polyglot.types.TypeSystem_c
polyglot.types.SemanticException
public polyglot.types.UnknownType unknownType(polyglot.util.Position pos)
unknownType
in interface polyglot.types.TypeSystem
unknownType
in class polyglot.types.TypeSystem_c
public polyglot.types.UnknownQualifier unknownQualifier(polyglot.util.Position pos)
unknownQualifier
in interface polyglot.types.TypeSystem
unknownQualifier
in class polyglot.types.TypeSystem_c
public polyglot.types.Package packageForName(polyglot.types.Package prefix, java.lang.String name) throws polyglot.types.SemanticException
packageForName
in interface polyglot.types.TypeSystem
packageForName
in class polyglot.types.TypeSystem_c
polyglot.types.SemanticException
public polyglot.types.PrimitiveType Principal()
JifTypeSystem
Principal
in interface JifTypeSystem
public polyglot.types.Type PrincipalClass()
JifTypeSystem
PrincipalClass
in interface JifTypeSystem
public polyglot.types.PrimitiveType Label()
JifTypeSystem
Label
in interface JifTypeSystem
public polyglot.types.Context createContext()
createContext
in interface polyglot.types.TypeSystem
createContext
in class polyglot.types.TypeSystem_c
public ConstArrayType constArrayOf(polyglot.types.Type type)
constArrayOf
in interface JifTypeSystem
public ConstArrayType constArrayOf(polyglot.util.Position pos, polyglot.types.Type type)
constArrayOf
in interface JifTypeSystem
public ConstArrayType constArrayOf(polyglot.util.Position pos, polyglot.types.Type type, boolean castableToNonConst)
public ConstArrayType constArrayOf(polyglot.types.Type type, int dims)
constArrayOf
in interface JifTypeSystem
public ConstArrayType constArrayOf(polyglot.util.Position pos, polyglot.types.Type type, int dims)
constArrayOf
in interface JifTypeSystem
public ConstArrayType constArrayOf(polyglot.util.Position pos, polyglot.types.Type type, int dims, boolean castableToNonConst)
constArrayOf
in interface JifTypeSystem
public ConstArrayType constArrayOf(polyglot.util.Position pos, polyglot.types.Type type, int dims, boolean castableToNonConst, boolean recurseIntoBaseType)
constArrayOf
in interface JifTypeSystem
protected polyglot.types.ArrayType arrayType(polyglot.util.Position pos, polyglot.types.Type type)
arrayType
in class polyglot.types.TypeSystem_c
public polyglot.types.InitializerInstance initializerInstance(polyglot.util.Position pos, polyglot.types.ClassType container, polyglot.types.Flags flags)
initializerInstance
in interface polyglot.types.TypeSystem
initializerInstance
in class polyglot.types.TypeSystem_c
public polyglot.types.FieldInstance fieldInstance(polyglot.util.Position pos, polyglot.types.ReferenceType container, polyglot.types.Flags flags, polyglot.types.Type type, java.lang.String name)
fieldInstance
in interface polyglot.types.TypeSystem
fieldInstance
in class polyglot.types.TypeSystem_c
public polyglot.types.LocalInstance localInstance(polyglot.util.Position pos, polyglot.types.Flags flags, polyglot.types.Type type, java.lang.String name)
localInstance
in interface polyglot.types.TypeSystem
localInstance
in class polyglot.types.TypeSystem_c
public polyglot.types.ConstructorInstance constructorInstance(polyglot.util.Position pos, polyglot.types.ClassType container, polyglot.types.Flags flags, java.util.List formalTypes, java.util.List excTypes)
constructorInstance
in interface polyglot.types.TypeSystem
constructorInstance
in class polyglot.types.TypeSystem_c
public JifConstructorInstance jifConstructorInstance(polyglot.util.Position pos, polyglot.types.ClassType container, polyglot.types.Flags flags, Label startLabel, boolean isDefaultStartLabel, Label returnLabel, boolean isDefaultReturnLabel, java.util.List formalTypes, java.util.List formalArgLabels, java.util.List excTypes, java.util.List constraints)
public polyglot.types.MethodInstance methodInstance(polyglot.util.Position pos, polyglot.types.ReferenceType container, polyglot.types.Flags flags, polyglot.types.Type returnType, java.lang.String name, java.util.List formalTypes, java.util.List excTypes)
methodInstance
in interface polyglot.types.TypeSystem
methodInstance
in class polyglot.types.TypeSystem_c
public JifMethodInstance jifMethodInstance(polyglot.util.Position pos, polyglot.types.ReferenceType container, polyglot.types.Flags flags, polyglot.types.Type returnType, java.lang.String name, Label startLabel, boolean isDefaultStartLabel, java.util.List formalTypes, java.util.List formalArgLabels, Label endLabel, boolean isDefaultEndLabel, java.util.List excTypes, java.util.List constraints)
jifMethodInstance
in interface JifTypeSystem
public ParamInstance paramInstance(polyglot.util.Position pos, JifClassType container, ParamInstance.Kind kind, java.lang.String name)
JifTypeSystem
paramInstance
in interface JifTypeSystem
public PrincipalInstance principalInstance(polyglot.util.Position pos, ExternalPrincipal principal)
JifTypeSystem
principalInstance
in interface JifTypeSystem
public boolean descendsFrom(polyglot.types.Type child, polyglot.types.Type ancestor)
descendsFrom
in interface polyglot.types.TypeSystem
descendsFrom
in class polyglot.types.TypeSystem_c
public boolean isSubtype(polyglot.types.Type child, polyglot.types.Type ancestor)
isSubtype
in interface polyglot.types.TypeSystem
isSubtype
in class polyglot.types.TypeSystem_c
public boolean isCastValid(polyglot.types.Type fromType, polyglot.types.Type toType)
isCastValid
in interface polyglot.types.TypeSystem
isCastValid
in class polyglot.types.TypeSystem_c
public boolean isImplicitCastValid(polyglot.types.Type fromType, polyglot.types.Type toType)
isImplicitCastValid
in interface polyglot.types.TypeSystem
isImplicitCastValid
in class polyglot.types.TypeSystem_c
public polyglot.types.Type staticTarget(polyglot.types.Type t)
staticTarget
in interface polyglot.types.TypeSystem
staticTarget
in class polyglot.types.TypeSystem_c
public boolean equalsNoStrip(polyglot.types.TypeObject t1, polyglot.types.TypeObject t2)
JifTypeSystem
equalsNoStrip
in interface JifTypeSystem
public boolean equalsStrip(polyglot.types.TypeObject t1, polyglot.types.TypeObject t2)
JifTypeSystem
equalsStrip
in interface JifTypeSystem
public boolean equals(polyglot.types.TypeObject t1, polyglot.types.TypeObject t2)
equals
in interface polyglot.types.TypeSystem
equals
in class polyglot.types.TypeSystem_c
public boolean typeEquals(polyglot.types.Type t1, polyglot.types.Type t2)
typeEquals
in interface polyglot.types.TypeSystem
typeEquals
in class polyglot.types.TypeSystem_c
protected polyglot.types.Type leastCommonAncestorSubtype(polyglot.types.Type subtype, polyglot.types.Type supertype)
public polyglot.types.Type leastCommonAncestor(polyglot.types.Type type1, polyglot.types.Type type2) throws polyglot.types.SemanticException
leastCommonAncestor
in interface polyglot.types.TypeSystem
leastCommonAncestor
in class polyglot.types.TypeSystem_c
polyglot.types.SemanticException
public boolean numericConversionValid(polyglot.types.Type t, java.lang.Object value)
numericConversionValid
in interface polyglot.types.TypeSystem
numericConversionValid
in class polyglot.types.TypeSystem_c
public polyglot.types.Resolver bodyContextResolver(polyglot.types.ClassType type, polyglot.types.Resolver outer)
public polyglot.types.Resolver classContextResolver(polyglot.types.ClassType type)
classContextResolver
in interface polyglot.types.TypeSystem
classContextResolver
in class polyglot.types.TypeSystem_c
public polyglot.types.ParsedClassType createClassType(polyglot.types.LazyClassInitializer init, polyglot.frontend.Source fromSource)
createClassType
in interface polyglot.types.TypeSystem
createClassType
in class polyglot.types.TypeSystem_c
public java.util.List defaultPackageImports()
defaultPackageImports
in interface polyglot.types.TypeSystem
defaultPackageImports
in class polyglot.types.TypeSystem_c
public LabeledType labeledType(polyglot.util.Position pos, polyglot.types.Type type, Label label)
labeledType
in interface JifTypeSystem
public PathMap pathMap()
pathMap
in interface JifTypeSystem
public PathMap pathMap(Path path, Label L)
pathMap
in interface JifTypeSystem
public ExceptionPath exceptionPath(polyglot.types.Type type)
exceptionPath
in interface JifTypeSystem
public Path gotoPath(polyglot.ast.Branch.Kind kind, java.lang.String target)
gotoPath
in interface JifTypeSystem
public Param unknownParam(polyglot.util.Position pos)
unknownParam
in interface JifTypeSystem
public polyglot.types.ClassType nullInstantiate(polyglot.util.Position pos, polyglot.ext.param.types.PClass pc)
nullInstantiate
in interface JifTypeSystem
public void checkInstantiation(polyglot.util.Position pos, polyglot.ext.param.types.PClass t, java.util.List args) throws polyglot.types.SemanticException
checkInstantiation
in class polyglot.ext.param.types.ParamTypeSystem_c
polyglot.types.SemanticException
public polyglot.types.ClassType uncheckedInstantiate(polyglot.util.Position pos, polyglot.ext.param.types.PClass t, java.util.List actuals)
uncheckedInstantiate
in class polyglot.ext.param.types.ParamTypeSystem_c
public polyglot.ext.param.types.Subst subst(java.util.Map substMap, java.util.Map cache)
subst
in interface polyglot.ext.param.types.ParamTypeSystem
subst
in class polyglot.ext.param.types.ParamTypeSystem_c
public VarLabel freshLabelVariable(polyglot.util.Position pos, java.lang.String s, java.lang.String description)
freshLabelVariable
in interface JifTypeSystem
public VarPrincipal freshPrincipalVariable(polyglot.util.Position pos, java.lang.String s, java.lang.String description)
freshPrincipalVariable
in interface JifTypeSystem
public ParamPrincipal principalParam(polyglot.util.Position pos, ParamInstance pi)
principalParam
in interface JifTypeSystem
public DynamicPrincipal dynamicPrincipal(polyglot.util.Position pos, AccessPath path)
dynamicPrincipal
in interface JifTypeSystem
protected PrincipalToJavaExpr dynamicPrincipalTranslator()
public Principal pathToPrincipal(polyglot.util.Position pos, AccessPath path)
pathToPrincipal
in interface JifTypeSystem
public ExternalPrincipal externalPrincipal(polyglot.util.Position pos, java.lang.String name)
externalPrincipal
in interface JifTypeSystem
public UnknownPrincipal unknownPrincipal(polyglot.util.Position pos)
unknownPrincipal
in interface JifTypeSystem
public TopPrincipal topPrincipal(polyglot.util.Position pos)
topPrincipal
in interface JifTypeSystem
public BottomPrincipal bottomPrincipal(polyglot.util.Position pos)
bottomPrincipal
in interface JifTypeSystem
public Principal conjunctivePrincipal(polyglot.util.Position pos, Principal l, Principal r)
conjunctivePrincipal
in interface JifTypeSystem
public Principal conjunctivePrincipal(polyglot.util.Position pos, java.util.Collection ps)
conjunctivePrincipal
in interface JifTypeSystem
public Principal disjunctivePrincipal(polyglot.util.Position pos, Principal l, Principal r)
disjunctivePrincipal
in interface JifTypeSystem
public Principal disjunctivePrincipal(polyglot.util.Position pos, java.util.Collection ps)
disjunctivePrincipal
in interface JifTypeSystem
public Label topLabel(polyglot.util.Position pos)
topLabel
in interface JifTypeSystem
public Label topLabel()
topLabel
in interface JifTypeSystem
public Label bottomLabel(polyglot.util.Position pos)
bottomLabel
in interface JifTypeSystem
public Label bottomLabel()
bottomLabel
in interface JifTypeSystem
public Label noComponentsLabel()
noComponentsLabel
in interface JifTypeSystem
public Label noComponentsLabel(polyglot.util.Position pos)
noComponentsLabel
in interface JifTypeSystem
public Label notTaken(polyglot.util.Position pos)
notTaken
in interface JifTypeSystem
public Label notTaken()
notTaken
in interface JifTypeSystem
public CovariantParamLabel covariantLabel(polyglot.util.Position pos, ParamInstance pi)
covariantLabel
in interface JifTypeSystem
public ParamLabel paramLabel(polyglot.util.Position pos, ParamInstance pi)
paramLabel
in interface JifTypeSystem
public ReaderPolicy readerPolicy(polyglot.util.Position pos, Principal owner, Principal reader)
readerPolicy
in interface JifTypeSystem
public ReaderPolicy readerPolicy(polyglot.util.Position pos, Principal owner, java.util.Collection readers)
readerPolicy
in interface JifTypeSystem
public WriterPolicy writerPolicy(polyglot.util.Position pos, Principal owner, Principal writer)
writerPolicy
in interface JifTypeSystem
public WriterPolicy writerPolicy(polyglot.util.Position pos, Principal owner, java.util.Collection writers)
writerPolicy
in interface JifTypeSystem
public ConfPolicy bottomConfPolicy(polyglot.util.Position pos)
bottomConfPolicy
in interface JifTypeSystem
public IntegPolicy bottomIntegPolicy(polyglot.util.Position pos)
bottomIntegPolicy
in interface JifTypeSystem
public ConfPolicy topConfPolicy(polyglot.util.Position pos)
topConfPolicy
in interface JifTypeSystem
public IntegPolicy topIntegPolicy(polyglot.util.Position pos)
topIntegPolicy
in interface JifTypeSystem
public Label joinLabel(polyglot.util.Position pos, java.util.Set components)
joinLabel
in interface JifTypeSystem
public LabelToJavaExpr joinLabelTranslator()
public Label meetLabel(polyglot.util.Position pos, java.util.Set components)
meetLabel
in interface JifTypeSystem
public LabelToJavaExpr meetLabelTranslator()
public DynamicLabel dynamicLabel(polyglot.util.Position pos, AccessPath path)
dynamicLabel
in interface JifTypeSystem
public Label pathToLabel(polyglot.util.Position pos, AccessPath path)
pathToLabel
in interface JifTypeSystem
protected LabelToJavaExpr dynamicLabelTranslator()
public ArgLabel argLabel(polyglot.util.Position pos, polyglot.types.LocalInstance vi, polyglot.types.CodeInstance ci)
argLabel
in interface JifTypeSystem
public ArgLabel argLabel(polyglot.util.Position pos, ParamInstance pi)
argLabel
in interface JifTypeSystem
public Label callSitePCLabel(JifProcedureInstance pi)
callSitePCLabel
in interface JifTypeSystem
public ThisLabel thisLabel(JifClassType ct)
thisLabel
in interface JifTypeSystem
public ThisLabel thisLabel(polyglot.types.ArrayType at)
thisLabel
in interface JifTypeSystem
public ThisLabel thisLabel(polyglot.util.Position pos, JifClassType ct)
thisLabel
in interface JifTypeSystem
public ThisLabel thisLabel(polyglot.util.Position pos, polyglot.types.ReferenceType ct)
public UnknownLabel unknownLabel(polyglot.util.Position pos)
unknownLabel
in interface JifTypeSystem
public PairLabel pairLabel(polyglot.util.Position pos, ConfPolicy confPol, IntegPolicy integPol)
pairLabel
in interface JifTypeSystem
protected LabelToJavaExpr pairLabelTranslator()
public WritersToReadersLabel writersToReadersLabel(polyglot.util.Position pos, Label L)
writersToReadersLabel
in interface JifTypeSystem
public ActsForConstraint actsForConstraint(polyglot.util.Position pos, Principal actor, Principal granter, boolean isEquiv)
JifTypeSystem
actsForConstraint
in interface JifTypeSystem
public LabelLeAssertion labelLeAssertion(polyglot.util.Position pos, Label lhs, Label rhs)
JifTypeSystem
labelLeAssertion
in interface JifTypeSystem
public AuthConstraint authConstraint(polyglot.util.Position pos, java.util.List principals)
JifTypeSystem
authConstraint
in interface JifTypeSystem
public AutoEndorseConstraint autoEndorseConstraint(polyglot.util.Position pos, Label endorseTo)
JifTypeSystem
autoEndorseConstraint
in interface JifTypeSystem
public CallerConstraint callerConstraint(polyglot.util.Position pos, java.util.List principals)
JifTypeSystem
callerConstraint
in interface JifTypeSystem
public Label labelOfField(polyglot.types.FieldInstance vi, Label pc)
JifTypeSystem
labelOfField
in interface JifTypeSystem
public Label labelOfLocal(polyglot.types.LocalInstance vi, Label pc)
JifTypeSystem
labelOfLocal
in interface JifTypeSystem
public Label labelOfType(polyglot.types.Type type)
JifTypeSystem
labelOfType
in interface JifTypeSystem
public Label labelOfType(polyglot.types.Type type, Label defaultLabel)
JifTypeSystem
defaultLabel
if unlabeled.
labelOfType
in interface JifTypeSystem
protected polyglot.types.Type strip(polyglot.types.Type type)
public polyglot.types.Type unlabel(polyglot.types.Type type)
JifTypeSystem
unlabel
in interface JifTypeSystem
public boolean isLabel(polyglot.types.Type type)
JifTypeSystem
isLabel
in interface JifTypeSystem
public boolean isPrincipal(polyglot.types.Type type)
JifTypeSystem
isPrincipal
in interface JifTypeSystem
public boolean isLabeled(polyglot.types.Type type)
JifTypeSystem
isLabeled
in interface JifTypeSystem
public boolean isJifClass(polyglot.types.Type type)
isJifClass
in interface JifTypeSystem
public boolean isMarkerFieldName(java.lang.String s)
JifTypeSystem
isMarkerFieldName
in interface JifTypeSystem
public boolean isParamsRuntimeRep(polyglot.types.Type t)
JifTypeSystem
isParamsRuntimeRep
in interface JifTypeSystem
public polyglot.types.ClassType hasUntrustedAncestor(polyglot.types.Type t)
hasUntrustedAncestor
in interface JifTypeSystem
t
- Type to check
public boolean hasSafeConstructors(polyglot.types.ClassType ct)
public boolean canCoerceToString(polyglot.types.Type t, polyglot.types.Context c)
canCoerceToString
in interface polyglot.types.TypeSystem
canCoerceToString
in class polyglot.types.TypeSystem_c
public Label join(Label L1, Label L2)
JifTypeSystem
join
in interface JifTypeSystem
public Label meet(Label L1, Label L2)
JifTypeSystem
meet
in interface JifTypeSystem
public boolean actsFor(Principal p, Principal q)
JifTypeSystem
actsFor
in interface JifTypeSystem
public boolean leq(Label L1, Label L2)
JifTypeSystem
leq
in interface JifTypeSystem
public boolean leq(Policy p1, Policy p2)
leq
in interface JifTypeSystem
public ConfPolicy joinConfPolicy(polyglot.util.Position pos, java.util.Set components)
joinConfPolicy
in interface JifTypeSystem
public IntegPolicy joinIntegPolicy(polyglot.util.Position pos, java.util.Set components)
joinIntegPolicy
in interface JifTypeSystem
public ConfPolicy meetConfPolicy(polyglot.util.Position pos, java.util.Set components)
meetConfPolicy
in interface JifTypeSystem
public IntegPolicy meetIntegPolicy(polyglot.util.Position pos, java.util.Set components)
meetIntegPolicy
in interface JifTypeSystem
public ConfPolicy join(ConfPolicy p1, ConfPolicy p2)
join
in interface JifTypeSystem
public IntegPolicy join(IntegPolicy p1, IntegPolicy p2)
join
in interface JifTypeSystem
public ConfPolicy meet(ConfPolicy p1, ConfPolicy p2)
meet
in interface JifTypeSystem
public IntegPolicy meet(IntegPolicy p1, IntegPolicy p2)
meet
in interface JifTypeSystem
public ConfPolicy confProjection(Label L)
confProjection
in interface JifTypeSystem
public IntegPolicy integProjection(Label L)
integProjection
in interface JifTypeSystem
public java.lang.String translateClass(polyglot.types.Resolver c, polyglot.types.ClassType t)
translateClass
in interface polyglot.types.TypeSystem
translateClass
in class polyglot.types.TypeSystem_c
public java.lang.String translatePrimitive(polyglot.types.Resolver c, polyglot.types.PrimitiveType t)
translatePrimitive
in interface polyglot.types.TypeSystem
translatePrimitive
in class polyglot.types.TypeSystem_c
public java.util.List abstractSuperInterfaces(polyglot.types.ReferenceType rt)
JifTypeSystem
abstractSuperInterfaces
in interface JifTypeSystem
abstractSuperInterfaces
in class polyglot.types.TypeSystem_c
public boolean isAccessible(polyglot.types.MemberInstance mi, polyglot.types.ClassType contextClass)
JifTypeSystem
isAccessible
in interface JifTypeSystem
isAccessible
in interface polyglot.types.TypeSystem
isAccessible
in class polyglot.types.TypeSystem_c
public polyglot.types.PrimitiveType primitiveForName(java.lang.String name) throws polyglot.types.SemanticException
primitiveForName
in interface polyglot.types.TypeSystem
primitiveForName
in class polyglot.types.TypeSystem_c
polyglot.types.SemanticException
public java.util.Collection uncheckedExceptions()
uncheckedExceptions
in interface polyglot.types.TypeSystem
uncheckedExceptions
in class polyglot.types.TypeSystem_c
public DefaultSignature defaultSignature()
defaultSignature
in interface JifTypeSystem
public polyglot.types.ConstructorInstance defaultConstructor(polyglot.util.Position pos, polyglot.types.ClassType container)
defaultConstructor
in interface polyglot.types.TypeSystem
defaultConstructor
in class polyglot.types.TypeSystem_c
public LabelTypeCheckUtil labelTypeCheckUtil()
labelTypeCheckUtil
in interface JifTypeSystem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |