Class ResourceScope

java.lang.Object
dev.getelements.elements.rt.guice.ResourceScope

public class ResourceScope extends Object
A Guice Scope which tracks the current Resource. It relies on CurrentResource as the source of the current Resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    bind(com.google.inject.Binder binder)
    Makes the Resource Injectable.
    static void
    bind(com.google.inject.PrivateBinder binder)
    Makes the Resource Injectable as well as uses PrivateBinder.expose(Key) to ensure it is available to the whole Injector.
    static com.google.inject.Scope
    Gets the static instance of the Scope

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static com.google.inject.Scope getInstance()
      Gets the static instance of the Scope
      Returns:
      the Scope
    • bind

      public static void bind(com.google.inject.Binder binder)
      Makes the Resource Injectable.
      Parameters:
      binder - the Binder to use
    • bind

      public static void bind(com.google.inject.PrivateBinder binder)
      Makes the Resource Injectable as well as uses PrivateBinder.expose(Key) to ensure it is available to the whole Injector.
      Parameters:
      binder - the Binder to use