From e7f80b6f125672e2c1a827168ad69ddf1cf66422 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 15 Sep 2014 21:26:16 -0400 Subject: Add latest maven site. --- .../contextual/ContextSensitiveProvider.html | 276 +++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 latest/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html (limited to 'latest/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html') diff --git a/latest/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html b/latest/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html new file mode 100644 index 0000000..c696d8c --- /dev/null +++ b/latest/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html @@ -0,0 +1,276 @@ + + + + + + +ContextSensitiveProvider (Sangria Contextual 1.2-SNAPSHOT API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.tavianator.sangria.contextual
+

Interface ContextSensitiveProvider<T>

+
+
+
+
    +
  • +
    +
    +
    public interface ContextSensitiveProvider<T>
    +
    Like a Provider, but with knowledge of the target InjectionPoint. + +

    + This interface, along with ContextSensitiveBinder, is useful for injecting custom logger types, among other + things. However, context-sensitive injections can make maintenance and debugging more difficult. +

    +
    +
    Since:
    +
    1.0
    +
    Version:
    +
    1.0
    +
    Author:
    +
    Tavian Barnes (tavianator@tavianator.com)
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getInContext

        +
        T getInContext(InjectionPoint injectionPoint)
        +
        Provide an instance of T for the given context.
        +
        +
        Parameters:
        +
        injectionPoint - The InjectionPoint for this provision.
        +
        Returns:
        +
        An instance of T.
        +
        +
      • +
      + + + +
        +
      • +

        getInUnknownContext

        +
        T getInUnknownContext()
        +
        Provide an instance of T for an unknown context. +

        + The InjectionPoint may not be known in all cases, for example if a Provider<T> is used instead + of + a bare T. This method will be called in those cases. +

        +

        + One reasonable implementation is to return a generically applicable instance, such as an anonymous logger. + Another valid implementation is to throw an unchecked exception; in that case, Provider<T> injections + will fail. +

        +
        +
        Returns:
        +
        An instance of T
        +
        Throws:
        +
        RuntimeException - If injection without a context is not supported.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2014. All rights reserved.

+ + -- cgit v1.2.3