polyglot.ext.pao.types
Class PaoParsedClassType_c

java.lang.Object
  extended by polyglot.ext.jl.types.TypeObject_c
      extended by polyglot.ext.jl.types.Type_c
          extended by polyglot.ext.jl.types.ReferenceType_c
              extended by polyglot.ext.jl.types.ClassType_c
                  extended by polyglot.ext.jl.types.ParsedClassType_c
                      extended by polyglot.ext.pao.types.PaoParsedClassType_c
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ClassType, Importable, MemberInstance, Named, ParsedClassType, Qualifier, ReferenceType, Type, TypeObject, Copy

public class PaoParsedClassType_c
extends ParsedClassType_c

A PAO class type. This class overrides the method isCastValidImpl(Type) to allow casting from Object to primitives.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface polyglot.types.ClassType
ClassType.Kind
 
Field Summary
 
Fields inherited from class polyglot.ext.jl.types.ParsedClassType_c
constructors, fields, flags, fromSource, init, inStaticContext, interfaces, kind, memberClasses, methods, name, outer, package_, superType
 
Fields inherited from class polyglot.ext.jl.types.TypeObject_c
position, ts
 
Fields inherited from interface polyglot.types.ClassType
ANONYMOUS, LOCAL, MEMBER, TOP_LEVEL
 
Constructor Summary
protected PaoParsedClassType_c()
           
  PaoParsedClassType_c(TypeSystem ts, LazyClassInitializer init, Source fromSource)
           
 
Method Summary
 boolean isCastValidImpl(Type toType)
          Returns true if normal casting rules permit this cast, or if this ClassType is Object and the toType is a primitive.
 
Methods inherited from class polyglot.ext.jl.types.ParsedClassType_c
addConstructor, addField, addInterface, addMemberClass, addMethod, constructors, fields, flags, flags, freeInit, fromSource, initialized, inStaticContext, inStaticContext, interfaces, kind, kind, memberClasses, methods, name, name, outer, outer, package_, package_, position, superType, superType
 
Methods inherited from class polyglot.ext.jl.types.ClassType_c
container, descendsFromImpl, fieldNamed, fullName, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isCanonical, isClass, isEnclosed, isEnclosedImpl, isImplicitCastValidImpl, isInner, isInnerClass, isLocal, isMember, isNested, isThrowable, isTopLevel, isUncheckedException, memberClassNamed, toClass, toString, translate
 
Methods inherited from class polyglot.ext.jl.types.ReferenceType_c
hasMethod, hasMethodImpl, isReference, methods, methodsNamed, toReference
 
Methods inherited from class polyglot.ext.jl.types.Type_c
arrayOf, arrayOf, descendsFrom, isArray, isBoolean, isByte, isCastValid, isChar, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPackage, isPrimitive, isShort, isSubtype, isSubtypeImpl, isType, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toNull, toPackage, toPrimitive, toType
 
Methods inherited from class polyglot.ext.jl.types.TypeObject_c
copy, equals, equalsImpl, hashCode, position, typeSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.types.ClassType
fieldNamed, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isEnclosed, isEnclosedImpl, isInner, isInnerClass, isLocal, isMember, isNested, isTopLevel, memberClassNamed
 
Methods inherited from interface polyglot.types.Named
fullName
 
Methods inherited from interface polyglot.types.ReferenceType
hasMethod, hasMethodImpl, methods, methodsNamed
 
Methods inherited from interface polyglot.types.Type
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isArray, isBoolean, isByte, isCastValid, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isImplicitCastValidImpl, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toClass, toNull, toPrimitive, toReference, toString, translate
 
Methods inherited from interface polyglot.types.Qualifier
isPackage, isType, toPackage, toType
 
Methods inherited from interface polyglot.types.MemberInstance
container
 

Constructor Detail

PaoParsedClassType_c

protected PaoParsedClassType_c()

PaoParsedClassType_c

public PaoParsedClassType_c(TypeSystem ts,
                            LazyClassInitializer init,
                            Source fromSource)
Method Detail

isCastValidImpl

public boolean isCastValidImpl(Type toType)
Returns true if normal casting rules permit this cast, or if this ClassType is Object and the toType is a primitive.

Specified by:
isCastValidImpl in interface Type
Overrides:
isCastValidImpl in class ClassType_c
See Also:
ClassType_c.isCastValidImpl(Type)