| 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 osgl.version.Version |
VERSION
Describe the version of genie library.
|
| Modifier and Type | Method and Description |
|---|---|
static Genie |
create(InjectListener listener,
Object... modules) |
static Genie |
create(Object... modules)
Create a Genie instance with modules specified
|
static Genie |
createWithoutPlugins(Object... modules)
Create a Genie instance with modules specified
|
<T> T |
get(BeanSpec beanSpec) |
<T> T |
get(Class<T> type)
Returns a bean of given type.
|
<T> javax.inject.Provider<T> |
getProvider(Class<T> type)
Returns a provider of given type.
|
boolean |
hasProvider(Class<?> type)
Check if a type has already been registered with a binding already
|
boolean |
isInheritedScopeStopper(Class<? extends Annotation> annoClass)
Check if a supplied annotation class is a
StopInheritedScope annotation or alias of that annotation. |
boolean |
isPostConstructProcessor(Class<? extends Annotation> annoClass)
Check if a supplied annotation class specifies a
PostConstructProcessor. |
boolean |
isQualifier(Class<? extends Annotation> annoClass)
Check if a supplied annotation class is a
Qualifier. |
boolean |
isScope(Class<? extends Annotation> annoClass)
Check if a supplied annotation class is a
Scope annotation. |
<T> void |
registerGenericTypedBeanLoader(Class<T> type,
GenericTypedBeanLoader<T> loader) |
void |
registerInjectTag(Class<? extends Annotation>... injectTags) |
void |
registerPostConstructProcessor(Class<? extends Annotation> annoClass,
PostConstructProcessor<?> processor) |
<T> void |
registerProvider(Class<T> type,
javax.inject.Provider<? extends T> provider) |
void |
registerQualifiers(Class<? extends Annotation>... qualifiers) |
void |
registerQualifiers(Collection<Class<? extends Annotation>> qualifiers) |
void |
registerScopeAlias(Class<? extends Annotation> scopeAnnotation,
Class<? extends Annotation> scopeAlias) |
void |
registerScopeProvider(Class<? extends Annotation> scopeAnnotation,
Class<? extends ScopeCache> scopeCacheClass) |
void |
registerScopeProvider(Class<? extends Annotation> scopeAnnotation,
ScopeCache scopeCache) |
Class<? extends Annotation> |
scopeByAlias(Class<? extends Annotation> alias)
Returns the scope annotation type from an alias annotation type.
|
boolean |
subjectToInject(AccessibleObject ao) |
boolean |
subjectToInject(BeanSpec beanSpec) |
void |
supportInjectionPoint(boolean enabled) |
public static final osgl.version.Version VERSION
Describe the version of genie library.
public void supportInjectionPoint(boolean enabled)
public <T> T get(Class<T> type)
InjectorReturns a bean of given type.
public <T> T get(BeanSpec beanSpec)
public boolean hasProvider(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> javax.inject.Provider<T> getProvider(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(Class<T> type, javax.inject.Provider<? extends T> provider)
public void registerQualifiers(Class<? extends Annotation>... qualifiers)
public void registerQualifiers(Collection<Class<? extends Annotation>> qualifiers)
public void registerInjectTag(Class<? extends Annotation>... injectTags)
public void registerScopeAlias(Class<? extends Annotation> scopeAnnotation, Class<? extends Annotation> scopeAlias)
public void registerScopeProvider(Class<? extends Annotation> scopeAnnotation, ScopeCache scopeCache)
public void registerScopeProvider(Class<? extends Annotation> scopeAnnotation, Class<? extends ScopeCache> scopeCacheClass)
public void registerPostConstructProcessor(Class<? extends Annotation> annoClass, PostConstructProcessor<?> processor)
public <T> void registerGenericTypedBeanLoader(Class<T> type, GenericTypedBeanLoader<T> loader)
public boolean isScope(Class<? extends Annotation> annoClass)
InjectorCheck if a supplied annotation class is a Scope annotation.
public boolean isInheritedScopeStopper(Class<? extends 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(Class<? extends 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(Class<? extends 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 Class<? extends Annotation> scopeByAlias(Class<? extends Annotation> alias)
InjectorReturns the scope annotation type from an alias annotation type.
scopeByAlias in interface Injectoralias - the alias of the scope annotationpublic boolean subjectToInject(AccessibleObject ao)
public boolean subjectToInject(BeanSpec beanSpec)
public static Genie create(InjectListener listener, Object... modules)
public static Genie create(Object... modules)
Create a Genie instance with modules specified
modules - modules that provides binding or @Provides methodsCopyright © 2016–2018 OSGL (Open Source General Library). All rights reserved.