|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.sourceflow.CodeElement
org.sourceflow.c.CFunction
A class generating a C function declaration.
| Field Summary | |
static int |
STATIC
The static modifier constant. |
| Constructor Summary | |
CFunction(int modifiers,
java.lang.String name,
java.lang.String args,
java.lang.String returnType)
Creates a new function with the specified arguments. |
|
CFunction(java.lang.String name)
Creates a new function with the specified name. |
|
CFunction(java.lang.String name,
java.lang.String args)
Creates a new function with the specified name and arguments. |
|
CFunction(java.lang.String name,
java.lang.String args,
java.lang.String returnType)
Creates a new function with the specified name, arguments and return type. |
|
| Method Summary | |
void |
addCode(java.lang.String codeLines)
Adds one or more lines of actual code. |
void |
addComment(CComment comment)
Sets a comment for this function. |
boolean |
canPrintCode()
Checks if the method source code can the printed. |
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. |
void |
setPrintCode(boolean value)
Sets the print code flag. |
java.lang.String |
toString()
Returns the function 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
| Constructor Detail |
public CFunction(java.lang.String name)
name - the function name
public CFunction(java.lang.String name,
java.lang.String args)
name - the function nameargs - the argument list, excluding parenthesis
public CFunction(java.lang.String name,
java.lang.String args,
java.lang.String returnType)
name - the function nameargs - the argument list, excluding parenthesisreturnType - the return type
public CFunction(int modifiers,
java.lang.String name,
java.lang.String args,
java.lang.String returnType)
modifiers - the modifier flags to use (or zero)name - the function nameargs - the argument list, excluding parenthesisreturnType - the return type| Method Detail |
public java.lang.String toString()
public void addCode(java.lang.String codeLines)
codeLines - the lines of C code to addpublic void addComment(CComment comment)
comment - the new function commentpublic int category()
category in class CodeElementpublic boolean canPrintCode()
public void setPrintCode(boolean value)
value - the new print code flag value
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 | ||||||||||