Class MacroProcessorImpl
java.lang.Object
org.qubership.atp.dataset.macros.processor.MacroProcessorBase<MacroContext>
org.qubership.atp.dataset.macros.processor.AbstractMacroProcessor<MacroContext>
org.qubership.atp.dataset.macros.processor.MacroProcessorImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.qubership.atp.dataset.macros.processor.MacroProcessorBase
MacroProcessorBase.Strategy -
Field Summary
Fields inherited from class org.qubership.atp.dataset.macros.processor.AbstractMacroProcessor
lastEvaluationResult, registry, tail, tokensFields inherited from class org.qubership.atp.dataset.macros.processor.MacroProcessorBase
END, START, state -
Constructor Summary
ConstructorsConstructorDescriptionMacroProcessorImpl(EvaluationContext current, MacroRegistry registry, AliasWrapperService wrapperService, String inputText, MacroCacheKey cache) Operates with macro context. -
Method Summary
Modifier and TypeMethodDescriptionprotected MacroContextcreateChildContext(MacroContext parent, String macro) protected voiddropArguments(MacroContext macroContext) protected voiddropText(MacroContext macroContext) protected StringgetArguments(MacroContext macroContext) protected StringgetText(MacroContext macroContext) getValue()protected voidreduce(MacroContext parent, MacroContext child) Child will be thrown away.Methods inherited from class org.qubership.atp.dataset.macros.processor.AbstractMacroProcessor
evaluateAll, evaluateNext, reevaluateRootLevelMethods inherited from class org.qubership.atp.dataset.macros.processor.MacroProcessorBase
assertEvaluationEnded, read, reduceTreeLevel, toString
-
Constructor Details
-
MacroProcessorImpl
public MacroProcessorImpl(@Nonnull EvaluationContext current, @Nonnull MacroRegistry registry, @Nonnull AliasWrapperService wrapperService, @Nonnull String inputText, @Nonnull MacroCacheKey cache) Operates with macro context.
-
-
Method Details
-
createChildContext
- Specified by:
createChildContextin classMacroProcessorBase<MacroContext>
-
getArguments
- Specified by:
getArgumentsin classAbstractMacroProcessor<MacroContext>
-
getText
- Specified by:
getTextin classAbstractMacroProcessor<MacroContext>
-
dropArguments
- Specified by:
dropArgumentsin classAbstractMacroProcessor<MacroContext>
-
dropText
- Specified by:
dropTextin classAbstractMacroProcessor<MacroContext>
-
reduce
protected void reduce(@Nonnull MacroContext parent, @Nonnull MacroContext 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();- Overrides:
reducein classAbstractMacroProcessor<MacroContext>- Throws:
CtxEvalException
-
getValue
- Overrides:
getValuein classAbstractMacroProcessor<MacroContext>- Throws:
CtxEvalException
-