|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.percederberg.grammatica.code.CodeElement
|
+--net.percederberg.grammatica.code.java.JavaConstructor
A class generating a Java constructor declaration.
| Field Summary | |
static int |
PACKAGE_LOCAL
The package local access modifier constant (i.e. no modifier). |
static int |
PRIVATE
The private access modifier constant. |
static int |
PROTECTED
The protected access modifier constant. |
static int |
PUBLIC
The public access modifier constant. |
| Constructor Summary | |
JavaConstructor()
Creates a new empty constructor. |
|
JavaConstructor(int modifiers,
java.lang.String args)
Creates a new constructor with the specified arguments. |
|
JavaConstructor(java.lang.String args)
Creates a new constructor with the specified arguments. |
|
| Method Summary | |
void |
addCode(java.lang.String codeLines)
Adds one or more lines of actual code. |
void |
addComment(JavaComment comment)
Sets a comment for this constructor. |
void |
addThrows(java.lang.String className)
Adds a class to the list of exceptions thrown. |
int |
category()
Returns a numeric category number for the code element. |
JavaClass |
getJavaClass()
Returns the class for this constructor, or null. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the code element to the specified output stream. |
| Methods inherited from class net.percederberg.grammatica.code.CodeElement |
compareTo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PUBLIC
public static final int PROTECTED
public static final int PACKAGE_LOCAL
public static final int PRIVATE
| Constructor Detail |
public JavaConstructor()
public JavaConstructor(java.lang.String args)
args - the argument list, excluding parenthesis
public JavaConstructor(int modifiers,
java.lang.String args)
modifiers - the modifier flagsargs - the argument list, excluding parenthesis| Method Detail |
public JavaClass getJavaClass()
public void addThrows(java.lang.String className)
className - the name of the exception thrownpublic void addCode(java.lang.String codeLines)
codeLines - the lines of Java code to addpublic void addComment(JavaComment comment)
comment - the new constructor commentpublic 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 | ||||||||||