|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.common.inject.spi.InjectionPoint
public final class InjectionPoint
A constructor, field or method that can receive injections. Typically this is a member with the
@Inject
annotation. For non-private, no argument constructors, the member may
omit the annotation.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
static InjectionPoint |
forConstructorOf(java.lang.Class<?> type)
Returns a new injection point for the injectable constructor of type . |
static InjectionPoint |
forConstructorOf(TypeLiteral<?> type)
Returns a new injection point for the injectable constructor of type . |
static java.util.Set<InjectionPoint> |
forInstanceMethodsAndFields(java.lang.Class<?> type)
Returns all instance method and field injection points on type . |
static java.util.Set<InjectionPoint> |
forInstanceMethodsAndFields(TypeLiteral<?> type)
Returns all instance method and field injection points on type . |
static java.util.Set<InjectionPoint> |
forStaticMethodsAndFields(java.lang.Class<?> type)
Returns all static method and field injection points on type . |
static java.util.Set<InjectionPoint> |
forStaticMethodsAndFields(TypeLiteral type)
Returns all static method and field injection points on type . |
java.util.List<Dependency<?>> |
getDependencies()
Returns the dependencies for this injection point. |
java.lang.reflect.Member |
getMember()
Returns the injected constructor, field, or method. |
int |
hashCode()
|
boolean |
isOptional()
Returns true if this injection point shall be skipped if the injector cannot resolve bindings for all required dependencies. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.reflect.Member getMember()
public java.util.List<Dependency<?>> getDependencies()
public boolean isOptional()
ImplementedBy
, default
constructors etc.) may be used to satisfy optional injection points.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static InjectionPoint forConstructorOf(TypeLiteral<?> type)
type
.
type
- a concrete type with exactly one constructor annotated @Inject
,
or a no-arguments constructor that is not private.
ConfigurationException
- if there is no injectable constructor, more than one injectable
constructor, or if parameters of the injectable constructor are malformed, such as a
parameter with multiple binding annotations.public static InjectionPoint forConstructorOf(java.lang.Class<?> type)
type
.
type
- a concrete type with exactly one constructor annotated @Inject
,
or a no-arguments constructor that is not private.
ConfigurationException
- if there is no injectable constructor, more than one injectable
constructor, or if parameters of the injectable constructor are malformed, such as a
parameter with multiple binding annotations.public static java.util.Set<InjectionPoint> forStaticMethodsAndFields(TypeLiteral type)
type
.
ConfigurationException
- if there is a malformed injection point on type
, such as
a field with multiple binding annotations. The exception's partial value
is a Set<InjectionPoint>
of the valid injection points.public static java.util.Set<InjectionPoint> forStaticMethodsAndFields(java.lang.Class<?> type)
type
.
ConfigurationException
- if there is a malformed injection point on type
, such as
a field with multiple binding annotations. The exception's partial value
is a Set<InjectionPoint>
of the valid injection points.public static java.util.Set<InjectionPoint> forInstanceMethodsAndFields(TypeLiteral<?> type)
type
.
ConfigurationException
- if there is a malformed injection point on type
, such as
a field with multiple binding annotations. The exception's partial value
is a Set<InjectionPoint>
of the valid injection points.public static java.util.Set<InjectionPoint> forInstanceMethodsAndFields(java.lang.Class<?> type)
type
.
ConfigurationException
- if there is a malformed injection point on type
, such as
a field with multiple binding annotations. The exception's partial value
is a Set<InjectionPoint>
of the valid injection points.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |