Class ResourceScope
java.lang.Object
dev.getelements.elements.rt.guice.ResourceScope
A Guice
Scope which tracks the current Resource. It relies on CurrentResource as the source
of the current Resource.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidbind(com.google.inject.Binder binder) Makes theResourceInjectable.static voidbind(com.google.inject.PrivateBinder binder) Makes theResourceInjectable as well as usesPrivateBinder.expose(Key)to ensure it is available to the wholeInjector.static com.google.inject.ScopeGets the static instance of theScope
-
Method Details
-
getInstance
public static com.google.inject.Scope getInstance()Gets the static instance of theScope- Returns:
- the
Scope
-
bind
public static void bind(com.google.inject.Binder binder) Makes theResourceInjectable.- Parameters:
binder- theBinderto use
-
bind
public static void bind(com.google.inject.PrivateBinder binder) Makes theResourceInjectable as well as usesPrivateBinder.expose(Key)to ensure it is available to the wholeInjector.- Parameters:
binder- theBinderto use
-