public class VariableT extends WrappedT
| Modifier and Type | Class and Description |
|---|---|
static class |
VariableT.Kind
The variable kind.
|
| Constructor and Description |
|---|
VariableT(Type template,
Type type,
java.lang.String name,
int width)
Create a new bit-field.
|
VariableT(Type template,
Type type,
VariableT.Kind kind,
java.lang.String name)
Create a new variable type.
|
| Modifier and Type | Method and Description |
|---|---|
VariableT |
copy()
Create a deep copy of this type.
|
VariableT.Kind |
getKind()
Get the kind.
|
java.lang.String |
getName()
Get the name.
|
int |
getWidth()
Get this variable's width.
|
boolean |
hasKind(VariableT.Kind kind)
Determine whether this variable has the specified kind.
|
boolean |
hasName()
Determine whether this variable has a name.
|
boolean |
hasName(java.lang.String name)
Determine whether this variable has the specified name.
|
boolean |
hasVariable()
Determine whether this type contains a variable.
|
boolean |
hasWidth()
Determine whether this variable has a width.
|
boolean |
isVariable()
Determine whether this type is a variable.
|
static VariableT |
newBitfield(Type type,
java.lang.String name,
int width)
Create a new bitfield.
|
static VariableT |
newField(Type type,
java.lang.String name)
Create a new field.
|
static VariableT |
newGlobal(Type type,
java.lang.String name)
Create a new global variable.
|
static VariableT |
newLocal(Type type,
java.lang.String name)
Create a new local variable.
|
static VariableT |
newParam(Type type,
java.lang.String name)
Create a new parameter.
|
VariableT |
toVariable()
Get this type as a variable.
|
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified
appendable.
|
Type.Tag |
wtag()
Get this wrapped type's tag.
|
equals, getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, getType, hasAlias, hasAnnotated, hasAttribute, hasConstant, hasEnum, hasEnumerator, hashCode, hasInstantiated, hasLanguage, hasLocation, hasParameterized, hasScope, hasShape, hasTagged, isWrapped, resolve, seal, setType, tag, toAlias, toAnnotated, toEnum, toEnumerator, toInstantiated, toParameterized, toStructOrUnion, toTagged, toWrappedaddAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, deannotate, getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, hasAttribute, hasAttribute, hasAttribute, hasAttributes, hasConstant, hasError, hasLanguage, hasLocation, hasScope, hasShape, hasStructOrUnion, hasTag, hasWTag, isAlias, isAnnotated, isArray, isBoolean, isClass, isConcrete, isDerived, isEnum, isEnumerator, isError, isFloat, isFunction, isInstantiated, isInteger, isInterface, isInternal, isInternalParameter, isLabel, isMethod, isNamedParameter, isNumber, isPackage, isParameter, isParameterized, isPointer, isSealed, isStruct, isTuple, isUnion, isUnit, isVariant, isVoid, isWildcard, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, scope, seal, setLocation, setLocation, setProperty, shape, shape, toArray, toBoolean, toClass, toFloat, toFunction, toInteger, toInterface, toInternal, toInternalParameter, toLabel, toMethod, toNamedParameter, toNumber, toPackage, toParameter, toPointer, toStruct, toTuple, toUnion, toUnit, toVariant, toVoid, toWildcard, traceadd, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getNode, getProperty, getString, getStringProperty, getTokenText, hasProperty, hasTraversal, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, remove, set, size, strip, toAnnotation, toList, toString, toTokenpublic VariableT(Type template, Type type, VariableT.Kind kind, java.lang.String name)
template - The type whose annotations to copy.type - The type.kind - The kind.name - The name.public VariableT copy()
Typepublic Type.Tag wtag()
Typewtag in class TypeType.tag()public boolean isVariable()
TypeisVariable in class Typetrue if this type is a variable.public boolean hasVariable()
TypehasVariable in class WrappedTtrue if this type contains a variable.Node.hasTraversal()public VariableT toVariable()
TypetoVariable in class WrappedTpublic boolean hasKind(VariableT.Kind kind)
kind - The kind.true if this variable has the specified
kind.public VariableT.Kind getKind()
public boolean hasName()
true if this variable has a name.public boolean hasName(java.lang.String name)
public java.lang.String getName()
public boolean hasWidth()
true if this variable has a width.public int getWidth()
public void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().public static VariableT newGlobal(Type type, java.lang.String name)
type - The type.name - The name.public static VariableT newLocal(Type type, java.lang.String name)
type - The type.name - The name.public static VariableT newParam(Type type, java.lang.String name)
type - The type.name - The name.public static VariableT newField(Type type, java.lang.String name)
type - The type.name - The name.Copyright © 2014. All Rights Reserved.