| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object
|
static <T> InjectionPoint |
forConstructor(Constructor
Returns a new injection point for the specified constructor.
|
static <T> InjectionPoint |
forConstructor(Constructor
Returns a new injection point for the specified constructor of
type.
|
static InjectionPoint |
forConstructorOf(Class
Returns a new injection point for the injectable constructor of
type.
|
static InjectionPoint |
forConstructorOf(TypeLiteral
Returns a new injection point for the injectable constructor of
type.
|
static Set |
forInstanceMethodsAndFields(Class
Returns all instance method and field injection points on
type.
|
static Set |
forInstanceMethodsAndFields(TypeLiteral
Returns all instance method and field injection points on
type.
|
static <T> InjectionPoint |
forMethod(Method
Returns a new injection point for the specified method of
type.
|
static Set |
forStaticMethodsAndFields(Class
Returns all static method and field injection points on
type.
|
static Set |
forStaticMethodsAndFields(TypeLiteral
Returns all static method and field injection points on
type.
|
TypeLiteral |
getDeclaringType()
Returns the generic type that defines this injection point.
|
List |
getDependencies()
Returns the dependencies for this injection point.
|
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.
|
boolean |
isToolable()
Returns true if the element is annotated with @
Toolable.
|
String |
toString()
|
public MembergetMember()
public List<Dependency <?>> getDependencies()
public boolean isOptional()
ImplementedBy, default constructors etc.) may be used to satisfy optional injection points.
public boolean isToolable()
Toolable.
public TypeLiteral<?> getDeclaringType()
raw declaring class.
public boolean equals(Objecto)
public int hashCode()
public StringtoString()
public static <T> InjectionPointforConstructor(Constructor <T> constructor)
constructor is parameterized (such as
List<T>), prefer the overload that includes a type literal.
constructor - any single constructor present on
type.
public static <T> InjectionPointforConstructor(Constructor <T> constructor, TypeLiteral <? extends T> type)
type.
constructor - any single constructor present on
type.
type - the concrete type that defines
constructor.
public static InjectionPointforConstructorOf(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 InjectionPointforConstructorOf(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 <T> InjectionPointforMethod(Method method, TypeLiteral <T> type)
type. This is useful for extensions that need to build dependency graphs from arbitrary methods.
method - any single method present on
type.
type - the concrete type that defines
method.
public static 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 Set<InjectionPoint > forStaticMethodsAndFields(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 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 Set<InjectionPoint > forInstanceMethodsAndFields(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.