Package org.int4.dirk.core.definition
Interface Injectable<T>
-
- Type Parameters:
T- the type of the instances produced
- All Superinterfaces:
Constructable<T>
public interface Injectable<T> extends Constructable<T>
Represents a source for an injectable dependency. Injectables can be provided in various ways, either by creating a new instance of a class, by using a known instance or by asking a provider for an instance.Implementations of this interface must provide implementations of
Object.equals(Object)andObject.hashCode(). Two injectables are considered equal when the full generic type is equal, their qualifiers are equal and they come from the exact same source (same class, same method, same field, etc.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Binding>getBindings()Returns theBindings detected.java.util.Set<java.lang.annotation.Annotation>getQualifiers()Returns an unmodifiable set of qualifierAnnotations.ExtendedScopeResolvergetScopeResolver()Returns theExtendedScopeResolverof thisInjectable.java.lang.reflect.TypegetType()Returns theTypewhich is always fully resolved (no type variables) and nevervoid.java.util.Set<java.lang.reflect.Type>getTypes()Returns theTypes of this injectable.-
Methods inherited from interface org.int4.dirk.core.definition.injection.Constructable
create, destroy
-
-
-
-
Method Detail
-
getType
java.lang.reflect.Type getType()
Returns theTypewhich is always fully resolved (no type variables) and nevervoid.- Returns:
- the
Type, nevernull
-
getTypes
java.util.Set<java.lang.reflect.Type> getTypes()
Returns theTypes of this injectable.- Returns:
- the
Types of this injectable, nevernull, empty or containsnull
-
getQualifiers
java.util.Set<java.lang.annotation.Annotation> getQualifiers()
Returns an unmodifiable set of qualifierAnnotations.- Returns:
- an unmodifiable set of qualifier
Annotations, nevernulland never containsnulls but can be empty
-
getBindings
java.util.List<Binding> getBindings()
Returns theBindings detected.- Returns:
- a list
Bindings, nevernull, can be empty if no bindings are detected
-
getScopeResolver
ExtendedScopeResolver getScopeResolver()
Returns theExtendedScopeResolverof thisInjectable.- Returns:
- the
ExtendedScopeResolverof thisInjectable, nevernull
-
-