public class IntType extends PrimitiveType implements Cloneable
relaxedEqSem
Constructor and Description |
---|
IntType(String name,
SizeThunk size,
boolean unsigned,
int cvAttributes) |
IntType(String name,
SizeThunk size,
boolean unsigned,
int cvAttributes,
ASTLocusTag astLocus) |
IntType(String name,
SizeThunk size,
boolean unsigned,
int cvAttributes,
boolean isTypedef,
boolean typedefUnsigned,
ASTLocusTag astLocus)
Only for HeaderParser!
|
Modifier and Type | Method and Description |
---|---|
IntType |
asInt()
Casts this to an IntType or returns null if not an IntType.
|
protected boolean |
equalSemanticsImpl(Type arg) |
protected boolean |
equalsImpl(Type arg) |
String |
getCName(boolean includeCVAttrs)
Returns the name of this type, optionally including
const/volatile attributes.
|
protected int |
hashCodeImpl() |
protected int |
hashCodeSemanticsImpl() |
boolean |
isUnsigned()
Indicates whether this type is unsigned
|
boolean |
setTypedefName(String name)
Set the typedef name of this type and renders this type a typedef,
if given
name has a length. |
String |
toString()
Returns a string representation of this type.
|
isPrimitive
arrayDimension, asArray, asBit, asCompound, asDouble, asEnum, asFloat, asFunction, asPointer, asVoid, clearCache, clone, equals, equalSemantics, getASTLocusTag, getBaseElementType, getCName, getCVAttributes, getCVAttributesString, getDebugString, getName, getName, getSize, getSize, getTargetType, hashCode, hashCodeSemantics, isAnon, isArray, isBaseTypeConst, isBit, isCompound, isConst, isDouble, isEnum, isFloat, isFunction, isFunctionPointer, isInt, isPointer, isTypedef, isVoid, isVolatile, newCVVariant, pointerDepth, visit
public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, ASTLocusTag astLocus)
public IntType(String name, SizeThunk size, boolean unsigned, int cvAttributes, boolean isTypedef, boolean typedefUnsigned, ASTLocusTag astLocus)
name
- the namesize
- the sizeunsigned
- true if this instance is unsigned, not the typedef!cvAttributes
- the cvAttributes for this instance, not for the typedef!isTypedef
- true if this instance is a typedef varianttypedefUnsigned
- true if the typedef itself is unsignedastLocus
- the location in source codeprotected 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 IntType asInt()
Type
public boolean isUnsigned()
public String getCName(boolean includeCVAttrs)
Type
public String toString()
Type
public boolean setTypedefName(String name)
Type
name
has a length.
Method issues Type.clearCache()
, to force re-evaluation
of hashes.
setTypedefName
in class Type