Class MacroProcessorBase<T extends MacroContextBase>
java.lang.Object
org.qubership.atp.dataset.macros.processor.MacroProcessorBase<T>
- Direct Known Subclasses:
AbstractMacroProcessor,RefAliasProcessor
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEvaluation result will be in state text.protected abstract TcreateChildContext(T parent, String macro) protected voidprotected abstract voidChild will be thrown away.booleanInvoked on the end of siblings processing.protected abstract booleanreevaluateRootLevel(T root) Invoked on the end of root macro processing.toString()
-
Field Details
-
START
protected static final org.qubership.atp.dataset.macros.processor.MacroProcessorBase.Start START -
END
protected static final org.qubership.atp.dataset.macros.processor.MacroProcessorBase.End END -
state
-
-
Constructor Details
-
MacroProcessorBase
public MacroProcessorBase()
-
-
Method Details
-
reevaluateRootLevel
Invoked on the end of root macro processing. Should drop text into tail and parse again. Returns true if text has changed after extra processing step.- Throws:
CtxEvalException
-
reduce
Child will be thrown away. Child is evaluated - content in it's text. Parent may has an arguments, which should be reevaluated too. Sample: this.tail.append(parent.args).append(child.text).append(")"); parent.args.clear();- Throws:
CtxEvalException
-
read
- Throws:
CtxEvalException
-
reduceTreeLevel
Invoked on the end of siblings processing. End of macros tree level processing. Should union edge with parent, push the union result into tokens, return new edge. Or return false if no parent to union with and this is a root level.- Throws:
CtxEvalException
-
assertEvaluationEnded
Evaluation result will be in state text.- Throws:
CtxEvalException
-
createChildContext
-
toString
-