Class RefArg<T extends Named & Identified>
java.lang.Object
org.qubership.atp.dataset.macros.args.RefArg<T>
- All Implemented Interfaces:
MacroArg
- Direct Known Subclasses:
RefArg.Context,RefArg.Signature
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRefArg.Context<T extends Identified & Named>An adapter for reference which may be not specified in macro arguments signature and should be taken from context.static classRefArg.Signature<T extends Identified & Named>It is a reference, represented as some name/id in macros arguments signature. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasAttr()Returns arg of a attr if it is an attr arg.asDs()Returns arg of a ds if it is a ds arg.Optional<? extends RefArg<DataSetList>> asDsl()Returns arg of a dsl if it is a dsl arg.get()Asserts that it was previously resolved.getText()Return text content of an argument.getType()booleanstatic <T extends Named & Identified>
RefArg.Signature<T> of(ReferenceAliasType<T> refType, ArgSignature signature, org.qubership.atp.dataset.macros.args.SigValueSup<? extends T> valueSup) Used to create arg from macro parameter.static <T extends Named & Identified>
RefArg.Context<T> of(ReferenceAliasType<T> refType, CtxValueSup<? extends T> valueSup) Used to create arg in runtime.static <T extends Named & Identified>
RefArg.Context<T> of(ReferenceAliasType<T> refType, T instance) Used to create arg in runtime.voidvoidtoString()
-
Field Details
-
refType
-
text
-
instance
-
-
Constructor Details
-
RefArg
-
-
Method Details
-
of
public static <T extends Named & Identified> RefArg.Signature<T> of(@Nonnull ReferenceAliasType<T> refType, @Nonnull ArgSignature signature, @Nonnull org.qubership.atp.dataset.macros.args.SigValueSup<? extends T> valueSup) Used to create arg from macro parameter. -
of
public static <T extends Named & Identified> RefArg.Context<T> of(@Nonnull ReferenceAliasType<T> refType, @Nonnull CtxValueSup<? extends T> valueSup) Used to create arg in runtime. -
of
public static <T extends Named & Identified> RefArg.Context<T> of(@Nonnull ReferenceAliasType<T> refType, @Nonnull T instance) Used to create arg in runtime. -
getType
-
asDsl
Returns arg of a dsl if it is a dsl arg. Or empty. Safe way to make a cast. -
asDs
Returns arg of a ds if it is a ds arg. Or empty. Safe way to make a cast. -
asAttr
Returns arg of a attr if it is an attr arg. Or empty. Safe way to make a cast. -
asSignature
- Specified by:
asSignaturein interfaceMacroArg
-
asContextRef
-
getText
Description copied from interface:MacroArgReturn text content of an argument. -
setText
-
resolve
-
isResolved
public boolean isResolved() -
get
Asserts that it was previously resolved.- Throws:
IllegalStateException- if not.
-
toString
-