Class AnnotationConfigurerAdapter<O,I,B extends AnnotationBuilder<O>>
java.lang.Object
org.springframework.statemachine.config.common.annotation.AnnotationConfigurerAdapter<O,I,B>
- Type Parameters:
O- The Object being built by BI- The interface of type BB- The Builder that is building O and is configured byAnnotationConfigurerAdapter
- All Implemented Interfaces:
AnnotationConfigurer<O,B>
- Direct Known Subclasses:
AbstractTransitionConfigurer,DefaultChoiceTransitionConfigurer,DefaultConfigurationConfigurer,DefaultDistributedStateMachineConfigurer,DefaultEntryTransitionConfigurer,DefaultExitTransitionConfigurer,DefaultForkTransitionConfigurer,DefaultHistoryTransitionConfigurer,DefaultJoinTransitionConfigurer,DefaultJunctionTransitionConfigurer,DefaultModelConfigurer,DefaultMonitoringConfigurer,DefaultPersistenceConfigurer,DefaultPropertiesConfigurer,DefaultResourceConfigurer,DefaultSecurityConfigurer,DefaultStateConfigurer,DefaultVerifierConfigurer
public abstract class AnnotationConfigurerAdapter<O,I,B extends AnnotationBuilder<O>>
extends Object
implements AnnotationConfigurer<O,B>
A base class for
AnnotationConfigurer that allows subclasses to only
implement the methods they are interested in. It also provides a mechanism
for using the AnnotationConfigurer and when done gaining access to the
AnnotationBuilder that is being configured.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor) Adds anObjectPostProcessorto be used for this adapter.and()Return theAnnotationBuilderwhen done using theAnnotationConfigurer.voidConfigure theAnnotationBuilderby setting the necessary properties on theAnnotationBuilder.protected final BGets theAnnotationBuilder.voidInitialise theAnnotationBuilder.booleanisAssignable(AnnotationBuilder<O> builder) voidsetBuilder(B builder) Sets theAnnotationBuilderto be used.
-
Constructor Details
-
AnnotationConfigurerAdapter
public AnnotationConfigurerAdapter()
-
-
Method Details
-
init
Description copied from interface:AnnotationConfigurerInitialise theAnnotationBuilder. Here only shared state should be created and modified, but not properties on theAnnotationBuilderused for building the object. This ensures that theAnnotationConfigurer.configure(AnnotationBuilder)method uses the correct shared objects when building.- Specified by:
initin interfaceAnnotationConfigurer<O,I> - Parameters:
builder- the builder- Throws:
Exception- if error occurred
-
configure
Description copied from interface:AnnotationConfigurerConfigure theAnnotationBuilderby setting the necessary properties on theAnnotationBuilder.- Specified by:
configurein interfaceAnnotationConfigurer<O,I> - Parameters:
builder- the builder- Throws:
Exception- if error occurred
-
and
Return theAnnotationBuilderwhen done using theAnnotationConfigurer. This is useful for method chaining.- Returns:
- the
AnnotationBuilder
-
getBuilder
Gets theAnnotationBuilder. Cannot be null.- Returns:
- the
AnnotationBuilder - Throws:
IllegalStateException- if AnnotationBuilder is null
-
addObjectPostProcessor
Adds anObjectPostProcessorto be used for this adapter. The default implementation does nothing to the object.- Parameters:
objectPostProcessor- theObjectPostProcessorto use
-
setBuilder
Sets theAnnotationBuilderto be used. This is automatically set when usingAbstractConfiguredAnnotationBuilder.apply(AnnotationConfigurerAdapter)- Parameters:
builder- theAnnotationBuilderto set
-
isAssignable
- Specified by:
isAssignablein interfaceAnnotationConfigurer<O,I>
-