Interface IObjectDescriptor


public interface IObjectDescriptor
This interface describes objects created by the dependency injection.

From the view point of the injector, objects are described by a type with a set of optional qualifiers.

Since:
1.7
See Also:
  • Qualifier
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    The formal type that the objects should be assignable to.
    <T extends Annotation>
    T
    getQualifier(Class<T> clazz)
    Returns an instance of the qualifier, if it is present in this descriptor, or null.
    Returns qualifiers specified for this object descriptor, or null.
    boolean
    hasQualifier(Class<? extends Annotation> clazz)
    Use this method to find out if the object descriptor has a qualifier.
  • Method Details

    • getDesiredType

      Type getDesiredType()
      The formal type that the objects should be assignable to.
      Returns:
      the expected object's type
    • hasQualifier

      boolean hasQualifier(Class<? extends Annotation> clazz)
      Use this method to find out if the object descriptor has a qualifier.
      Parameters:
      clazz - qualifier
      Returns:
      true if the object descriptor has the qualifier; falseotherwise
    • getQualifier

      <T extends Annotation> T getQualifier(Class<T> clazz)
      Returns an instance of the qualifier, if it is present in this descriptor, or null.
      Type Parameters:
      T - qualifier class
      Parameters:
      clazz - the qualifier's class
      Returns:
      the qualifier instance, if present, or null
    • getQualifiers

      Annotation[] getQualifiers()
      Returns qualifiers specified for this object descriptor, or null.
      Returns:
      qualifiers for this descriptor, or null if there are no qualifiers specified