public class ClassInitializer extends JavaDeclaration implements MemberDeclaration, StatementContainer
| Modifier and Type | Field and Description | 
|---|---|
protected StatementBlock | 
body  | 
modArray| Constructor and Description | 
|---|
ClassInitializer()  | 
ClassInitializer(ExtList children)
Class initializer. 
 | 
ClassInitializer(Static modifier,
                StatementBlock body)  | 
| Modifier and Type | Method and Description | 
|---|---|
StatementBlock | 
getBody()  | 
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
      child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
Statement | 
getStatementAt(int index)  | 
int | 
getStatementCount()
Get the number of statements in this container. 
 | 
boolean | 
isBinary()
A binary class initializer does not occur. 
 | 
boolean | 
isPrivate()
Initializers are never private (at least not explicitly). 
 | 
boolean | 
isProtected()
Initializers are never protected. 
 | 
boolean | 
isPublic()
Initializers are never public. 
 | 
boolean | 
isStatic()
Test whether the declaration is static. 
 | 
boolean | 
isStrictFp()
Initializers are never strictfp. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
getModifiers, getStateCount, getVisibilityModifier, isAbstract, isFinal, isGhost, isModel, isNative, isSynchronized, isTransient, isVolatilecompatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetModifiersgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPositionprotected final StatementBlock body
public ClassInitializer()
public ClassInitializer(Static modifier, StatementBlock body)
public ClassInitializer(ExtList children)
children - list with all children. May include: a
        StatementBlock (taken as body of the ClassInitialiyer), 
        several Modifier (taken as modifiers of the declaration), a Commentpublic StatementBlock getBody()
public int getStatementCount()
StatementContainergetStatementCount in interface StatementContainerpublic Statement getStatementAt(int index)
getStatementAt in interface StatementContainerpublic int getChildCount()
NonTerminalProgramElementgetChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic boolean isBinary()
public boolean isPublic()
isPublic in interface MemberDeclarationisPublic in class JavaDeclarationpublic boolean isProtected()
isProtected in interface MemberDeclarationisProtected in class JavaDeclarationpublic boolean isPrivate()
isPrivate in interface MemberDeclarationisPrivate in class JavaDeclarationpublic boolean isStrictFp()
isStrictFp in interface MemberDeclarationisStrictFp in class JavaDeclarationpublic boolean isStatic()
isStatic in interface MemberDeclarationisStatic in class JavaDeclarationpublic SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getEndPosition()public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.