public class Placeholder
extends java.lang.Object
FreeFormDocumentation
, templates for doc generation have to use labels to
indicate where to insert the documentation of what element of the UML model into the output
document. The format and the read-only content of the placeholder is defined in
PlaceholderSpec
, while the placeholder itself is used for writing and actual replacing of
the placeholder text.Constructor and Description |
---|
Placeholder(PlaceholderSpec phSpec) |
Placeholder(PlaceholderSpec phSpec,
int figureCountBefore,
int tableCountBefore) |
Modifier and Type | Method and Description |
---|---|
int |
addFigure()
Returns the index to be used to reference the added figure caption.
|
int |
addTable()
Returns the index to be used to reference the added table caption.
|
int |
getFigureCount()
Returns the last figure caption index by the current end of the range.
|
int |
getFigureCountBefore()
Returns number of figures (i.e., found captions starting with
#getPreferredLabel() ) before this placeholder. |
PlaceholderSpec |
getPlaceholderSpec()
Returns the placeholder specification which holds text, kind etc.
|
java.lang.String |
getReplacedText()
Returns the replacement text, as set by the user with
setReplacedText(String) . |
int |
getTableCount()
Returns the last table caption index by the current end of the range.
|
int |
getTableCountBefore()
Returns number of tables (i.e., found captions starting with
#getPreferredLabel() ) before this placeholder. |
void |
incrementFigureBefore()
Increments the number of figures before this placeholder.
|
void |
incrementTableBefore()
Increments the number of tables before this placeholder.
|
void |
setReplacedText(java.lang.String replacedText)
Use this setter to track progress and status of placeholder replacement.
|
java.lang.String |
toString() |
public Placeholder(PlaceholderSpec phSpec)
public Placeholder(PlaceholderSpec phSpec, int figureCountBefore, int tableCountBefore)
public PlaceholderSpec getPlaceholderSpec()
public void setReplacedText(java.lang.String replacedText)
public int getFigureCountBefore()
#getPreferredLabel()
) before this placeholder.public int getTableCountBefore()
#getPreferredLabel()
) before this placeholder.public java.lang.String getReplacedText()
setReplacedText(String)
.
Initial value is null and is never changed by this class itself.public void incrementFigureBefore()
public void incrementTableBefore()
public int addFigure()
public int getFigureCount()
public int addTable()
public int getTableCount()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic