org.sonatype.inject
Interface BeanEntry<Q extends Annotation,T>

All Superinterfaces:
Map.Entry<Q,T>

public interface BeanEntry<Q extends Annotation,T>
extends Map.Entry<Q,T>

Map Map.Entry that maps a JSR330 @Qualifier annotation to a bean implementation.


Method Summary
 String getDescription()
          Returns a human-readable description of the bean; see @Description.
 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.
 int getRank()
          Returns the bean's rank; higher ranked beans override lower ranked beans.
 Object getSource()
          Returns an arbitrary object that describes where this bean was configured.
 T getValue()
          Creates an instance of the bean; returns same instance for each subsequent 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 Map.Entry<Q extends Annotation,T>
Returns:
Qualifier annotation

getValue

T getValue()
Creates an instance of the bean; returns same instance for each subsequent call.

Specified by:
getValue in interface Map.Entry<Q extends Annotation,T>
Returns:
Bean instance (lazily-created)

getDescription

String getDescription()
Returns a human-readable description of the bean; see @Description.

Returns:
Human-readable description

getImplementationClass

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

Object getSource()
Returns an arbitrary object that describes where this bean was configured.

Returns:
Source location
See Also:
Object.toString()

getRank

int getRank()
Returns the bean's rank; higher ranked beans override lower ranked beans.

Returns:
Assigned rank


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.