|
spring-beans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.beans.factory.config.DependencyDescriptor
public class DependencyDescriptor
Descriptor for a specific dependency that is about to be injected. Wraps a constructor parameter, a method parameter or a field, allowing unified access to their metadata.
Constructor Summary | |
---|---|
DependencyDescriptor(java.lang.reflect.Field field,
boolean required)
Create a new descriptor for a field. |
|
DependencyDescriptor(java.lang.reflect.Field field,
boolean required,
boolean eager)
Create a new descriptor for a field. |
|
DependencyDescriptor(org.springframework.core.MethodParameter methodParameter,
boolean required)
Create a new descriptor for a method or constructor parameter. |
|
DependencyDescriptor(org.springframework.core.MethodParameter methodParameter,
boolean required,
boolean eager)
Create a new descriptor for a method or constructor parameter. |
Method Summary | |
---|---|
java.lang.annotation.Annotation[] |
getAnnotations()
Obtain the annotations associated with the wrapped parameter/field, if any. |
java.lang.Class<?> |
getCollectionType()
Determine the generic element type of the wrapped Collection parameter/field, if any. |
java.lang.String |
getDependencyName()
Determine the name of the wrapped parameter/field. |
java.lang.Class<?> |
getDependencyType()
Determine the declared (non-generic) type of the wrapped parameter/field. |
java.lang.reflect.Field |
getField()
Return the wrapped Field, if any. |
java.lang.Class<?> |
getMapKeyType()
Determine the generic key type of the wrapped Map parameter/field, if any. |
java.lang.Class<?> |
getMapValueType()
Determine the generic value type of the wrapped Map parameter/field, if any. |
org.springframework.core.MethodParameter |
getMethodParameter()
Return the wrapped MethodParameter, if any. |
void |
increaseNestingLevel()
|
void |
initParameterNameDiscovery(org.springframework.core.ParameterNameDiscoverer parameterNameDiscoverer)
Initialize parameter name discovery for the underlying method parameter, if any. |
boolean |
isEager()
Return whether this dependency is 'eager' in the sense of eagerly resolving potential target beans for type matching. |
boolean |
isRequired()
Return whether this dependency is required. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DependencyDescriptor(org.springframework.core.MethodParameter methodParameter, boolean required)
methodParameter
- the MethodParameter to wraprequired
- whether the dependency is requiredpublic DependencyDescriptor(org.springframework.core.MethodParameter methodParameter, boolean required, boolean eager)
methodParameter
- the MethodParameter to wraprequired
- whether the dependency is requiredeager
- whether this dependency is 'eager' in the sense of
eagerly resolving potential target beans for type matchingpublic DependencyDescriptor(java.lang.reflect.Field field, boolean required)
field
- the field to wraprequired
- whether the dependency is requiredpublic DependencyDescriptor(java.lang.reflect.Field field, boolean required, boolean eager)
field
- the field to wraprequired
- whether the dependency is requiredeager
- whether this dependency is 'eager' in the sense of
eagerly resolving potential target beans for type matchingMethod Detail |
---|
public org.springframework.core.MethodParameter getMethodParameter()
Note: Either MethodParameter or Field is available.
null
if nonepublic java.lang.reflect.Field getField()
Note: Either MethodParameter or Field is available.
null
if nonepublic boolean isRequired()
public boolean isEager()
public void increaseNestingLevel()
public void initParameterNameDiscovery(org.springframework.core.ParameterNameDiscoverer parameterNameDiscoverer)
This method does not actually try to retrieve the parameter name at
this point; it just allows discovery to happen when the application calls
getDependencyName()
(if ever).
public java.lang.String getDependencyName()
null
)public java.lang.Class<?> getDependencyType()
null
)public java.lang.Class<?> getCollectionType()
null
if nonepublic java.lang.Class<?> getMapKeyType()
null
if nonepublic java.lang.Class<?> getMapValueType()
null
if nonepublic java.lang.annotation.Annotation[] getAnnotations()
|
spring-beans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |