|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jaxme.js.IndentationEngineImpl
Field Summary |
Fields inherited from interface net.sf.jaxme.js.IndentationEngine |
NOTHING |
Constructor Summary | |
protected |
IndentationEngineImpl()
|
Method Summary | |
void |
addLine()
Adds an empty line, shortcut for addLine(getIndentationLevel, new Object[0]) |
void |
addLine(int pLevel,
java.lang.Object[] pTokens)
Adds the given tokens as a complete line, using the given level of indentation. |
void |
addLine(java.lang.Object pLine)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pLine}) . |
void |
addLine(java.lang.Object[] pTokens)
Shortcut for addLine(getIndentationLevel(), pTokens) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9,
java.lang.Object pToken10)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9,
java.lang.Object pToken10,
java.lang.Object pToken11)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9,
java.lang.Object pToken10,
java.lang.Object pToken11,
java.lang.Object pToken12)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9,
java.lang.Object pToken10,
java.lang.Object pToken11,
java.lang.Object pToken12,
java.lang.Object pToken13)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9,
java.lang.Object pToken10,
java.lang.Object pToken11,
java.lang.Object pToken12,
java.lang.Object pToken13,
java.lang.Object pToken14)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13, pToken14}) . |
void |
addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5,
java.lang.Object pToken6,
java.lang.Object pToken7,
java.lang.Object pToken8,
java.lang.Object pToken9,
java.lang.Object pToken10,
java.lang.Object pToken11,
java.lang.Object pToken12,
java.lang.Object pToken13,
java.lang.Object pToken14,
java.lang.Object pToken15)
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13, pToken15}) . |
java.lang.String |
asString()
|
protected void |
checkNulls(java.lang.Object pTokens)
|
void |
clear()
Clears the IndentationEngine's contents. |
int |
getLevel()
Returns the current level of indentation. |
protected java.util.Iterator |
getLines()
|
java.lang.String[] |
getLines(int pLevel)
|
PlaceHolder |
getPlaceHolder(java.lang.String pName)
Searches for the placeholder with the given name. |
void |
indent()
Increases the current level of indentation. |
boolean |
isEmpty()
|
void |
moveToBottom()
Moves the cursor to the bottom of the method. |
void |
moveToTop()
Moves the cursor to the top of the method. |
PlaceHolder |
newPlaceHolder(java.lang.String pName,
boolean pAutoRemovable)
Sets a placeholder with the given name. |
protected void |
removePlaceHolder(PlaceHolder pPlaceHolder)
|
void |
setLevel(int pLevel)
Sets the current level of indentation. |
void |
unindent()
Decreases the current level of indentation. |
void |
write(IndentationTarget pTarget)
Adds the IndentationEngine's contents to the given IndentationTarget . |
void |
write(IndentationTarget pTarget,
java.lang.Object pObject)
Adds the given objects contents to the given IndentationTarget . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected IndentationEngineImpl()
Method Detail |
public boolean isEmpty()
public void clear()
IndentationEngine
Clears the IndentationEngine's contents.
clear
in interface IndentationEngine
public void indent()
IndentationEngine
Increases the current level of indentation.
indent
in interface IndentationEngine
public void unindent()
IndentationEngine
Decreases the current level of indentation.
unindent
in interface IndentationEngine
public void setLevel(int pLevel)
IndentationEngine
Sets the current level of indentation.
setLevel
in interface IndentationEngine
public int getLevel()
IndentationEngine
Returns the current level of indentation.
getLevel
in interface IndentationEngine
public void addLine(int pLevel, java.lang.Object[] pTokens)
IndentationEngine
Adds the given tokens as a complete line, using the given level of indentation.
addLine
in interface IndentationEngine
public void moveToTop()
IndentationEngine
Moves the cursor to the top of the method.
moveToTop
in interface IndentationEngine
public void moveToBottom()
IndentationEngine
Moves the cursor to the bottom of the method.
moveToBottom
in interface IndentationEngine
public PlaceHolder newPlaceHolder(java.lang.String pName, boolean pAutoRemovable)
IndentationEngine
Sets a placeholder with the given name.
newPlaceHolder
in interface IndentationEngine
pName
- The placeholders namepAutoRemovable
- Whether the placeholder must be removed by invoking PlaceHolder.remove()
(false)
or not (true).public PlaceHolder getPlaceHolder(java.lang.String pName)
IndentationEngine
Searches for the placeholder with the given name. The cursor
will be set to the line after the placeholder, if it is found.
In that case subsequent invocations of IndentationEngine.addLine()
will add code to the lines following the placeholder. Otherwise
the cursor is unchanged.
getPlaceHolder
in interface IndentationEngine
pName
- The placeholders name
protected void removePlaceHolder(PlaceHolder pPlaceHolder)
protected void checkNulls(java.lang.Object pTokens)
public void addLine(java.lang.Object[] pTokens)
IndentationEngine
Shortcut for addLine(getIndentationLevel(), pTokens)
.
addLine
in interface IndentationEngine
public void addLine()
IndentationEngine
Adds an empty line, shortcut for
addLine(getIndentationLevel, new Object[0])
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pLine)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pLine})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9, java.lang.Object pToken10)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9, java.lang.Object pToken10, java.lang.Object pToken11)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9, java.lang.Object pToken10, java.lang.Object pToken11, java.lang.Object pToken12)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9, java.lang.Object pToken10, java.lang.Object pToken11, java.lang.Object pToken12, java.lang.Object pToken13)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9, java.lang.Object pToken10, java.lang.Object pToken11, java.lang.Object pToken12, java.lang.Object pToken13, java.lang.Object pToken14)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13, pToken14})
.
addLine
in interface IndentationEngine
public void addLine(java.lang.Object pToken1, java.lang.Object pToken2, java.lang.Object pToken3, java.lang.Object pToken4, java.lang.Object pToken5, java.lang.Object pToken6, java.lang.Object pToken7, java.lang.Object pToken8, java.lang.Object pToken9, java.lang.Object pToken10, java.lang.Object pToken11, java.lang.Object pToken12, java.lang.Object pToken13, java.lang.Object pToken14, java.lang.Object pToken15)
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13, pToken15})
.
addLine
in interface IndentationEngine
public java.lang.String[] getLines(int pLevel)
protected java.util.Iterator getLines()
public void write(IndentationTarget pTarget, java.lang.Object pObject) throws java.io.IOException
IndentationEngine
Adds the given objects contents to the given
IndentationTarget
.
write
in interface IndentationEngine
java.io.IOException
public void write(IndentationTarget pTarget) throws java.io.IOException
IndentationEngine
Adds the IndentationEngine's contents to the given
IndentationTarget
.
write
in interface IndentationEngine
java.io.IOException
public java.lang.String asString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |