polyglot.ext.pao.types
Class PaoPrimitiveType_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.PrimitiveType_c
              extended by polyglot.ext.pao.types.PaoPrimitiveType_c
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Named, PrimitiveType, Qualifier, Type, TypeObject, Copy

public class PaoPrimitiveType_c
extends PrimitiveType_c

A PAO primitive type. In the PAO extension, primitives are considered a subtype of Object.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface polyglot.types.PrimitiveType
PrimitiveType.Kind
 
Field Summary
 
Fields inherited from class polyglot.ext.jl.types.PrimitiveType_c
kind
 
Fields inherited from class polyglot.ext.jl.types.TypeObject_c
position, ts
 
Fields inherited from interface polyglot.types.PrimitiveType
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, SHORT, VOID
 
Constructor Summary
protected PaoPrimitiveType_c()
           
  PaoPrimitiveType_c(TypeSystem ts, PrimitiveType.Kind kind)
           
 
Method Summary
 boolean descendsFromImpl(Type ancestor)
          Returns true if ancestor is the Object type, as primitives are considered a subtype of Object.
 boolean isCastValidImpl(Type toType)
          Returns true if the normal rules for casts hold, or if casting a primitive to Object, as primitives are considered a subtype of Object.
 boolean isImplicitCastValidImpl(Type toType)
          Returns true if the normal rules for implicit casts hold, or if casting a primitive to Object, as primitives are considered a subtype of Object.
 
Methods inherited from class polyglot.ext.jl.types.PrimitiveType_c
equalsImpl, fullName, hashCode, isBoolean, isByte, isCanonical, isChar, isDouble, isFloat, isInt, isIntOrLess, isLong, isLongOrLess, isNumeric, isPrimitive, isShort, isVoid, kind, name, numericConversionValidImpl, numericConversionValidImpl, toPrimitive, toString, translate, wrapperTypeString
 
Methods inherited from class polyglot.ext.jl.types.Type_c
arrayOf, arrayOf, descendsFrom, isArray, isCastValid, isClass, isComparable, isImplicitCastValid, isNull, isPackage, isReference, isSubtype, isSubtypeImpl, isThrowable, isType, isUncheckedException, numericConversionValid, numericConversionValid, toArray, toClass, toNull, toPackage, toReference, toType
 
Methods inherited from class polyglot.ext.jl.types.TypeObject_c
copy, equals, position, typeSystem
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.types.Type
arrayOf, arrayOf, descendsFrom, isArray, isCastValid, isClass, isComparable, isImplicitCastValid, isNull, isReference, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, numericConversionValid, numericConversionValid, toArray, toClass, toNull, toReference
 
Methods inherited from interface polyglot.types.Qualifier
isPackage, isType, toPackage, toType
 
Methods inherited from interface polyglot.types.TypeObject
position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Constructor Detail

PaoPrimitiveType_c

protected PaoPrimitiveType_c()

PaoPrimitiveType_c

public PaoPrimitiveType_c(TypeSystem ts,
                          PrimitiveType.Kind kind)
Method Detail

descendsFromImpl

public boolean descendsFromImpl(Type ancestor)
Returns true if ancestor is the Object type, as primitives are considered a subtype of Object.

Specified by:
descendsFromImpl in interface Type
Overrides:
descendsFromImpl in class PrimitiveType_c

isImplicitCastValidImpl

public boolean isImplicitCastValidImpl(Type toType)
Returns true if the normal rules for implicit casts hold, or if casting a primitive to Object, as primitives are considered a subtype of Object.

Specified by:
isImplicitCastValidImpl in interface Type
Overrides:
isImplicitCastValidImpl in class PrimitiveType_c

isCastValidImpl

public boolean isCastValidImpl(Type toType)
Returns true if the normal rules for casts hold, or if casting a primitive to Object, as primitives are considered a subtype of Object.

Specified by:
isCastValidImpl in interface Type
Overrides:
isCastValidImpl in class PrimitiveType_c