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