|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.mjc.MjcPrettyPrinter
org.jmlspecs.jmlspec.JspPrettyPrinter
This class overrides some of the pretty-printer methods to produce a specification skeleton for the class AST begin walked.
| Field Summary | |
protected String |
ident
|
(package private) boolean |
inInterface
|
(package private) boolean |
interfaceIsPublic
|
(package private) static long |
modifiersToOmit
|
protected JspOptions |
options
Alias to the command-line options structure. |
protected String |
originalName
|
| Fields inherited from class org.multijava.mjc.MjcPrettyPrinter |
forInit, modUtil, nl, p, pos, TAB_SIZE, WIDTH |
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
JspPrettyPrinter(File file,
ModifierUtility modUtil,
JspOptions options,
String originalName)
construct a pretty printer object for java code |
|
| Method Summary | |
protected void |
doDefaultConstructor(ArrayList methods)
Checks if there are any constructors; if not adds a default constructor. |
boolean |
isVisible(long modifiers)
Returns true if the given member modifier value makes the class member visible with the current options.specLevel() setting. |
private void |
printAnnotationStart()
Print an annotations start. |
private void |
printClassAnnotationStart()
Print an annotations start. |
protected void |
printClassModifiers(JClassDeclaration self,
long modifiers)
|
void |
printDeprecatedIfAppropriate(JMemberDeclaration self)
|
protected void |
printInterfaceModifiers(JInterfaceDeclaration self,
long modifiers)
|
protected void |
visitClassBody(ArrayList inners,
ArrayList methods,
JPhylum[] fieldsAndInits)
|
void |
visitClassDeclaration(JClassDeclaration self)
prints a class declaration |
void |
visitCompilationUnit(JCompilationUnit self)
prints a compilation unit |
void |
visitConstructorDeclaration(JConstructorDeclaration self)
Adds an empty specification comment and does not print the body. |
void |
visitFieldDeclaration(JFieldDeclaration self)
prints a field declaration without any initializer |
void |
visitFormalParameters(JFormalParameter self)
prints a formal parameter, omitting "final" modifier |
protected void |
visitInterfaceBody(ArrayList methods,
JPhylum[] fieldsAndInits,
ArrayList inners)
|
void |
visitInterfaceDeclaration(JInterfaceDeclaration self)
prints an interface declaration |
void |
visitMethodDeclaration(JMethodDeclaration self)
Adds an empty specification comment and does not print the body. |
void |
visitTLMethodBody(JBlock body)
|
void |
visitTopLevelMethodDeclaration(MJTopLevelMethodDeclaration self)
prints an external method declaration |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected JspOptions options
protected String originalName
protected String ident
boolean inInterface
boolean interfaceIsPublic
static final long modifiersToOmit
| Constructor Detail |
public JspPrettyPrinter(File file,
ModifierUtility modUtil,
JspOptions options,
String originalName)
file - the file into which the code is generated| Method Detail |
public boolean isVisible(long modifiers)
public void visitCompilationUnit(JCompilationUnit self)
MjcPrettyPrinter
visitCompilationUnit in interface MjcVisitorvisitCompilationUnit in class MjcPrettyPrinterpublic void visitClassDeclaration(JClassDeclaration self)
MjcPrettyPrinter
visitClassDeclaration in interface MjcVisitorvisitClassDeclaration in class MjcPrettyPrinterpublic void visitInterfaceDeclaration(JInterfaceDeclaration self)
MjcPrettyPrinter
visitInterfaceDeclaration in interface MjcVisitorvisitInterfaceDeclaration in class MjcPrettyPrinter
protected void printInterfaceModifiers(JInterfaceDeclaration self,
long modifiers)
printInterfaceModifiers in class MjcPrettyPrinter
protected void printClassModifiers(JClassDeclaration self,
long modifiers)
printClassModifiers in class MjcPrettyPrinter
protected void visitClassBody(ArrayList inners,
ArrayList methods,
JPhylum[] fieldsAndInits)
visitClassBody in class MjcPrettyPrinterprotected void doDefaultConstructor(ArrayList methods)
protected void visitInterfaceBody(ArrayList methods,
JPhylum[] fieldsAndInits,
ArrayList inners)
visitInterfaceBody in class MjcPrettyPrinterprivate void printAnnotationStart()
private void printClassAnnotationStart()
public void visitMethodDeclaration(JMethodDeclaration self)
visitMethodDeclaration in interface MjcVisitorvisitMethodDeclaration in class MjcPrettyPrinterpublic void visitConstructorDeclaration(JConstructorDeclaration self)
visitConstructorDeclaration in interface MjcVisitorvisitConstructorDeclaration in class MjcPrettyPrinterpublic void visitTopLevelMethodDeclaration(MJTopLevelMethodDeclaration self)
visitTopLevelMethodDeclaration in interface MjcVisitorvisitTopLevelMethodDeclaration in class MjcPrettyPrinterpublic void visitTLMethodBody(JBlock body)
visitTLMethodBody in class MjcPrettyPrinterpublic void visitFieldDeclaration(JFieldDeclaration self)
visitFieldDeclaration in interface MjcVisitorvisitFieldDeclaration in class MjcPrettyPrinterpublic void visitFormalParameters(JFormalParameter self)
visitFormalParameters in interface MjcVisitorvisitFormalParameters in class MjcPrettyPrinterpublic void printDeprecatedIfAppropriate(JMemberDeclaration self)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||