Class Opt4JModule

    • Field Detail

      • SINGLETON

        public static com.google.inject.Scope SINGLETON
        The singleton scope.
    • Constructor Detail

      • Opt4JModule

        public Opt4JModule()
    • Method Detail

      • bindConstant

        protected com.google.inject.binder.ConstantBindingBuilder bindConstant​(Class<? extends Annotation> annotation)
        Bind a value.
        Parameters:
        annotation - the type of annotation of the value
        Returns:
        the constant binding builder that allows a binding
      • bindConstant

        protected com.google.inject.binder.ConstantBindingBuilder bindConstant​(Annotation annotation)
        Bind a value.
        Parameters:
        annotation - the annotation of the value
        Returns:
        the constant binding builder that allows a binding
      • configure

        protected void configure()
        Specified by:
        configure in class com.google.inject.AbstractModule
      • multi

        public void multi​(Class<?> clazz)
      • config

        protected abstract void config()
        Configure the module. Bind constants, listeners, and bind arbitrary classes.
        See Also:
        Binder
      • constant

        public static org.opt4j.start.Opt4JModule.ConstantImpl constant​(String value,
                                                                        Class<?> namespace)
        Returns the implementation of the Constant annotation.
        Parameters:
        value - the value
        namespace - the namespace
        Returns:
        the constant annotation
      • bindConstant

        protected com.google.inject.binder.ConstantBindingBuilder bindConstant​(String value)
        Bind a Constant.
        Parameters:
        value - the value from the Constant annotation with an empty namespace
        Returns:
        the constant binding builder that allows a binding
      • bindConstant

        protected com.google.inject.binder.ConstantBindingBuilder bindConstant​(String value,
                                                                               Class<?> namespace)
        Bind a constant.
        Parameters:
        value - the value from the Constant
        namespace - the namespace from the Constant
        Returns:
        the constant binding builder that allows a binding