Interface PrivateBinder

  • All Superinterfaces:
    Binder

    public interface PrivateBinder
    extends Binder
    Returns a binder whose configuration information is hidden from its environment by default. See PrivateModule for details.
    Since:
    2.0
    • Method Detail

      • expose

        void expose​(Key<?> key)
        Makes the binding for key available to the enclosing environment
      • expose

        AnnotatedElementBuilder expose​(java.lang.Class<?> type)
        Makes a binding for type available to the enclosing environment. Use annotatedWith() to expose type with a binding annotation.
      • withSource

        PrivateBinder withSource​(java.lang.Object source)
        Description copied from interface: Binder
        Returns a binder that uses source as the reference location for configuration errors. This is typically a StackTraceElement for .java source but it could any binding source, such as the path to a .properties file.
        Specified by:
        withSource in interface Binder
        Parameters:
        source - any object representing the source location and has a concise toString() value
        Returns:
        a binder that shares its configuration with this binder
      • skipSources

        PrivateBinder skipSources​(java.lang.Class... classesToSkip)
        Description copied from interface: Binder
        Returns a binder that skips classesToSkip when identify the calling code. The caller's StackTraceElement is used to locate the source of configuration errors.
        Specified by:
        skipSources in interface Binder
        Parameters:
        classesToSkip - library classes that create bindings on behalf of their clients.
        Returns:
        a binder that shares its configuration with this binder.