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 void
bind
(com.google.inject.Binder binder) Makes theResource
Inject
able.static void
bind
(com.google.inject.PrivateBinder binder) Makes theResource
Inject
able as well as usesPrivateBinder.expose(Key)
to ensure it is available to the wholeInjector
.static com.google.inject.Scope
Gets 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 theResource
Inject
able.- Parameters:
binder
- theBinder
to use
-
bind
public static void bind(com.google.inject.PrivateBinder binder) Makes theResource
Inject
able as well as usesPrivateBinder.expose(Key)
to ensure it is available to the wholeInjector
.- Parameters:
binder
- theBinder
to use
-