Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » config » [javadoc | source]
org.springframework.beans.factory.config
public class: DependencyDescriptor [javadoc | source]
java.lang.Object
   org.springframework.beans.factory.config.DependencyDescriptor

Direct Known Subclasses:
    LookupDependencyDescriptor

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:
 public DependencyDescriptor(MethodParameter methodParameter,
    boolean required) 
    Create a new descriptor for a method or constructor parameter. Considers the dependency as 'eager'.
    Parameters:
    methodParameter - the MethodParameter to wrap
    required - whether the dependency is required
 public DependencyDescriptor(Field field,
    boolean required) 
    Create a new descriptor for a field. Considers the dependency as 'eager'.
    Parameters:
    field - the field to wrap
    required - whether the dependency is required
 public DependencyDescriptor(MethodParameter methodParameter,
    boolean required,
    boolean eager) 
    Create a new descriptor for a method or constructor parameter.
    Parameters:
    methodParameter - the MethodParameter to wrap
    required - whether the dependency is required
    eager - whether this dependency is 'eager' in the sense of eagerly resolving potential target beans for type matching
 public DependencyDescriptor(Field field,
    boolean required,
    boolean eager) 
    Create a new descriptor for a field.
    Parameters:
    field - the field to wrap
    required - whether the dependency is required
    eager - whether this dependency is 'eager' in the sense of eagerly resolving potential target beans for type matching
Method from org.springframework.beans.factory.config.DependencyDescriptor Summary:
getAnnotations,   getCollectionType,   getDependencyType,   getField,   getMapKeyType,   getMapValueType,   getMethodParameter,   isEager,   isRequired
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.config.DependencyDescriptor Detail:
 public Object[] getAnnotations() 
    Obtain the annotations associated with the wrapped parameter/field, if any.
 public Class getCollectionType() 
    Determine the generic element type of the wrapped Collection parameter/field, if any.
 public Class getDependencyType() 
    Determine the declared (non-generic) type of the wrapped parameter/field.
 public Field getField() 
    Return the wrapped Field, if any.

    Note: Either MethodParameter or Field is available.

 public Class getMapKeyType() 
    Determine the generic key type of the wrapped Map parameter/field, if any.
 public Class getMapValueType() 
    Determine the generic value type of the wrapped Map parameter/field, if any.
 public MethodParameter getMethodParameter() 
    Return the wrapped MethodParameter, if any.

    Note: Either MethodParameter or Field is available.

 public boolean isEager() 
    Return whether this dependency is 'eager' in the sense of eagerly resolving potential target beans for type matching.
 public boolean isRequired() 
    Return whether this dependency is required.