Package | Description |
---|---|
com.google.inject |
Google Guice (pronounced "juice") is an ultra-lightweight dependency
injection framework.
|
com.google.inject.binder |
Interfaces which make up
Binder 's
expression language. |
com.google.inject.internal |
Guice (sounds like like "juice")
|
com.google.inject.multibindings |
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar . |
com.google.inject.servlet |
Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar . |
com.google.inject.spi |
Guice service provider interface
|
com.google.inject.util |
Helper methods for working with Guice.
|
Modifier and Type | Field and Description |
---|---|
static Scope |
Scopes.NO_SCOPE
No scope; the same as not applying any scope at all.
|
static Scope |
Scopes.SINGLETON
One instance per
Injector . |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> |
Injector.getScopeBindings()
Returns a map containing all scopes in the injector.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractModule.bindScope(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
Scope scope) |
void |
Binder.bindScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
Scope scope)
Binds a scope to an annotation.
|
protected void |
PrivateModule.bindScope(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
Scope scope) |
static boolean |
Scopes.isScoped(Binding<?> binding,
Scope scope,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
Returns true if
binding has the given scope. |
Modifier and Type | Method and Description |
---|---|
void |
ScopedBindingBuilder.in(Scope scope)
See the EDSL examples at
Binder . |
Modifier and Type | Class and Description |
---|---|
class |
SingletonScope
One instance per
Injector . |
Modifier and Type | Method and Description |
---|---|
Scope |
Scoping.getScopeInstance()
Returns the scope instance, or
null if that isn't known for this instance. |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> |
InjectorImpl.getScopeBindings() |
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> |
InternalInjectorCreator.ToolStageInjector.getScopeBindings() |
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> |
InheritingState.getScopes() |
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> |
State.getScopes()
Returns all the scope bindings at this level and parent levels.
|
Modifier and Type | Method and Description |
---|---|
Errors |
Errors.duplicateScopes(ScopeBinding existing,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
Scope scope) |
static Scoping |
Scoping.forInstance(Scope scope) |
void |
AbstractBindingBuilder.in(Scope scope) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
Indexer.visitScope(Scope scope) |
Modifier and Type | Class and Description |
---|---|
private static class |
ServletScopes.RequestScope |
private static class |
ServletScopes.SessionScope |
Modifier and Type | Field and Description |
---|---|
static Scope |
ServletScopes.REQUEST
HTTP servlet request scope.
|
static Scope |
ServletScopes.SESSION
HTTP session scope.
|
Modifier and Type | Field and Description |
---|---|
private Scope |
ScopeBinding.scope |
Modifier and Type | Method and Description |
---|---|
Scope |
ScopeBinding.getScope() |
Modifier and Type | Method and Description |
---|---|
void |
Elements.RecordingBinder.bindScope(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
Scope scope) |
V |
BindingScopingVisitor.visitScope(Scope scope)
Visit a scope instance.
|
V |
DefaultBindingScopingVisitor.visitScope(Scope scope) |
Constructor and Description |
---|
ScopeBinding(java.lang.Object source,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
Scope scope) |
Modifier and Type | Method and Description |
---|---|
private Scope |
Modules.OverrideModule.getScopeInstanceOrNull(Binding<?> binding) |