Package org.eclipse.sisu.inject
Class Sources
java.lang.Object
org.eclipse.sisu.inject.Sources
Utility methods for dealing with annotated sources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Description
Describes the given binding source with the given description.static Description
Describes a new binding source with the given description.static <T extends Annotation>
TgetAnnotation
(com.google.inject.Binding<?> binding, Class<T> annotationType) Searches the binding's source and implementation for an annotation of the given type.static Hidden
hide()
Hides a new binding source from the bean locator.static Hidden
Hides the given binding source from the bean locator.static Priority
prioritize
(int value) Prioritizes a new binding source with the given priority.static Priority
prioritize
(Object source, int value) Prioritizes the given binding source with the given priority.
-
Constructor Details
-
Sources
private Sources()
-
-
Method Details
-
hide
Hides a new binding source from the bean locator.- Returns:
- Hidden source
-
hide
Hides the given binding source from the bean locator.- Parameters:
source
- The source- Returns:
- Hidden source
-
describe
Describes a new binding source with the given description.- Parameters:
value
- The description- Returns:
- Described source
-
describe
Describes the given binding source with the given description.- Parameters:
source
- The sourcevalue
- The description- Returns:
- Described source
-
prioritize
Prioritizes a new binding source with the given priority.- Parameters:
value
- The priority- Returns:
- Prioritized source
-
prioritize
Prioritizes the given binding source with the given priority.- Parameters:
source
- The sourcevalue
- The priority- Returns:
- Prioritized source
-
getAnnotation
public static <T extends Annotation> T getAnnotation(com.google.inject.Binding<?> binding, Class<T> annotationType) Searches the binding's source and implementation for an annotation of the given type.- Parameters:
binding
- The bindingannotationType
- The annotation type- Returns:
- Annotation instance;
null
if it doesn't exist
-