polyglot.ext.pao.types
Class PaoPrimitiveType_c
java.lang.Object
polyglot.ext.jl.types.TypeObject_c
polyglot.ext.jl.types.Type_c
polyglot.ext.jl.types.PrimitiveType_c
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
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 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.util.Copy |
copy |
PaoPrimitiveType_c
protected PaoPrimitiveType_c()
PaoPrimitiveType_c
public PaoPrimitiveType_c(TypeSystem ts,
PrimitiveType.Kind kind)
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