polyglot.ext.carray.types
Class ConstArrayType_c

java.lang.Object
  extended bypolyglot.ext.jl.types.TypeObject_c
      extended bypolyglot.ext.jl.types.Type_c
          extended bypolyglot.ext.jl.types.ReferenceType_c
              extended bypolyglot.ext.jl.types.ArrayType_c
                  extended bypolyglot.ext.carray.types.ConstArrayType_c
All Implemented Interfaces:
ArrayType, java.lang.Cloneable, ConstArrayType, Copy, Qualifier, ReferenceType, java.io.Serializable, Type, TypeObject

public class ConstArrayType_c
extends ArrayType_c
implements ConstArrayType

A ConstArrayType represents an array of base java types, whose elements cannot change after initialization.

See Also:
Serialized Form

Field Summary
protected  boolean isConst
           
 
Fields inherited from class polyglot.ext.jl.types.ArrayType_c
base, fields, interfaces, methods
 
Fields inherited from class polyglot.ext.jl.types.TypeObject_c
position, ts
 
Constructor Summary
protected ConstArrayType_c()
          Used for deserializing types.
  ConstArrayType_c(TypeSystem ts, Position pos, Type base, boolean isConst)
           
 
Method Summary
 boolean equalsImpl(TypeObject o)
          Return true iff this type object is the same as t.
 boolean isConst()
           
 boolean isImplicitCastValidImpl(Type toType)
          Return true if a value of this type can be assigned to a variable of type toType.
 java.lang.String toString()
          Yields a string representing this type.
 
Methods inherited from class polyglot.ext.jl.types.ArrayType_c
base, base, cloneMethod, dims, fieldNamed, fields, hashCode, interfaces, isArray, isCanonical, isCastValidImpl, lengthField, methods, superType, toArray, translate, ultimateBase
 
Methods inherited from class polyglot.ext.jl.types.ReferenceType_c
descendsFromImpl, hasMethod, hasMethodImpl, isReference, methods, methodsNamed, toReference
 
Methods inherited from class polyglot.ext.jl.types.Type_c
arrayOf, arrayOf, descendsFrom, isBoolean, isByte, isCastValid, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPackage, isPrimitive, isShort, isSubtype, isSubtypeImpl, isThrowable, isType, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toClass, toNull, toPackage, toPrimitive, 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.ArrayType
base, base, cloneMethod, dims, lengthField, ultimateBase
 
Methods inherited from interface polyglot.types.ReferenceType
fieldNamed, fields, hasMethod, hasMethodImpl, interfaces, methods, methods, methodsNamed, superType
 
Methods inherited from interface polyglot.types.Type
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isArray, isBoolean, isByte, isCastValid, isCastValidImpl, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toClass, toNull, toPrimitive, toReference, translate
 
Methods inherited from interface polyglot.types.Qualifier
isPackage, isType, toPackage, toType
 
Methods inherited from interface polyglot.types.TypeObject
isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Field Detail

isConst

protected boolean isConst
Constructor Detail

ConstArrayType_c

protected ConstArrayType_c()
Used for deserializing types.


ConstArrayType_c

public ConstArrayType_c(TypeSystem ts,
                        Position pos,
                        Type base,
                        boolean isConst)
Method Detail

toString

public java.lang.String toString()
Description copied from interface: Type
Yields a string representing this type. The string should be consistent with equality. That is, if this.equals(anotherType), then it should be that this.toString().equals(anotherType.toString()). The string does not have to be a legal Java identifier. It is suggested, but not required, that it be an easily human readable representation, and thus useful in error messages and generated output.

Specified by:
toString in interface Type
Overrides:
toString in class ArrayType_c

equalsImpl

public boolean equalsImpl(TypeObject o)
Description copied from interface: TypeObject
Return true iff this type object is the same as t. All Polyglot extensions should attempt to maintain pointer equality between TypeObjects. If this cannot be done, extensions can override TypeObject_c.equalsImpl(), and don't forget to override hashCode().

Specified by:
equalsImpl in interface TypeObject
Overrides:
equalsImpl in class ArrayType_c

isConst

public boolean isConst()
Specified by:
isConst in interface ConstArrayType

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 ArrayType_c