|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.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 JifTypeSystemprotected LabelEnv createEmptyLabelEnv()
public LabelEnv createLabelEnv()
createLabelEnv in interface JifTypeSystempublic polyglot.ext.param.types.MuPClass mutablePClass(polyglot.util.Position pos)
mutablePClass in interface polyglot.ext.param.types.ParamTypeSystemmutablePClass in class polyglot.ext.param.types.ParamTypeSystem_cpublic polyglot.types.LazyClassInitializer defaultClassInitializer()
defaultClassInitializer in interface polyglot.types.TypeSystemdefaultClassInitializer 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.TypeSysteminitialize in class polyglot.types.TypeSystem_cpolyglot.types.SemanticExceptionpublic polyglot.types.UnknownType unknownType(polyglot.util.Position pos)
unknownType in interface polyglot.types.TypeSystemunknownType in class polyglot.types.TypeSystem_cpublic polyglot.types.UnknownQualifier unknownQualifier(polyglot.util.Position pos)
unknownQualifier in interface polyglot.types.TypeSystemunknownQualifier 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.TypeSystempackageForName in class polyglot.types.TypeSystem_cpolyglot.types.SemanticExceptionpublic polyglot.types.PrimitiveType Principal()
JifTypeSystem
Principal in interface JifTypeSystempublic polyglot.types.Type PrincipalClass()
JifTypeSystem
PrincipalClass in interface JifTypeSystempublic polyglot.types.PrimitiveType Label()
JifTypeSystem
Label in interface JifTypeSystempublic polyglot.types.Context createContext()
createContext in interface polyglot.types.TypeSystemcreateContext in class polyglot.types.TypeSystem_cpublic 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.TypeSysteminitializerInstance 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.TypeSystemfieldInstance 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.TypeSystemlocalInstance 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.TypeSystemconstructorInstance 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.TypeSystemmethodInstance 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.TypeSystemdescendsFrom in class polyglot.types.TypeSystem_c
public boolean isSubtype(polyglot.types.Type child,
polyglot.types.Type ancestor)
isSubtype in interface polyglot.types.TypeSystemisSubtype in class polyglot.types.TypeSystem_c
public boolean isCastValid(polyglot.types.Type fromType,
polyglot.types.Type toType)
isCastValid in interface polyglot.types.TypeSystemisCastValid in class polyglot.types.TypeSystem_c
public boolean isImplicitCastValid(polyglot.types.Type fromType,
polyglot.types.Type toType)
isImplicitCastValid in interface polyglot.types.TypeSystemisImplicitCastValid in class polyglot.types.TypeSystem_cpublic polyglot.types.Type staticTarget(polyglot.types.Type t)
staticTarget in interface polyglot.types.TypeSystemstaticTarget 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.TypeSystemequals in class polyglot.types.TypeSystem_c
public boolean typeEquals(polyglot.types.Type t1,
polyglot.types.Type t2)
typeEquals in interface polyglot.types.TypeSystemtypeEquals 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.TypeSystemleastCommonAncestor in class polyglot.types.TypeSystem_cpolyglot.types.SemanticException
public boolean numericConversionValid(polyglot.types.Type t,
java.lang.Object value)
numericConversionValid in interface polyglot.types.TypeSystemnumericConversionValid 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.TypeSystemclassContextResolver in class polyglot.types.TypeSystem_c
public polyglot.types.ParsedClassType createClassType(polyglot.types.LazyClassInitializer init,
polyglot.frontend.Source fromSource)
createClassType in interface polyglot.types.TypeSystemcreateClassType in class polyglot.types.TypeSystem_cpublic java.util.List defaultPackageImports()
defaultPackageImports in interface polyglot.types.TypeSystemdefaultPackageImports in class polyglot.types.TypeSystem_c
public LabeledType labeledType(polyglot.util.Position pos,
polyglot.types.Type type,
Label label)
labeledType in interface JifTypeSystempublic PathMap pathMap()
pathMap in interface JifTypeSystem
public PathMap pathMap(Path path,
Label L)
pathMap in interface JifTypeSystempublic 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 JifTypeSystempublic 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_cpolyglot.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.ParamTypeSystemsubst 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 JifTypeSystemprotected 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 JifTypeSystempublic UnknownPrincipal unknownPrincipal(polyglot.util.Position pos)
unknownPrincipal in interface JifTypeSystempublic TopPrincipal topPrincipal(polyglot.util.Position pos)
topPrincipal in interface JifTypeSystempublic 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 JifTypeSystempublic Label topLabel(polyglot.util.Position pos)
topLabel in interface JifTypeSystempublic Label topLabel()
topLabel in interface JifTypeSystempublic Label bottomLabel(polyglot.util.Position pos)
bottomLabel in interface JifTypeSystempublic Label bottomLabel()
bottomLabel in interface JifTypeSystempublic Label noComponentsLabel()
noComponentsLabel in interface JifTypeSystempublic Label noComponentsLabel(polyglot.util.Position pos)
noComponentsLabel in interface JifTypeSystempublic Label notTaken(polyglot.util.Position pos)
notTaken in interface JifTypeSystempublic 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 JifTypeSystempublic ConfPolicy bottomConfPolicy(polyglot.util.Position pos)
bottomConfPolicy in interface JifTypeSystempublic IntegPolicy bottomIntegPolicy(polyglot.util.Position pos)
bottomIntegPolicy in interface JifTypeSystempublic ConfPolicy topConfPolicy(polyglot.util.Position pos)
topConfPolicy in interface JifTypeSystempublic IntegPolicy topIntegPolicy(polyglot.util.Position pos)
topIntegPolicy in interface JifTypeSystem
public Label joinLabel(polyglot.util.Position pos,
java.util.Set components)
joinLabel in interface JifTypeSystempublic LabelToJavaExpr joinLabelTranslator()
public Label meetLabel(polyglot.util.Position pos,
java.util.Set components)
meetLabel in interface JifTypeSystempublic 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 JifTypeSystemprotected 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 JifTypeSystempublic Label callSitePCLabel(JifProcedureInstance pi)
callSitePCLabel in interface JifTypeSystempublic ThisLabel thisLabel(JifClassType ct)
thisLabel in interface JifTypeSystempublic 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 JifTypeSystemprotected 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 JifTypeSystempublic Label labelOfType(polyglot.types.Type type)
JifTypeSystem
labelOfType in interface JifTypeSystem
public Label labelOfType(polyglot.types.Type type,
Label defaultLabel)
JifTypeSystemdefaultLabel if unlabeled.
labelOfType in interface JifTypeSystemprotected polyglot.types.Type strip(polyglot.types.Type type)
public polyglot.types.Type unlabel(polyglot.types.Type type)
JifTypeSystem
unlabel in interface JifTypeSystempublic boolean isLabel(polyglot.types.Type type)
JifTypeSystem
isLabel in interface JifTypeSystempublic boolean isPrincipal(polyglot.types.Type type)
JifTypeSystem
isPrincipal in interface JifTypeSystempublic boolean isLabeled(polyglot.types.Type type)
JifTypeSystem
isLabeled in interface JifTypeSystempublic boolean isJifClass(polyglot.types.Type type)
isJifClass in interface JifTypeSystempublic boolean isMarkerFieldName(java.lang.String s)
JifTypeSystem
isMarkerFieldName in interface JifTypeSystempublic boolean isParamsRuntimeRep(polyglot.types.Type t)
JifTypeSystem
isParamsRuntimeRep in interface JifTypeSystempublic polyglot.types.ClassType hasUntrustedAncestor(polyglot.types.Type t)
hasUntrustedAncestor in interface JifTypeSystemt - 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.TypeSystemcanCoerceToString 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 JifTypeSystempublic ConfPolicy confProjection(Label L)
confProjection in interface JifTypeSystempublic 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.TypeSystemtranslateClass in class polyglot.types.TypeSystem_c
public java.lang.String translatePrimitive(polyglot.types.Resolver c,
polyglot.types.PrimitiveType t)
translatePrimitive in interface polyglot.types.TypeSystemtranslatePrimitive in class polyglot.types.TypeSystem_cpublic java.util.List abstractSuperInterfaces(polyglot.types.ReferenceType rt)
JifTypeSystem
abstractSuperInterfaces in interface JifTypeSystemabstractSuperInterfaces in class polyglot.types.TypeSystem_c
public boolean isAccessible(polyglot.types.MemberInstance mi,
polyglot.types.ClassType contextClass)
JifTypeSystem
isAccessible in interface JifTypeSystemisAccessible in interface polyglot.types.TypeSystemisAccessible in class polyglot.types.TypeSystem_c
public polyglot.types.PrimitiveType primitiveForName(java.lang.String name)
throws polyglot.types.SemanticException
primitiveForName in interface polyglot.types.TypeSystemprimitiveForName in class polyglot.types.TypeSystem_cpolyglot.types.SemanticExceptionpublic java.util.Collection uncheckedExceptions()
uncheckedExceptions in interface polyglot.types.TypeSystemuncheckedExceptions in class polyglot.types.TypeSystem_cpublic DefaultSignature defaultSignature()
defaultSignature in interface JifTypeSystem
public polyglot.types.ConstructorInstance defaultConstructor(polyglot.util.Position pos,
polyglot.types.ClassType container)
defaultConstructor in interface polyglot.types.TypeSystemdefaultConstructor in class polyglot.types.TypeSystem_cpublic LabelTypeCheckUtil labelTypeCheckUtil()
labelTypeCheckUtil in interface JifTypeSystem
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||