public class ArrayType extends MemoryLayoutType implements Cloneable
relaxedEqSem| Constructor and Description |
|---|
ArrayType(Type elementType,
SizeThunk sizeInBytes,
int length,
int cvAttributes) |
ArrayType(Type elementType,
SizeThunk sizeInBytes,
int length,
int cvAttributes,
ASTLocusTag astLocus) |
| Modifier and Type | Method and Description |
|---|---|
int |
arrayDimension()
Helper method for determining how many array dimentions this
type represents (i.e., "char[][]" returns 2).
|
ArrayType |
asArray()
Casts this to an ArrayType or returns null if not an ArrayType.
|
protected boolean |
equalSemanticsImpl(Type arg) |
protected boolean |
equalsImpl(Type arg) |
Type |
getBaseElementType()
Helper method to returns the bottom-most element type of this type.
|
Type |
getElementType() |
int |
getLength() |
String |
getName(boolean includeCVAttrs)
Returns the name of this type, optionally including
const/volatile attributes.
|
protected int |
hashCodeImpl() |
protected int |
hashCodeSemanticsImpl() |
boolean |
hasLength() |
boolean |
isAnon() |
String |
toString()
Returns a string representation of this type.
|
String |
toString(String variableName) |
void |
visit(TypeVisitor arg)
Traverse this
Type and all of its component types; for
example, the return type and argument types of a FunctionType. |
isLayouted, setLayoutedasBit, asCompound, asDouble, asEnum, asFloat, asFunction, asInt, asPointer, asVoid, clearCache, clone, equals, equalSemantics, getASTLocusTag, getCName, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getSize, getSize, getTargetType, hashCode, hashCodeSemantics, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isPrimitive, isTypedef, isVoid, isVolatile, newCVVariant, pointerDepth, setTypedefNamepublic ArrayType(Type elementType, SizeThunk sizeInBytes, int length, int cvAttributes, ASTLocusTag astLocus)
protected int hashCodeImpl()
hashCodeImpl in class Typeprotected boolean equalsImpl(Type arg)
equalsImpl in class Typeprotected int hashCodeSemanticsImpl()
hashCodeSemanticsImpl in class Typeprotected boolean equalSemanticsImpl(Type arg)
equalSemanticsImpl in class Typepublic String getName(boolean includeCVAttrs)
Typepublic final ArrayType asArray()
Typepublic Type getElementType()
public int getLength()
public boolean hasLength()
public final Type getBaseElementType()
TypeIf this is a multidimensional array or pointer method returns the bottom-most element type, otherwise this.
getBaseElementType in class Typepublic final int arrayDimension()
TypearrayDimension in class Typepublic String toString()
Typepublic void visit(TypeVisitor arg)
TypeType and all of its component types; for
example, the return type and argument types of a FunctionType.