| Modifier and Type | Class and Description |
|---|---|
static class |
Genie.Binder<T>
A
Binder is used in module configure method to define a custom binding. |
| Modifier and Type | Field and Description |
|---|---|
static org.osgl.bootstrap.Version |
VERSION
Describe the version of genie library.
|
| Modifier and Type | Method and Description |
|---|---|
static Genie |
create(InjectListener listener,
java.lang.Object... modules) |
static Genie |
create(java.lang.Object... modules)
Create a Genie instance with modules specified
|
static Genie |
createWithoutPlugins(java.lang.Object... modules)
Create a Genie instance with modules specified
|
<T> T |
get(BeanSpec beanSpec) |
<T> T |
get(java.lang.Class<T> type)
Returns a bean of given type.
|
<T> Provider<T> |
getProvider(java.lang.Class<T> type)
Returns a provider of given type.
|
boolean |
hasProvider(java.lang.Class<?> type)
Check if a type has already been registered with a binding already
|
boolean |
isInheritedScopeStopper(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
Check if a supplied annotation class is a
StopInheritedScope annotation or alias of that annotation. |
boolean |
isPostConstructProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
Check if a supplied annotation class specifies a
PostConstructProcessor. |
boolean |
isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
Check if a supplied annotation class is a
Qualifier. |
boolean |
isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
Check if a supplied annotation class is a
Scope annotation. |
<T> void |
registerGenericTypedBeanLoader(java.lang.Class<T> type,
GenericTypedBeanLoader<T> loader) |
void |
registerInjectTag(java.lang.Class<? extends java.lang.annotation.Annotation>... injectTags) |
void |
registerPostConstructProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass,
PostConstructProcessor<?> processor) |
<T> void |
registerProvider(java.lang.Class<T> type,
Provider<? extends T> provider) |
void |
registerQualifiers(java.lang.Class<? extends java.lang.annotation.Annotation>... qualifiers) |
void |
registerQualifiers(java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> qualifiers) |
void |
registerScopeAlias(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAlias) |
void |
registerScopeProvider(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends ScopeCache> scopeCacheClass) |
void |
registerScopeProvider(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
ScopeCache scopeCache) |
java.lang.Class<? extends java.lang.annotation.Annotation> |
scopeByAlias(java.lang.Class<? extends java.lang.annotation.Annotation> alias)
Returns the scope annotation type from an alias annotation type.
|
boolean |
subjectToInject(java.lang.reflect.AccessibleObject ao) |
boolean |
subjectToInject(BeanSpec beanSpec) |
void |
supportInjectionPoint(boolean enabled) |
public static final org.osgl.bootstrap.Version VERSION
Describe the version of genie library.
public void supportInjectionPoint(boolean enabled)
public <T> T get(java.lang.Class<T> type)
InjectorReturns a bean of given type.
public <T> T get(BeanSpec beanSpec)
public boolean hasProvider(java.lang.Class<?> type)
Check if a type has already been registered with a binding already
type - the classtrue if the type has already been registered to Genie with a bindingpublic <T> Provider<T> getProvider(java.lang.Class<T> type)
InjectorReturns a provider of given type.
getProvider in interface InjectorT - the generic type of the beantype - the class of the bean that provider providespublic <T> void registerProvider(java.lang.Class<T> type,
Provider<? extends T> provider)
public void registerQualifiers(java.lang.Class<? extends java.lang.annotation.Annotation>... qualifiers)
public void registerQualifiers(java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> qualifiers)
public void registerInjectTag(java.lang.Class<? extends java.lang.annotation.Annotation>... injectTags)
public void registerScopeAlias(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAlias)
public void registerScopeProvider(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
ScopeCache scopeCache)
public void registerScopeProvider(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends ScopeCache> scopeCacheClass)
public void registerPostConstructProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass,
PostConstructProcessor<?> processor)
public <T> void registerGenericTypedBeanLoader(java.lang.Class<T> type,
GenericTypedBeanLoader<T> loader)
public boolean isScope(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
InjectorCheck if a supplied annotation class is a Scope annotation.
public boolean isInheritedScopeStopper(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
InjectorCheck if a supplied annotation class is a StopInheritedScope annotation or alias of that annotation.
isInheritedScopeStopper in interface InjectorannoClass - the annotation typetrue if the annotation type is inherited scope stopperpublic boolean isQualifier(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
InjectorCheck if a supplied annotation class is a Qualifier.
isQualifier in interface InjectorannoClass - the annotation typetrue if the annotation type is a qualifier or false otherwisepublic boolean isPostConstructProcessor(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
InjectorCheck if a supplied annotation class specifies a PostConstructProcessor.
isPostConstructProcessor in interface InjectorannoClass - the annotation typetrue if the annotation type specifies post construct processorpublic java.lang.Class<? extends java.lang.annotation.Annotation> scopeByAlias(java.lang.Class<? extends java.lang.annotation.Annotation> alias)
InjectorReturns the scope annotation type from an alias annotation type.
scopeByAlias in interface Injectoralias - the alias of the scope annotationpublic boolean subjectToInject(java.lang.reflect.AccessibleObject ao)
public boolean subjectToInject(BeanSpec beanSpec)
public static Genie create(InjectListener listener, java.lang.Object... modules)
public static Genie create(java.lang.Object... modules)
Create a Genie instance with modules specified
modules - modules that provides binding or @Provides methodspublic static Genie createWithoutPlugins(java.lang.Object... modules)
Create a Genie instance with modules specified
modules - modules that provides binding or @Provides methodsCopyright © 2016–2017 OSGL (Open Source General Library). All rights reserved.