polyglot.types
Interface TypeObject

All Superinterfaces:
java.lang.Cloneable, Copy, java.io.Serializable
All Known Subinterfaces:
ArrayType, ClassType, CodeInstance, CofferClassType, CofferConstructorInstance, CofferMethodInstance, CofferParsedClassType, CofferProcedureInstance, CofferSubstType, ConstructorInstance, FieldInstance, Importable, InitializerInstance, InstKey, InstType, Key, KeySet, LocalInstance, MemberInstance, MethodInstance, MuPClass, Named, NullType, Package, Param, ParamKey, ParsedClassType, PClass, PrimitiveType, ProcedureInstance, Qualifier, ReferenceType, SubstType, Type, UnknownKey, UnknownPackage, UnknownQualifier, UnknownType, VarInstance
All Known Implementing Classes:
ArrayType_c, ClassType_c, CofferConstructorInstance_c, CofferMethodInstance_c, CofferParsedClassType_c, CofferSubstClassType_c, ConstructorInstance_c, FieldInstance_c, InitializerInstance_c, InstKey_c, Key_c, KeySet_c, LocalInstance_c, MethodInstance_c, MuPClass_c, NullType_c, Package_c, PaoParsedClassType_c, PaoPrimitiveType_c, ParamKey_c, ParsedClassType_c, PClass_c, PrimitiveType_c, ProcedureInstance_c, ReferenceType_c, SubstClassType_c, ThrowConstraint_c, Type_c, TypeObject_c, UnknownKey_c, UnknownPackage_c, UnknownQualifier_c, UnknownType_c, VarInstance_c

public interface TypeObject
extends Copy, java.io.Serializable

A TypeObject is a compile-time value created by the type system. It is a static representation of a type that is not necessarily first-class. It is similar to a compile-time meta-object.


Method Summary
 boolean equalsImpl(TypeObject t)
          Return true iff this type object is the same as t.
 boolean isCanonical()
          Return true if the type object contains no unknown/ambiguous types.
 Position position()
          The object's position, or null.
 TypeSystem typeSystem()
          The object's type system.
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

isCanonical

boolean isCanonical()
Return true if the type object contains no unknown/ambiguous types.


typeSystem

TypeSystem typeSystem()
The object's type system.


position

Position position()
The object's position, or null.


equalsImpl

boolean equalsImpl(TypeObject t)
Return true iff this type object is the same as t. All Polyglot extensions should attempt to maintain pointer equality between TypeObjects. If this cannot be done, extensions can override TypeObject_c.equalsImpl(), and don't forget to override hashCode().

See Also:
TypeObject_c.equalsImpl(TypeObject), Object.hashCode()