polyglot.ext.op
Class OPPrimitiveType_c
java.lang.Object
polyglot.ext.jl.types.TypeObject_c
polyglot.ext.jl.types.Type_c
polyglot.ext.jl.types.PrimitiveType_c
polyglot.ext.op.OPPrimitiveType_c
- All Implemented Interfaces:
- java.lang.Cloneable, Copy, Named, PrimitiveType, Qualifier, java.io.Serializable, Type, TypeObject
- public class OPPrimitiveType_c
- extends PrimitiveType_c
An PrimitiveType_c
represents a primitive type.
- See Also:
- Serialized Form
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 |
OPPrimitiveType_c
protected OPPrimitiveType_c()
- Used for deserializing types.
OPPrimitiveType_c
public OPPrimitiveType_c(PrimitiveType.Kind kind)
descendsFromImpl
public boolean descendsFromImpl(Type ancestor)
- Description copied from interface:
Type
- Return true if this type descends from
ancestor
.
- Specified by:
descendsFromImpl
in interface Type
- Overrides:
descendsFromImpl
in class PrimitiveType_c
isImplicitCastValidImpl
public boolean isImplicitCastValidImpl(Type toType)
- Description copied from interface:
Type
- Return true if a value of this type can be assigned to a variable of
type
toType
.
- Specified by:
isImplicitCastValidImpl
in interface Type
- Overrides:
isImplicitCastValidImpl
in class PrimitiveType_c
isCastValidImpl
public boolean isCastValidImpl(Type toType)
- Requires: all type arguments are canonical. ToType is not a NullType.
Returns true iff a cast from this to toType is valid; in other
words, some non-null members of this are also members of toType.
- Specified by:
isCastValidImpl
in interface Type
- Overrides:
isCastValidImpl
in class PrimitiveType_c