public class PointerType extends Type implements Cloneable
relaxedEqSem| Constructor and Description |
|---|
PointerType(SizeThunk size,
Type targetType,
int cvAttributes) |
PointerType(SizeThunk size,
Type targetType,
int cvAttributes,
ASTLocusTag astLocus) |
| Modifier and Type | Method and Description |
|---|---|
PointerType |
asPointer()
Casts this to a PointerType or returns null if not a PointerType.
|
protected boolean |
equalSemanticsImpl(Type arg) |
protected boolean |
equalsImpl(Type arg) |
Type |
getBaseElementType()
Helper method to returns the bottom-most element type of this type.
|
String |
getCName(boolean includeCVAttrs)
Returns the name of this type, optionally including
const/volatile attributes.
|
String |
getName(boolean includeCVAttrs)
Returns the name of this type, optionally including
const/volatile attributes.
|
Type |
getTargetType()
Helper method to returns the target type of this type, in case another type is being referenced.
|
protected int |
hashCodeImpl() |
protected int |
hashCodeSemanticsImpl() |
boolean |
isAnon() |
boolean |
isFunctionPointer()
Convenience routine indicating whether this Type is a pointer to
a function.
|
int |
pointerDepth()
Helper method for determining how many pointer indirections this
type represents (i.e., "void **" returns 2).
|
String |
toString()
Returns a string representation of this type.
|
String |
toString(String functionName,
String callingConvention)
For use only when printing function pointers.
|
void |
visit(TypeVisitor arg)
Traverse this
Type and all of its component types; for
example, the return type and argument types of a FunctionType. |
arrayDimension, asArray, asBit, asCompound, asDouble, asEnum, asFloat, asFunction, asInt, asVoid, clearCache, clone, equals, equalSemantics, getASTLocusTag, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getSize, getSize, hashCode, hashCodeSemantics, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isInt, isPointer, isPrimitive, isTypedef, isVoid, isVolatile, newCVVariant, setTypedefNamepublic PointerType(SizeThunk size, Type targetType, 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 String getCName(boolean includeCVAttrs)
Typepublic final PointerType asPointer()
Typepublic final Type getTargetType()
TypegetTargetType in class Typepublic 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 boolean isFunctionPointer()
TypeisFunctionPointer in class Typepublic final int pointerDepth()
TypepointerDepth in class Typepublic String toString()
Typepublic String toString(String functionName, String callingConvention)
public void visit(TypeVisitor arg)
TypeType and all of its component types; for
example, the return type and argument types of a FunctionType.