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, setLayouted
asBit, 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, setTypedefName
public ArrayType(Type elementType, SizeThunk sizeInBytes, int length, int cvAttributes, ASTLocusTag astLocus)
protected int hashCodeImpl()
hashCodeImpl
in class Type
protected boolean equalsImpl(Type arg)
equalsImpl
in class Type
protected int hashCodeSemanticsImpl()
hashCodeSemanticsImpl
in class Type
protected boolean equalSemanticsImpl(Type arg)
equalSemanticsImpl
in class Type
public String getName(boolean includeCVAttrs)
Type
public final ArrayType asArray()
Type
public Type getElementType()
public int getLength()
public boolean hasLength()
public final Type getBaseElementType()
Type
If this is a multidimensional array or pointer method returns the bottom-most element type, otherwise this.
getBaseElementType
in class Type
public final int arrayDimension()
Type
arrayDimension
in class Type
public String toString()
Type
public void visit(TypeVisitor arg)
Type
Type
and all of its component types; for
example, the return type and argument types of a FunctionType.