Class RefAliasProcessor
java.lang.Object
org.qubership.atp.dataset.macros.processor.MacroProcessorBase<RefAliasContext>
org.qubership.atp.dataset.macros.processor.RefAliasProcessor
-
Nested Class Summary
Nested classes/interfaces inherited from class org.qubership.atp.dataset.macros.processor.MacroProcessorBase
MacroProcessorBase.Strategy -
Field Summary
FieldsFields inherited from class org.qubership.atp.dataset.macros.processor.MacroProcessorBase
END, START, state -
Constructor Summary
ConstructorsConstructorDescriptionRefAliasProcessor(MacroRegistry registry, String inputText) Operates with ref alias macro context. -
Method Summary
Modifier and TypeMethodDescriptionprotected RefAliasContextcreateChildContext(RefAliasContext parent, String macro) Evaluates the macro.booleanEvaluates next part of a macro, returns true if has next.getValue()Returns a result value when processing ends.protected abstract voidnotifyRefsFound(RefAliasContext context, ArgsParser.Result args) protected voidreduce(RefAliasContext parent, RefAliasContext child) Child will be thrown away.protected booleanInvoked on the end of root macro processing.Methods inherited from class org.qubership.atp.dataset.macros.processor.MacroProcessorBase
assertEvaluationEnded, read, reduceTreeLevel, toString
-
Field Details
-
registry
-
tokens
-
-
Constructor Details
-
RefAliasProcessor
Operates with ref alias macro context.
-
-
Method Details
-
getValue
Returns a result value when processing ends.- Throws:
EvalException
-
evaluateNext
Evaluates next part of a macro, returns true if has next.- Throws:
EvalException
-
evaluateAll
Evaluates the macro. Returns evaluated value.- Throws:
EvalException
-
reevaluateRootLevel
Description copied from class:MacroProcessorBaseInvoked 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.- Specified by:
reevaluateRootLevelin classMacroProcessorBase<RefAliasContext>- Throws:
CtxEvalException
-
reduce
protected void reduce(@Nonnull RefAliasContext parent, @Nonnull RefAliasContext child) throws CtxEvalException Description copied from class:MacroProcessorBaseChild 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();- Specified by:
reducein classMacroProcessorBase<RefAliasContext>- Throws:
CtxEvalException
-
createChildContext
protected RefAliasContext createChildContext(@Nonnull RefAliasContext parent, @Nonnull String macro) - Specified by:
createChildContextin classMacroProcessorBase<RefAliasContext>
-
notifyRefsFound
protected abstract void notifyRefsFound(RefAliasContext context, ArgsParser.Result args) throws CtxEvalException - Throws:
CtxEvalException
-