polyglot.ext.op
Class OPPrimitiveType_c

java.lang.Object
  extended bypolyglot.ext.jl.types.TypeObject_c
      extended bypolyglot.ext.jl.types.Type_c
          extended bypolyglot.ext.jl.types.PrimitiveType_c
              extended bypolyglot.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

Nested Class Summary
 
Nested classes inherited from class 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 OPPrimitiveType_c()
          Used for deserializing types.
  OPPrimitiveType_c(PrimitiveType.Kind kind)
           
 
Method Summary
 boolean descendsFromImpl(Type ancestor)
          Return true if this type descends from ancestor.
 boolean isCastValidImpl(Type toType)
          Requires: all type arguments are canonical.
 boolean isImplicitCastValidImpl(Type toType)
          Return true if a value of this type can be assigned to a variable of type toType.
 
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

OPPrimitiveType_c

protected OPPrimitiveType_c()
Used for deserializing types.


OPPrimitiveType_c

public OPPrimitiveType_c(PrimitiveType.Kind kind)
Method Detail

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