polyglot.ext.j0.types
Class J0TypeSystem_c

java.lang.Object
  extended bypolyglot.ext.jl.types.TypeSystem_c
      extended bypolyglot.ext.j0.types.J0TypeSystem_c
All Implemented Interfaces:
J0TypeSystem, TypeSystem

public class J0TypeSystem_c
extends TypeSystem_c
implements J0TypeSystem


Nested Class Summary
 
Nested classes inherited from class polyglot.ext.jl.types.TypeSystem_c
TypeSystem_c.MostSpecificComparator
 
Field Summary
 java.util.HashMap nameMap
           
 
Fields inherited from class polyglot.ext.jl.types.TypeSystem_c
ACCESS_FLAGS, BOOLEAN_, BYTE_, CHAR_, CLASS_, CONSTRUCTOR_FLAGS, defaultClassInit, DOUBLE_, FIELD_FLAGS, flagsForName, FLOAT_, INITIALIZER_FLAGS, INT_, loadedResolver, LOCAL_CLASS_FLAGS, LOCAL_FLAGS, LONG_, MEMBER_CLASS_FLAGS, METHOD_FLAGS, NULL_, OBJECT_, parsedResolver, SHORT_, STRING_, systemResolver, THROWABLE_, TOP_LEVEL_CLASS_FLAGS, unknownPackage, unknownQualifier, unknownType, VOID_
 
Constructor Summary
J0TypeSystem_c()
           
 
Method Summary
 void addStaticMethod(java.lang.String qualifiedName, java.lang.String name, java.util.List argTypes, J0MethodInstance mi)
          Add an imported static method to the type system.
 Context createContext()
          Create a new context object for looking up variables, types, etc.
 MethodInstance findMethod(ReferenceType container, java.lang.String name, java.util.List argTypes, ClassType currClass)
          Find a method.
 MethodInstance findStaticMethod(java.lang.String name, java.util.List argTypes)
          Find an imported static method.
 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.
 
Methods inherited from class polyglot.ext.jl.types.TypeSystem_c
Abstract, abstractSuperInterfaces, accessibleFromPackage, ArithmeticException, arrayOf, arrayOf, arrayOf, arrayOf, ArrayStoreException, arrayType, assert_, assert_, Boolean, Byte, callValid, canCoerceToString, canOverride, Char, checkAccessFlags, checkClassConformance, checkConstructorFlags, checkCycles, checkCycles, checkFieldFlags, checkInitializerFlags, checkLocalClassFlags, checkLocalFlags, checkMemberClassFlags, checkMethodFlags, checkOverride, checkTopLevelClassFlags, Class, classAccessible, classAccessible, classAccessibleFromPackage, ClassCastException, classContextResolver, Cloneable, constructorInstance, createClassType, createClassType, createClassType, createClassType, createNewFlag, createNull, createPackage, createPackage, createPrimitive, defaultClassInitializer, defaultConstructor, defaultPackageImports, descendsFrom, Double, equals, Error, Exception, fieldInstance, Final, findAcceptableConstructors, findAcceptableMethods, findConstructor, findConstructor, findField, findField, findField, findFields, findMemberClass, findMemberClass, findMemberClass, findMemberClasses, findMethod, findProcedure, flagsForBits, flagsForName, Float, forName, getTransformedClassName, getTypeEncoderRootSet, hasEnclosingInstance, hasFormals, hasMethod, hasMethodNamed, implemented, importTable, importTable, initFlags, initialize, initializerInstance, initTypes, Int, Interface, interfaces, isAccessible, isAccessible, isCanonical, isCastValid, isEnclosed, isImplicitCastValid, isSameMethod, isSubtype, isThrowable, isUncheckedException, leastCommonAncestor, listToString, load, loadedResolver, localInstance, Long, methodCallValid, moreSpecific, Native, NoFlags, Null, NullPointerException, numericConversionValid, numericConversionValid, Object, OutOfBoundsException, overrides, packageContextResolver, packageExists, packageForName, packageForName, parsedResolver, placeHolder, placeHolder, primitiveForName, Private, promote, promote, promoteNumeric, promoteNumeric, Protected, Public, RuntimeException, Serializable, Short, Static, staticTarget, StrictFP, String, superType, Synchronized, systemResolver, Throwable, throwsSubset, toString, Transient, translateArray, translateClass, translatePackage, translatePrimitive, typeForClass, typeForName, uncheckedExceptions, 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, 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, createNewFlag, createPackage, createPackage, defaultClassInitializer, defaultConstructor, defaultPackageImports, descendsFrom, Double, equals, Error, Exception, fieldInstance, Final, findConstructor, findConstructor, findField, findField, findField, findMemberClass, findMemberClass, findMemberClass, 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, 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
 

Field Detail

nameMap

public final java.util.HashMap nameMap
Constructor Detail

J0TypeSystem_c

public J0TypeSystem_c()
Method Detail

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

findStaticMethod

public MethodInstance findStaticMethod(java.lang.String name,
                                       java.util.List argTypes)
                                throws SemanticException
Description copied from interface: J0TypeSystem
Find an imported static method.

Specified by:
findStaticMethod in interface J0TypeSystem
Throws:
SemanticException

addStaticMethod

public void addStaticMethod(java.lang.String qualifiedName,
                            java.lang.String name,
                            java.util.List argTypes,
                            J0MethodInstance mi)
                     throws SemanticException
Description copied from interface: J0TypeSystem
Add an imported static method to the type system.

Specified by:
addStaticMethod in interface J0TypeSystem
Throws:
SemanticException

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

findMethod

public MethodInstance findMethod(ReferenceType container,
                                 java.lang.String name,
                                 java.util.List argTypes,
                                 ClassType currClass)
                          throws SemanticException
Description copied from interface: TypeSystem
Find a method. We need to pass the class from which the method is being found because the method we find depends on whether the method is accessible from that class. We also check if the field is accessible from the context 'c'.

Specified by:
findMethod in interface TypeSystem
Overrides:
findMethod in class TypeSystem_c
Throws:
SemanticException