Class PreconditionFactoryMap
java.lang.Object
kboyle.oktane.core.module.factory.PreconditionFactoryMap
A map for mapping
Annotation
s to PreconditionFactory
s.-
Constructor Summary
ConstructorsConstructorDescriptionPreconditionFactoryMap(Map<Class<?>,PreconditionFactory<?>> preconditionFactoryByClass, Map<Class<?>,Class<?>> annotationClassByRepeatingClass)
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Copies the map.void
handle(Annotation annotation, BiConsumer<Object,Precondition> preconditionConsumer)
Calls thePreconditionFactory
for the givenannotation
, if applicable.void
put(PreconditionFactory<?> factory)
Adds the givenfactory
to the map.
-
Constructor Details
-
PreconditionFactoryMap
public PreconditionFactoryMap() -
PreconditionFactoryMap
-
-
Method Details
-
put
Adds the givenfactory
to the map.- Parameters:
factory
- The factory to add.
-
handle
Calls thePreconditionFactory
for the givenannotation
, if applicable.- Parameters:
annotation
- TheAnnotation
to handle.preconditionConsumer
- The consumer to pass into thePreconditionFactory
-
copy
Copies the map.- Returns:
- An immutable copy of the map.
-