S
- the generic typepublic abstract class AbstractSourceCode<S extends AbstractSourceCode<S>> extends Object
Modifier and Type | Field and Description |
---|---|
protected StringBuilder |
code
The code.
|
protected AbstractSyntax |
syntax
The syntax.
|
protected int |
tabLevel
The tab level.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractSourceCode(AbstractSyntax syntax)
Instantiates a new abstract source code.
|
Modifier and Type | Method and Description |
---|---|
S |
_is_()
_is_.
|
S |
addLine(Object... elements)
Adds the line.
|
S |
addTabbedLine(int tabLevel,
Object... line)
Adds the tabbed line.
|
S |
append(Object... elements)
Append.
|
S |
blankLine()
Blank line.
|
S |
blockEnd()
Block end.
|
S |
blockNewLineStart()
Block new line start.
|
S |
blockStart()
Block start.
|
S |
breakLine()
Break line.
|
S |
dot()
Dot.
|
S |
else_()
Else_.
|
S |
endLine()
End line.
|
StringBuilder |
getCode()
Gets the code.
|
AbstractSyntax |
getSyntax()
Gets the syntax.
|
S |
if_(String condition)
If_.
|
S |
indent()
Indent.
|
S |
ln()
Ln.
|
S |
method(String methodname,
String... args)
Method.
|
S |
modifier(String... modifiers)
Modifier.
|
S |
quote(String s)
Quote.
|
S |
space()
Space.
|
S |
tab(int tabLevel)
Tab.
|
String |
toString() |
protected final StringBuilder code
protected int tabLevel
protected AbstractSyntax syntax
protected AbstractSourceCode(AbstractSyntax syntax)
syntax
- the syntaxpublic AbstractSyntax getSyntax()
public StringBuilder getCode()
public S tab(int tabLevel)
tabLevel
- the tab levelpublic S breakLine()
public S ln()
public S endLine()
public S _is_()
public S blankLine()
public S append(Object... elements)
elements
- the elementspublic S addLine(Object... elements)
elements
- the elementspublic S addTabbedLine(int tabLevel, Object... line)
tabLevel
- the tab levelline
- the linepublic String toString()
toString
in class Object
Object.toString()
public S blockNewLineStart()
public S blockStart()
public S blockEnd()
public S else_()
public S dot()
public S space()
public S modifier(String... modifiers)
modifiers
- the modifierspublic S indent()
Copyright © 2003–2021 XDEV Software. All rights reserved.