From 7865786d43805a7e45240088b9de77e37b485c3e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 8 May 2015 20:53:48 -0400 Subject: Add version 1.3 site. --- .../contextual/ContextSensitiveProvider.html | 252 +++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 1.3/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html (limited to '1.3/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html') diff --git a/1.3/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html b/1.3/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html new file mode 100644 index 0000000..262b3df --- /dev/null +++ b/1.3/sangria-contextual/apidocs/com/tavianator/sangria/contextual/ContextSensitiveProvider.html @@ -0,0 +1,252 @@ + + + + + + +ContextSensitiveProvider (Sangria Contextual 1.3 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 Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      TgetInContext(InjectionPoint injectionPoint) +
      Provide an instance of T for the given context.
      +
      TgetInUnknownContext() +
      Provide an instance of T for an unknown context.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      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–2015. All rights reserved.

+ + -- cgit v1.2.3