|
|||||||||||
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.CodeElementContainer | +--net.percederberg.grammatica.code.csharp.CSharpType | +--net.percederberg.grammatica.code.csharp.CSharpClass
A class generating a C# class declaration.
Field Summary | |
static int |
ABSTRACT
The abstract modifier constant. |
static int |
INTERNAL
The internal access modifier constant. |
static int |
NEW
The new 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. |
static int |
SEALED
The sealed modifier constant. |
Constructor Summary | |
CSharpClass(int modifiers,
java.lang.String name)
Creates a new class code generator with the specified modifiers. |
|
CSharpClass(int modifiers,
java.lang.String name,
java.lang.String extendsClass)
Creates a new class code generator with the specified access modifier that extends the specified class. |
|
CSharpClass(int modifiers,
java.lang.String name,
java.lang.String[] extendClasses)
Creates a new class code generator with the specified access modifier that extends and implements the specified classes or interfaces. |
|
CSharpClass(java.lang.String name)
Creates a new class code generator with a public access modifier. |
Method Summary | |
void |
addClass(CSharpClass member)
Adds an inner class as a member. |
void |
addComment(CSharpComment comment)
Sets the type comment. |
void |
addEnumeration(CSharpEnumeration member)
Adds an enumeration as a member. |
int |
category()
Returns a numeric category number for the code element. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the class to the specified stream. |
protected void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent,
java.lang.String type)
Prints the type to the specified stream. |
protected void |
printSeparator(java.io.PrintWriter out,
CodeStyle style,
CodeElement prev,
CodeElement next)
Prints the lines separating two elements. |
java.lang.String |
toString()
Returns the type name. |
Methods inherited from class net.percederberg.grammatica.code.CodeElementContainer |
addElement, printContents |
Methods inherited from class net.percederberg.grammatica.code.CodeElement |
compareTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 ABSTRACT
public static final int SEALED
public static final int NEW
Constructor Detail |
public CSharpClass(java.lang.String name)
name
- the class namepublic CSharpClass(int modifiers, java.lang.String name)
modifiers
- the modifier flag constantsname
- the class namepublic CSharpClass(int modifiers, java.lang.String name, java.lang.String extendsClass)
modifiers
- the modifier flag constantsname
- the class nameextendsClass
- the class to extend or implementpublic CSharpClass(int modifiers, java.lang.String name, java.lang.String[] extendClasses)
modifiers
- the modifier flag constantsname
- the class nameextendClasses
- the classes to extend or implementMethod Detail |
public int category()
category
in class CodeElement
public void addClass(CSharpClass member)
member
- the inner class to addpublic void addEnumeration(CSharpEnumeration member)
member
- the enumeration to addpublic 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 levelpublic java.lang.String toString()
toString
in class java.lang.Object
public void addComment(CSharpComment comment)
comment
- the new type commentprotected void print(java.io.PrintWriter out, CodeStyle style, int indent, java.lang.String type)
out
- the output streamstyle
- the code style to useindent
- the indentation leveltype
- the type nameprotected void printSeparator(java.io.PrintWriter out, CodeStyle style, CodeElement prev, CodeElement next)
printSeparator
in class CodeElementContainer
out
- the output streamstyle
- the code style to useprev
- the previous element, or null if firstnext
- the next element, or null if last
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |