|
|||||||||||
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.csharp.CSharpConstructor
A class generating a C# constructor declaration.
Field Summary | |
static int |
EXTERN
The extern modifier constant. |
static int |
INTERNAL
The internal access modifier constant. |
static int |
PRIVATE
The private access modifier constant. |
static int |
PROTECTED
The protected access modifier constant. |
static int |
PROTECTED_INTERNAL
The protected internal access modifier constant. |
static int |
PUBLIC
The public access modifier constant. |
Constructor Summary | |
CSharpConstructor()
Creates a new empty constructor. |
|
CSharpConstructor(int modifiers,
java.lang.String args)
Creates a new constructor with the specified arguments. |
|
CSharpConstructor(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(CSharpComment comment)
Sets a comment for this constructor. |
void |
addInitializer(java.lang.String initializer)
Adds an initializer call, i.e. a call to another constructor. |
int |
category()
Returns a numeric category number for the code element. |
CSharpClass |
getCSharpClass()
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_INTERNAL
public static final int PROTECTED
public static final int INTERNAL
public static final int PRIVATE
public static final int EXTERN
Constructor Detail |
public CSharpConstructor()
public CSharpConstructor(java.lang.String args)
args
- the argument list, excluding parenthesispublic CSharpConstructor(int modifiers, java.lang.String args)
modifiers
- the modifier flagsargs
- the argument list, excluding parenthesisMethod Detail |
public CSharpClass getCSharpClass()
public void addInitializer(java.lang.String initializer)
initializer
- the initializer callpublic void addCode(java.lang.String codeLines)
codeLines
- the lines of Java code to addpublic void addComment(CSharpComment 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 CodeElement
out
- 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 |