Package org.eclipse.e4.core.di.suppliers
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Type
getDesiredType()
The formal type that the objects should be assignable to.<T extends Annotation>
TgetQualifier(Class<T> clazz)
Returns an instance of the qualifier, if it is present in this descriptor, ornull
.Annotation[]
getQualifiers()
Returns qualifiers specified for this object descriptor, ornull
.boolean
hasQualifier(Class<? extends Annotation> clazz)
Use this method to find out if the object descriptor has a qualifier.
-
-
-
Method Detail
-
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;false
otherwise
-
getQualifier
<T extends Annotation> T getQualifier(Class<T> clazz)
Returns an instance of the qualifier, if it is present in this descriptor, ornull
.- 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, ornull
.- Returns:
- qualifiers for this descriptor, or
null
if there are no qualifiers specified
-
-