Class RegistrationConfigurerImpl<S,T>
- java.lang.Object
-
- org.palladiosimulator.textual.tpcm.generator.RegistrationConfigurerImpl<S,T>
-
- All Implemented Interfaces:
RegistrationConfigurer<S,T>
public class RegistrationConfigurerImpl<S,T> extends Object implements RegistrationConfigurer<S,T>
-
-
Constructor Summary
Constructors Constructor Description RegistrationConfigurerImpl(Registration<S,T> reg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <PS,PT>
ValueApplierConfigurer<PT,T>map(Function<S,PS> contentProvider)Defines a transformation for a child element.<PS,PT>
ValueApplierConfigurer<PT,T>map(Function<S,PS> contentProvider, Class<PT> target)Defines a transformation for a child element.<PS,PT>
ValueApplierConfigurer<List<PT>,T>mapAll(Function<S,? extends List<PS>> contentProvider)Defines a transformation for child elements.<PS,PT>
ValueApplierConfigurer<List<PT>,T>mapAll(Function<S,? extends List<PS>> contentProvider, Class<PT> target)Defines a transformation for child elements.voidsetAfter(Consumer<T> callback)(Optional) Defines what to do after all child element transformations have finished.voidsetCreate(Function<S,T> factory)(Required) Defines how the target object can be created from the given source.voidsetWhen(Predicate<S> guard)(Optional) Defines a predicate for this transformation.
-
-
-
Constructor Detail
-
RegistrationConfigurerImpl
public RegistrationConfigurerImpl(Registration<S,T> reg)
-
-
Method Detail
-
map
public <PS,PT> ValueApplierConfigurer<PT,T> map(Function<S,PS> contentProvider)
Description copied from interface:RegistrationConfigurerDefines a transformation for a child element.- Specified by:
mapin interfaceRegistrationConfigurer<S,T>- Parameters:
contentProvider- Provider for how get this element from the source element- See Also:
ValueApplierConfigurer
-
mapAll
public <PS,PT> ValueApplierConfigurer<List<PT>,T> mapAll(Function<S,? extends List<PS>> contentProvider)
Description copied from interface:RegistrationConfigurerDefines a transformation for child elements.- Specified by:
mapAllin interfaceRegistrationConfigurer<S,T>- Parameters:
contentProvider- Provider for how get these elements from the source element- See Also:
ValueApplierConfigurer
-
setCreate
public void setCreate(Function<S,T> factory)
Description copied from interface:RegistrationConfigurer(Required) Defines how the target object can be created from the given source.- Specified by:
setCreatein interfaceRegistrationConfigurer<S,T>
-
setWhen
public void setWhen(Predicate<S> guard)
Description copied from interface:RegistrationConfigurer(Optional) Defines a predicate for this transformation. This makes sure that the transformation only happens, if the predicate defined here tests successfully.- Specified by:
setWhenin interfaceRegistrationConfigurer<S,T>
-
map
public <PS,PT> ValueApplierConfigurer<PT,T> map(Function<S,PS> contentProvider, Class<PT> target)
Description copied from interface:RegistrationConfigurerDefines a transformation for a child element.- Specified by:
mapin interfaceRegistrationConfigurer<S,T>- Parameters:
contentProvider- Provider for how get this element from the source elementtarget- The desired target type for these elements- See Also:
ValueApplierConfigurer
-
mapAll
public <PS,PT> ValueApplierConfigurer<List<PT>,T> mapAll(Function<S,? extends List<PS>> contentProvider, Class<PT> target)
Description copied from interface:RegistrationConfigurerDefines a transformation for child elements.- Specified by:
mapAllin interfaceRegistrationConfigurer<S,T>- Parameters:
contentProvider- Provider for how get these elements from the source elementtarget- The desired target type for these elements- See Also:
ValueApplierConfigurer
-
setAfter
public void setAfter(Consumer<T> callback)
Description copied from interface:RegistrationConfigurer(Optional) Defines what to do after all child element transformations have finished.- Specified by:
setAfterin interfaceRegistrationConfigurer<S,T>
-
-