org.loom.guice
Class Plugins

java.lang.Object
  extended by org.loom.guice.Plugins

public final class Plugins
extends java.lang.Object

Handles all configured plugins with Loom


Method Summary
static void bindActions(com.google.inject.Binder binder, java.lang.Iterable<java.lang.Class<? extends Action>> actionClasses)
          Register a list of action classes in Loom Example of use: Plugins.bindActions(binder(), MortgagesAction.class, CustomersAction.class);
static void bindAnnotationProcessors(com.google.inject.Binder binder, java.lang.Iterable<java.lang.Class<? extends AnnotationProcessor>> annotationProcessorClasses)
           
static void bindConverterFactories(com.google.inject.Binder binder, java.lang.Iterable<java.lang.Class<? extends AnnotationDrivenConverterFactory>> factories)
          Register a list of converter factories Example of use: Plugins.bindActions(binder(), JsonConverterFactory.class);
static void bindConverters(com.google.inject.Binder binder, java.lang.Iterable<java.lang.Class<? extends Converter>> converters)
          Register a list of converter classes Example of use: Plugins.bindActions(binder(), StringConverter.class, IntegerConverter.class);
static void bindJacksonMixins(com.google.inject.Binder binder, java.lang.Iterable<java.lang.Class> mixins)
          Bind a list of jackson mixins to specify the default serializer and deserializer for java classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

bindJacksonMixins

public static void bindJacksonMixins(com.google.inject.Binder binder,
                                     java.lang.Iterable<java.lang.Class> mixins)
Bind a list of jackson mixins to specify the default serializer and deserializer for java classes. The provided Jackson mixins must specify a JsonDeserialize.as() value, which will be used to bind the deserializer to the java class. Details about mixins in Jackson can be seen here Example of use: Plugins.bindJacksonMixins(binder(), GeoPtJacksonMixin.class);

Parameters:
binder - the binder value
mixins - the list of mixins to apply

bindActions

public static void bindActions(com.google.inject.Binder binder,
                               java.lang.Iterable<java.lang.Class<? extends Action>> actionClasses)
Register a list of action classes in Loom Example of use: Plugins.bindActions(binder(), MortgagesAction.class, CustomersAction.class);

Parameters:
binder - the binder value
actionClasses - the list of action classes to register

bindConverterFactories

public static void bindConverterFactories(com.google.inject.Binder binder,
                                          java.lang.Iterable<java.lang.Class<? extends AnnotationDrivenConverterFactory>> factories)
Register a list of converter factories Example of use: Plugins.bindActions(binder(), JsonConverterFactory.class);

Parameters:
binder - the binder value
factories - the list of factory classes to register

bindConverters

public static void bindConverters(com.google.inject.Binder binder,
                                  java.lang.Iterable<java.lang.Class<? extends Converter>> converters)
Register a list of converter classes Example of use: Plugins.bindActions(binder(), StringConverter.class, IntegerConverter.class);

Parameters:
binder - the binder value
converters - the list of converter classes to register

bindAnnotationProcessors

public static void bindAnnotationProcessors(com.google.inject.Binder binder,
                                            java.lang.Iterable<java.lang.Class<? extends AnnotationProcessor>> annotationProcessorClasses)