| xtc.type.Type xtc.type.WrappedT xtc.type.VariableT
VariableT | public class VariableT extends WrappedT (Code) | | A variable. This pseudo-type captures the name for globals,
locals, parameters, fields, and bitfields. For the latter, it also
captures the field width.
author: Robert Grimm version: $Revision: 1.10 $ |
Inner Class :public static enum Kind | |
VariableT | public VariableT(Type template, Type type, Kind kind, String name)(Code) | | Create a new variable type.
Parameters: template - The type whose annotations to copy. Parameters: type - The type. Parameters: kind - The kind. Parameters: name - The name. |
VariableT | public VariableT(Type template, Type type, String name, int width)(Code) | | Create a new bit-field.
Parameters: template - The type whose annotations to copy. Parameters: type - The type. Parameters: name - The name. Parameters: width - The width. |
getKind | public Kind getKind()(Code) | | Get the kind.
The kind. |
getName | public String getName()(Code) | | Get the name.
The name. |
getWidth | public int getWidth()(Code) | | Get this variable's width. If this variable is a bitfield, this
method returns the bitfield's width. Otherwise, it returns -1.
This variable's width. |
hasKind | public boolean hasKind(Kind kind)(Code) | | Determine whether this variable has the specified kind.
Parameters: kind - The kind. true if this variable has the specifiedkind. |
hasName | public boolean hasName()(Code) | | Determine whether this variable has a name.
true if this variable has a name. |
hasName | public boolean hasName(String name)(Code) | | Determine whether this variable has the specified name.
Parameters: name - The name. true if this variable has the name. |
hasVariable | public boolean hasVariable()(Code) | | |
hasWidth | public boolean hasWidth()(Code) | | Determine whether this variable has a width.
true if this variable has a width. |
isVariable | public boolean isVariable()(Code) | | |
newBitfield | public static VariableT newBitfield(Type type, String name, int width)(Code) | | Create a new bitfield.
Parameters: type - The type. Parameters: name - The name. Parameters: width - The width. |
newField | public static VariableT newField(Type type, String name)(Code) | | Create a new field.
Parameters: type - The type. Parameters: name - The name. |
newGlobal | public static VariableT newGlobal(Type type, String name)(Code) | | Create a new global variable.
Parameters: type - The type. Parameters: name - The name. |
newLocal | public static VariableT newLocal(Type type, String name)(Code) | | Create a new local variable.
Parameters: type - The type. Parameters: name - The name. |
newParam | public static VariableT newParam(Type type, String name)(Code) | | Create a new parameter.
Parameters: type - The type. Parameters: name - The name. |
|
|