Interface BeanEntry<Q extends java.lang.annotation.Annotation,​T>

  • All Superinterfaces:
    java.util.Map.Entry<Q,​T>
    All Known Subinterfaces:
    BeanEntry<Q,​T>
    All Known Implementing Classes:
    LazyBeanEntry

    public interface BeanEntry<Q extends java.lang.annotation.Annotation,​T>
    extends java.util.Map.Entry<Q,​T>
    Describes BeanEntryualified bean implementations of BeanEntry:

     @Inject
     Iterable<BeanEntry<Named, Command>> commands;
     
    Use this when you want to know more about available beans; especially if you want to avoid creating instances.
    See Also:
    BeanLocator
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns a human-readable description of the bean; see @Description.
      java.lang.Class<T> getImplementationClass()
      Attempts to find the implementation type without creating the bean instance.
      Q getKey()
      Returns the @Qualifier annotation associated with this particular bean.
      javax.inject.Provider<T> getProvider()
      Returns the underlying Provider; may support creation of multiple instances.
      int getRank()
      Returns the bean's rank; higher ranked beans override lower ranked beans.
      java.lang.Object getSource()
      Returns an arbitrary object that indicates where this bean was configured.
      T getValue()
      Returns the associated instance of the bean; returns same instance for each call.
      • Methods inherited from interface java.util.Map.Entry

        equals, hashCode, setValue
    • Method Detail

      • getKey

        Q getKey()
        Returns the @Qualifier annotation associated with this particular bean.
        Specified by:
        getKey in interface java.util.Map.Entry<Q extends java.lang.annotation.Annotation,​T>
        Returns:
        Qualifier annotation
      • getValue

        T getValue()
        Returns the associated instance of the bean; returns same instance for each call.
        Specified by:
        getValue in interface java.util.Map.Entry<Q extends java.lang.annotation.Annotation,​T>
        Returns:
        Bean instance (lazily-created)
      • getProvider

        javax.inject.Provider<T> getProvider()
        Returns the underlying Provider; may support creation of multiple instances.
        Returns:
        Bean provider
      • getDescription

        java.lang.String getDescription()
        Returns a human-readable description of the bean; see @Description.
        Returns:
        Human-readable description
        See Also:
        Description
      • getImplementationClass

        java.lang.Class<T> getImplementationClass()
        Attempts to find the implementation type without creating the bean instance.
        Returns:
        Implementation type; null if the type cannot be determined
      • getSource

        java.lang.Object getSource()
        Returns an arbitrary object that indicates where this bean was configured.
        Returns:
        Source location
      • getRank

        int getRank()
        Returns the bean's rank; higher ranked beans override lower ranked beans.
        Returns:
        Assigned rank
        See Also:
        Priority