|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRichStringPartAcceptor
The IRichStringPartAcceptor
can be passed into a RichStringProcessor
to
handle the semantics of a RichString
for a
specific use case. It's mainly an event sink but may influence the control flow
of the RichStringProcessor
by means of #forLoopHasNext()
.
Method Summary | |
---|---|
void |
acceptElse()
Announces that an «ELSE» has been consumed. |
void |
acceptElseIfCondition(XExpression condition)
Announces that an «ELSEIF condition» has been consumed. |
void |
acceptEndFor(XExpression after,
java.lang.CharSequence indentation)
Announces that an «ENDFOR» has been consumed. |
void |
acceptEndIf()
Announces that an «ENDIF» has been consumed. |
void |
acceptExpression(XExpression expression,
java.lang.CharSequence indentation)
Announces that an «expression» has been consumed. |
void |
acceptForLoop(JvmFormalParameter parameter,
XExpression expression)
Announces that a «FOR parameter: expression» has been consumed. |
void |
acceptIfCondition(XExpression condition)
Announces that an «IF condition» has been consumed. |
void |
acceptSemanticLineBreak(int charCount,
RichStringLiteral origin,
boolean controlStructureSeen)
Indicates a semantic line break in a rich string literal. |
void |
acceptSemanticText(java.lang.CharSequence text,
RichStringLiteral origin)
|
void |
acceptTemplateLineBreak(int charCount,
RichStringLiteral origin)
Indicates a template line break in a rich string literal. |
void |
acceptTemplateText(java.lang.CharSequence text,
RichStringLiteral origin)
|
void |
announceNextLiteral(RichStringLiteral literal)
Announces that a next literal will be processed. |
boolean |
forLoopHasNext(XExpression before,
XExpression separator,
java.lang.CharSequence indentation)
Queried to determine whether the body of the for-loop should be evaluated (again). |
Method Detail |
---|
void acceptSemanticText(java.lang.CharSequence text, RichStringLiteral origin)
text
- the semantic text. May not be null
.origin
- the value holder for the full text or null, if unknown.void acceptTemplateText(java.lang.CharSequence text, RichStringLiteral origin)
text
- the template text. May not be null
.origin
- the value holder for the full text or null, if unknown.void acceptSemanticLineBreak(int charCount, RichStringLiteral origin, boolean controlStructureSeen)
origin
- the instance holding the complete text value that contains the line break.charCount
- the number of characters in the line break.whether
- or not the linebreak occurs in a line that contains a control structure.void acceptTemplateLineBreak(int charCount, RichStringLiteral origin)
origin
- the instance holding the complete text value that contains the line break.charCount
- the number of characters in the line break.void acceptIfCondition(XExpression condition)
«IF condition»has been consumed.
condition
- the condition of an RichStringIf
.void acceptElseIfCondition(XExpression condition)
«ELSEIF condition»has been consumed.
condition
- the condition of an RichStringElseIf
.void acceptElse()
«ELSE»has been consumed.
void acceptEndIf()
«ENDIF»has been consumed.
void acceptForLoop(JvmFormalParameter parameter, XExpression expression)
«FOR parameter: expression»has been consumed.
parameter
- the declared parameter in the for-loop.expression
- the expression that produces an Iterable
.boolean forLoopHasNext(XExpression before, XExpression separator, java.lang.CharSequence indentation)
before
- the expression that should be evaluated prior to the first item of the loop, if any.separator
- the expression that should be evaluated prior to the second and all subsequent items of the loop.indentation
- the additional indentation for any line besides the first one.
true
if the for-loop body should be evaluated.void acceptEndFor(XExpression after, java.lang.CharSequence indentation)
«ENDFOR»has been consumed.
after
- the expression that should be evaluated after the last item of the loop, if any.indentation
- the additional indentation for any line besides the first one.void acceptExpression(XExpression expression, java.lang.CharSequence indentation)
«expression»has been consumed. If the expression's evaluation result contains more than one line, any line besides the first one may be prefixed with the given indentation.
expression
- the consumed expression. May not be null
.indentation
- the additional indentation for any line besides the first one.void announceNextLiteral(RichStringLiteral literal)
literal
- the literal.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |