Package org.eclipse.sisu.inject
Class Implementations
java.lang.Object
org.eclipse.sisu.inject.Implementations
Utility methods for discovering the implementations behind Guice bindings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
BindingTargetVisitor
that attempts to find the implementations behind bindings.(package private) static class
Implementations.ClassFinder
that also returnsProvider
implementations.(package private) static final class
Implementations.ProviderFinder
that also returns servlet/filter implementations. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T extends Annotation>
TadaptJsr250
(com.google.inject.Binding<?> binding, Class<?> clazz) private static <T extends Annotation>
TadaptLegacy
(com.google.inject.Binding<?> binding, Class<?> clazz) static Class
<?> find
(com.google.inject.Binding<?> binding) Attempts to find the implementation behind the givenBinding
.static <T extends Annotation>
TgetAnnotation
(com.google.inject.Binding<?> binding, Class<T> annotationType) Attempts to find an annotation on the implementation behind the givenBinding
.
-
Field Details
-
HAS_GUICE_SERVLET
private static final boolean HAS_GUICE_SERVLET -
HAS_JSR250_PRIORITY
private static final boolean HAS_JSR250_PRIORITY
-
-
Constructor Details
-
Implementations
private Implementations()
-
-
Method Details
-
find
Attempts to find the implementation behind the givenBinding
.- Parameters:
binding
- The binding- Returns:
- Implementation class behind the binding;
null
if it couldn't be found
-
getAnnotation
public static <T extends Annotation> T getAnnotation(com.google.inject.Binding<?> binding, Class<T> annotationType) Attempts to find an annotation on the implementation behind the givenBinding
.- Parameters:
binding
- The bindingannotationType
- The annotation type- Returns:
- Annotation on the bound implementation;
null
if it couldn't be found
-
adaptJsr250
private static <T extends Annotation> T adaptJsr250(com.google.inject.Binding<?> binding, Class<?> clazz) -
adaptLegacy
private static <T extends Annotation> T adaptLegacy(com.google.inject.Binding<?> binding, Class<?> clazz)
-