|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.sourceflow.CodeElement
org.sourceflow.c.CVariable
A class generating a C variable declaration.
| Field Summary | |
static int |
CONST
The const modifier constant. |
static int |
EXTERN
The extern modifier constant. |
static int |
STATIC
The static modifier constant. |
| Constructor Summary | |
CVariable(int modifiers,
java.lang.String type,
boolean array,
java.lang.String name)
Creates a new variable with the specified type and name. |
|
CVariable(java.lang.String type,
boolean array,
java.lang.String name)
Creates a new variable with the specified type and name. |
|
CVariable(java.lang.String type,
java.lang.String name)
Creates a new variable with the specified type and name. |
|
| Method Summary | |
void |
addComment(CComment comment)
Adds a comment to this variable. |
void |
addInitValue(java.lang.String value)
Adds an initialization value. |
int |
category()
Returns a numeric category number for the code element. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the code element to the specified output stream. |
java.lang.String |
toString()
Returns the variable name. |
| Methods inherited from class org.sourceflow.CodeElement |
compareTo, printSeparator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int STATIC
public static final int EXTERN
public static final int CONST
| Constructor Detail |
public CVariable(java.lang.String type,
java.lang.String name)
type - the variable typename - the variable name
public CVariable(java.lang.String type,
boolean array,
java.lang.String name)
type - the variable typearray - the array type flagname - the variable name
public CVariable(int modifiers,
java.lang.String type,
boolean array,
java.lang.String name)
modifiers - the modifier flags to use (or zero)type - the variable typearray - the array type flagname - the variable name| Method Detail |
public java.lang.String toString()
public void addInitValue(java.lang.String value)
value - the valuepublic void addComment(CComment comment)
comment - the comment to addpublic int category()
category in class CodeElement
public void print(java.io.PrintWriter out,
CodeStyle style,
int indent)
print in class CodeElementout - the output streamstyle - the code style to useindent - the indentation level
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||