Method Summary |
|
public void | changeLevel(int delta) Change level. |
protected static String | encodeUnicodeChars(String str) Replace all unicode characters above ?
by their explicite representation.
Parameters: str - the input string. |
public int | getColumn() Get current column number. |
protected int | getCurrentPos() |
protected int | getIndentation() Get indentation amount (blanks per level). |
public int | getIndentationLevel() Get indentation level. |
public int | getLine() Get current line number. |
public Range | getRangeOfFirstExecutableStatement() |
public int | getTotalIndentation() Get total indentation. |
public static String | getTypeNameForAccessMethods(String typeName) |
protected boolean | isOverwritingIndentation() Returns true if the pretty printer should also reformat existing
code. |
protected boolean | isOverwritingParsePositions() Returns true if the pretty printer should reset the parse positions
accordingly. |
protected void | markEnd(int n, Object stmt) Marks the end of the first executable statement ... |
protected void | markStart(int n, Object stmt) Marks the start of the first executable statement ... |
protected void | output() |
public void | printArrayDeclaration(ArrayDeclaration type) |
public void | printArrayInitializer(ArrayInitializer x) |
public void | printArrayLengthReference(ArrayLengthReference x) |
public void | printArrayReference(ArrayReference x) |
public void | printAssert(Assert x) |
public void | printBinaryAnd(BinaryAnd x) |
public void | printBinaryAndAssignment(BinaryAndAssignment x) |
public void | printBinaryNot(BinaryNot x) |
public void | printBinaryOr(BinaryOr x) |
public void | printBinaryOrAssignment(BinaryOrAssignment x) |
public void | printBinaryXOr(BinaryXOr x) |
public void | printBinaryXOrAssignment(BinaryXOrAssignment x) |
public void | printBooleanLiteral(BooleanLiteral x) |
public void | printBreak(Break x) |
public void | printCase(Case x) |
public void | printCatch(Catch x) |
public void | printCatchAllStatement(CatchAllStatement x) |
public void | printCharLiteral(CharLiteral x) |
public void | printClassDeclaration(ClassDeclaration x) |
public void | printClassInitializer(ClassInitializer x) |
public void | printComment(Comment x) |
public void | printCompilationUnit(CompilationUnit x) |
public void | printConditional(Conditional x) |
public void | printContextStatementBlock(ContextStatementBlock x) |
public void | printContinue(Continue x) |
public void | printCopyAssignment(CopyAssignment x) |
public void | printDefault(Default x) |
public void | printDivide(Divide x) |
public void | printDivideAssignment(DivideAssignment x) |
public void | printDo(Do x) |
public void | printDoubleLiteral(DoubleLiteral x) |
public void | printElse(Else x) |
public void | printEmptyStatement(EmptyStatement x) |
public void | printEquals(Equals x) |
public void | printExactInstanceof(ExactInstanceof x) |
public void | printExecutionContext(ExecutionContext x) |
public void | printExtends(Extends x) |
public void | printFieldDeclaration(FieldDeclaration x) |
public void | printFieldReference(FieldReference x) |
public void | printFinally(Finally x) |
public void | printFloatLiteral(FloatLiteral x) |
protected void | printFooter(ProgramElement x) Print program element footer. |
public void | printFor(For x) |
public void | printGreaterOrEquals(GreaterOrEquals x) |
public void | printGreaterThan(GreaterThan x) |
protected void | printHeader(int lf, int blanks, ProgramElement elem) Print program element header. |
protected void | printHeader(int blanks, ProgramElement elem) Print program element header. |
protected void | printHeader(ProgramElement elem) Print program element header. |
protected void | printHeader(int lf, int levelChange, int blanks, ProgramElement x) Print program element header. |
public void | printIf(If x) |
public void | printImplements(Implements x) |
public void | printImport(Import x) |
public void | printInstanceof(Instanceof x) |
public void | printIntLiteral(IntLiteral x) |
public void | printInterfaceDeclaration(InterfaceDeclaration x) |
public void | printLabeledStatement(LabeledStatement x) |
public void | printLessOrEquals(LessOrEquals x) |
public void | printLessThan(LessThan x) |
public void | printLocalVariableDeclaration(LocalVariableDeclaration x) |
public void | printLogicalAnd(LogicalAnd x) |
public void | printLogicalNot(LogicalNot x) |
public void | printLogicalOr(LogicalOr x) |
public void | printLongLiteral(LongLiteral x) |
public void | printMetaClassReference(MetaClassReference x) |
public void | printMethod(ProgramMethod x) |
public void | printMethodBodyStatement(MethodBodyStatement x) |
public void | printMethodDeclaration(MethodDeclaration x) |
public void | printMethodFrame(MethodFrame x) |
public void | printMethodReference(MethodReference x) |
public void | printMinus(Minus x) |
public void | printMinusAssignment(MinusAssignment x) |
public void | printModifier(Modifier x) |
public void | printModulo(Modulo x) |
public void | printModuloAssignment(ModuloAssignment x) |
public void | printNegative(Negative x) |
public void | printNew(New x) |
public void | printNewArray(NewArray x) |
public void | printNotEquals(NotEquals x) |
public void | printNullLiteral(NullLiteral x) |
protected void | printOperator(Operator x, String symbol) |
public void | printPackageReference(PackageReference x) |
public void | printPackageSpecification(PackageSpecification x) |
public void | printParenthesizedExpression(ParenthesizedExpression x) |
public void | printPassiveExpression(PassiveExpression x) |
public void | printPlus(Plus x) |
public void | printPlusAssignment(PlusAssignment x) |
public void | printPositive(Positive x) |
public void | printPostDecrement(PostDecrement x) |
public void | printPostIncrement(PostIncrement x) |
public void | printPreDecrement(PreDecrement x) |
public void | printPreIncrement(PreIncrement x) |
public void | printProgramElementName(ProgramElementName x) |
public void | printProgramMetaConstruct(ProgramMetaConstruct x) |
public void | printProgramMethod(ProgramMethod x) |
public void | printProgramSVProxy(ProgramSVProxy x) |
public void | printProgramVariable(ProgramVariable x) |
public void | printReturn(Return x) |
public void | printSchemaTypeReference(SchemaTypeReference x) |
public void | printSchemaVariable(SchemaVariable x) |
public void | printShiftLeft(ShiftLeft x) |
public void | printShiftLeftAssignment(ShiftLeftAssignment x) |
public void | printShiftRight(ShiftRight x) |
public void | printShiftRightAssignment(ShiftRightAssignment x) |
public void | printStatementBlock(StatementBlock x) |
public void | printStringLiteral(StringLiteral x) |
public void | printSuperConstructorReference(SuperConstructorReference x) |
public void | printSuperReference(SuperReference x) |
public void | printSwitch(Switch x) |
public void | printSynchronizedBlock(SynchronizedBlock x) |
public void | printThen(Then x) |
public void | printThisConstructorReference(ThisConstructorReference x) |
public void | printThisReference(ThisReference x) |
public void | printThrow(Throw x) |
public void | printThrows(Throws x) |
public void | printTimes(Times x) |
public void | printTimesAssignment(TimesAssignment x) |
public void | printTry(Try x) |
public void | printTypeCast(TypeCast x) |
public void | printTypeReference(TypeReference x) |
public void | printUnsignedShiftRight(UnsignedShiftRight x) |
public void | printUnsignedShiftRightAssignment(UnsignedShiftRightAssignment x) |
public void | printVariableDeclaration(VariableDeclaration x) |
public void | printVariableSpecification(VariableSpecification x) |
public void | printWhile(While x) |
public void | reset() Resets the state of this pretty printer ... |
protected void | scheduleComment(SingleLineComment slc) Store the given comment until the next line feed is written. |
public void | setIndentationLevel(int level) Set indentation level. |
public void | setWriter(Writer out) Set a new stream to write to. |
public void | write(int c) Write. |
public void | write(char[] cbuf) Write. |
public void | write(char[] cbuf, int off, int len) Write. |
public void | write(String str) Write. |
public void | write(String str, int off, int len) Write. |
protected void | writeArrayOfProgramElement(int firstLF, int levelChange, int firstBlanks, String separationSymbol, int separationLF, int separationBlanks, ArrayOfProgramElement list) Write a complete ArrayOfProgramElement. |
protected void | writeBlockList(int firstLF, int levelChange, int firstBlanks, ArrayOfProgramElement list) Write a complete ArrayOfProgramElement using "Block" style. |
protected void | writeBlockList(ArrayOfProgramElement list) Write block list. |
protected void | writeCommaList(int firstLF, int levelChange, int firstBlanks, ArrayOfProgramElement list) Write a complete ArrayOfProgramElement using "Comma" style. |
protected void | writeCommaList(int separationBlanks, ArrayOfProgramElement list) Write comma list. |
protected void | writeCommaList(ArrayOfProgramElement list) Write comma list. |
protected void | writeElement(int lf, int levelChange, int blanks, SourceElement elem) Adds indentation for a program element if necessary and if required,
but does not print the indentation itself. |
protected void | writeElement(int lf, int blanks, SourceElement elem) Write a source element. |
protected void | writeElement(int blanks, SourceElement elem) Write source element. |
protected void | writeElement(SourceElement elem) Write source element. |
protected void | writeIndentation(int lf, int blanks) Convenience method to write indentation chars. |
protected void | writeIndentation(Position relative) Convenience method to write indentation chars. |
protected void | writeIndentation(SourceElement elem) Write indentation. |
protected void | writeInternalIndentation(SourceElement elem) Write internal indentation. |
protected void | writeKeywordList(int firstLF, int levelChange, int firstBlanks, ArrayOfProgramElement list) Write a complete ArrayOfProgramElement using "Keyword" style. |
protected void | writeKeywordList(ArrayOfProgramElement list) Write keyword list. |
protected void | writeLineList(int firstLF, int levelChange, int firstBlanks, ArrayOfProgramElement list) Write a complete ArrayOfProgramElement using "Line" style. |
protected void | writeLineList(ArrayOfProgramElement list) Write line list. |
protected void | writeSymbol(int lf, int levelChange, String symbol) Write symbol. |
protected void | writeToken(int lf, int blanks, String image, NonTerminalProgramElement parent) Writes an implicit terminal token of a NonTerminal, including
its indentation. |
final protected void | writeToken(int blanks, String image, NonTerminalProgramElement parent) |
final protected void | writeToken(String image, NonTerminalProgramElement parent) |