|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.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]).
- Specified by:
addLine
in interface IndentationEngine
addLine
public void addLine(java.lang.Object pLine)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pLine})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
public void addLine(java.lang.Object pToken1,
java.lang.Object pToken2)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
public void addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
public void addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
public void addLine(java.lang.Object pToken1,
java.lang.Object pToken2,
java.lang.Object pToken3,
java.lang.Object pToken4,
java.lang.Object pToken5)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13, pToken14})
.
- Specified by:
addLine
in interface IndentationEngine
addLine
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)
- Description copied from interface:
IndentationEngine
Shortcut for addLine(getIndentationLevel(),
new Object[]{pToken1, pToken2, pToken3, pToken4, pToken5,
pToken6, pToken7, pToken8, pToken9, pToken10,
pToken11, pToken12, pToken13, pToken15})
.
- Specified by:
addLine
in interface IndentationEngine
getLines
public java.lang.String[] getLines(int pLevel)
getLines
protected java.util.Iterator getLines()
write
public void write(IndentationTarget pTarget,
java.lang.Object pObject)
throws java.io.IOException
- Description copied from interface:
IndentationEngine
Adds the given objects contents to the given
IndentationTarget
.
- Specified by:
write
in interface IndentationEngine
- Throws:
java.io.IOException
write
public void write(IndentationTarget pTarget)
throws java.io.IOException
- Description copied from interface:
IndentationEngine
Adds the IndentationEngine's contents to the given
IndentationTarget
.
- Specified by:
write
in interface IndentationEngine
- Throws:
java.io.IOException
asString
public java.lang.String asString()
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD