public class JavaWriter extends IndentingWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
JavaWriter.Method |
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCESS_MASK |
static int |
BEANINFO |
int |
BODY_SECTION |
int |
CONSTRUCTOR_SECTION |
int |
DECL_SECTION |
protected static int |
defaultSectionCount |
static int |
FINAL |
int |
HEADER_SECTION |
static int |
IO |
static int |
METHOD_SEMANTIC_MASK |
protected boolean |
newlineBeforeCurlyBrace |
static int |
PACKAGE_LEVEL |
static int |
PRIVATE |
static int |
PROTECTED |
static int |
PUBLIC |
static int |
rightMarginColumn |
static int |
STATIC |
boolean |
storeMethods |
int |
TRAILER_SECTION |
static int |
UNSUPPORTED |
crDone, indentLevel, indentStringbufferCount, curOut, INITIAL_BUFFER_CAPACITY, listOut, selectStack| Constructor and Description |
|---|
JavaWriter() |
JavaWriter(JavaWriter source) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToMethodStore(String name,
String parameters,
String exceptions,
String returnType) |
void |
addToMethodStore(String name,
String parameters,
String exceptions,
String returnType,
int options) |
void |
begin() |
void |
beginConstructor(String name) |
void |
beginConstructor(String name,
String parameters) |
void |
beginConstructor(String name,
String parameters,
String exceptions,
int options) |
void |
beginFor(String init,
String predicate,
String next) |
void |
beginIf(String predicate) |
void |
beginIf(String predicate1,
String predicate2) |
void |
beginIf(String predicate1,
String predicate2,
String predicate3) |
void |
beginMethod(String name) |
void |
beginMethod(String name,
String parameters) |
void |
beginMethod(String name,
String parameters,
String exceptions) |
void |
beginMethod(String name,
String parameters,
String exceptions,
String returnType) |
void |
beginMethod(String name,
String parameters,
String exceptions,
String returnType,
int options) |
void |
beginTry() |
void |
beginWhile(String predicate) |
void |
bigComment(String msg) |
void |
comment(String msg) |
void |
end() |
void |
end(boolean useCr) |
void |
endCatch(String param) |
void |
endElse() |
void |
endElseBegin() |
void |
endElseBeginIf(String predicate) |
void |
endFinallyBegin() |
void |
endMethod() |
void |
eol() |
void |
eol(boolean useCr) |
void |
eolNoI18N() |
Collection |
getStoredMethods() |
int |
insertSectionAfter(int sectionNum)
Insert a custom section after another section.
|
void |
noI18N() |
void |
reset()
Reset the buffers so that you can use it again.
|
boolean |
writeAccess(int accessLevel) |
void |
writeAssert(String predicate) |
void |
writeClassDecl(String name,
String extendsStatement,
String implementsStatement,
int options)
Writes a class declaration into the DECL_SECTION.
|
void |
writeEol(String s) |
void |
writeEol(String s1,
String s2) |
void |
writeEol(String s1,
String s2,
String s3) |
void |
writeEol(String s1,
String s2,
String s3,
String s4) |
void |
writeEolNoI18N(String s) |
void |
writeEolNoI18N(String s1,
String s2) |
void |
writeEolNoI18N(String s1,
String s2,
String s3) |
void |
writeEolNoI18N(String s1,
String s2,
String s3,
String s4) |
void |
writeImport(String pkg) |
void |
writeMethod(String name,
String parameters,
String exceptions,
String returnType,
int options) |
boolean |
writeOptions(int options) |
void |
writePackage(String pkg) |
void |
writeTo(GenBuffer o) |
void |
writeTo(OutputStream out)
Send buffers to @param out
Everything is passed thru native2ascii.
|
void |
writeTo(Writer out)
Send buffers to @param out
Everything is passed thru native2ascii.
|
beforeWriteHook, cr, getIndent, indent, indentLeft, indentOneLevel, indentRight, insertAdditionalBuffers, setIndent, write, writecr, writecr, writecr, writecranyContent, close, ensureCapacity, flush, getBuffer, getCurrentPosition, popSelect, pushSelect, select, setFirst, truncateAtPosition, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeNext, writeNext, writeNext, writeNext, writeTopublic int HEADER_SECTION
public int DECL_SECTION
public int CONSTRUCTOR_SECTION
public int BODY_SECTION
public int TRAILER_SECTION
protected static final int defaultSectionCount
public static final int PUBLIC
public static final int PROTECTED
public static final int PACKAGE_LEVEL
public static final int PRIVATE
public static final int ACCESS_MASK
public static final int STATIC
public static final int FINAL
public static final int BEANINFO
public static final int IO
public static final int UNSUPPORTED
public static final int METHOD_SEMANTIC_MASK
protected boolean newlineBeforeCurlyBrace
public boolean storeMethods
public static final int rightMarginColumn
public JavaWriter()
public JavaWriter(JavaWriter source)
public int insertSectionAfter(int sectionNum)
public void reset()
GenBufferreset in class IndentingWriterpublic void writeTo(Writer out) throws IOException
writeTo in class GenBufferIOExceptionpublic void writeTo(OutputStream out) throws IOException
writeTo in class GenBufferIOExceptionpublic void writeTo(GenBuffer o)
writeTo in class IndentingWriterpublic boolean writeOptions(int options)
throws IOException
IOExceptionpublic boolean writeAccess(int accessLevel)
throws IOException
IOExceptionpublic void writeClassDecl(String name, String extendsStatement, String implementsStatement, int options) throws IOException
IOExceptionpublic void beginMethod(String name) throws IOException
IOExceptionpublic void beginMethod(String name, String parameters) throws IOException
IOExceptionpublic void beginMethod(String name, String parameters, String exceptions) throws IOException
IOExceptionpublic void beginMethod(String name, String parameters, String exceptions, String returnType) throws IOException
IOExceptionpublic void beginMethod(String name, String parameters, String exceptions, String returnType, int options) throws IOException
IOExceptionpublic void endMethod()
throws IOException
IOExceptionpublic void writeMethod(String name, String parameters, String exceptions, String returnType, int options) throws IOException
IOExceptionpublic void addToMethodStore(String name, String parameters, String exceptions, String returnType)
public void addToMethodStore(String name, String parameters, String exceptions, String returnType, int options)
public Collection getStoredMethods()
public void beginConstructor(String name) throws IOException
IOExceptionpublic void beginConstructor(String name, String parameters) throws IOException
IOExceptionpublic void beginConstructor(String name, String parameters, String exceptions, int options) throws IOException
IOExceptionpublic void writePackage(String pkg) throws IOException
IOExceptionpublic void writeImport(String pkg) throws IOException
IOExceptionpublic void begin()
throws IOException
IOExceptionpublic void end()
throws IOException
IOExceptionpublic void end(boolean useCr)
throws IOException
IOExceptionpublic void eol()
throws IOException
IOExceptionpublic void eol(boolean useCr)
throws IOException
IOExceptionpublic void writeEol(String s) throws IOException
IOExceptionpublic void writeEol(String s1, String s2) throws IOException
IOExceptionpublic void writeEol(String s1, String s2, String s3) throws IOException
IOExceptionpublic void writeEol(String s1, String s2, String s3, String s4) throws IOException
IOExceptionpublic void noI18N()
throws IOException
IOExceptionpublic void eolNoI18N()
throws IOException
IOExceptionpublic void writeEolNoI18N(String s) throws IOException
IOExceptionpublic void writeEolNoI18N(String s1, String s2) throws IOException
IOExceptionpublic void writeEolNoI18N(String s1, String s2, String s3) throws IOException
IOExceptionpublic void writeEolNoI18N(String s1, String s2, String s3, String s4) throws IOException
IOExceptionpublic void beginTry()
throws IOException
IOExceptionpublic void endCatch(String param) throws IOException
IOExceptionpublic void endFinallyBegin()
throws IOException
IOExceptionpublic void beginIf(String predicate) throws IOException
IOExceptionpublic void beginIf(String predicate1, String predicate2) throws IOException
IOExceptionpublic void beginIf(String predicate1, String predicate2, String predicate3) throws IOException
IOExceptionpublic void endElse()
throws IOException
IOExceptionpublic void endElseBegin()
throws IOException
IOExceptionpublic void endElseBeginIf(String predicate) throws IOException
IOExceptionpublic void beginFor(String init, String predicate, String next) throws IOException
IOExceptionpublic void beginWhile(String predicate) throws IOException
IOExceptionpublic void writeAssert(String predicate) throws IOException
IOExceptionpublic void comment(String msg) throws IOException
IOExceptionpublic void bigComment(String msg) throws IOException
IOExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.