Package org.eclipse.sisu.inject
Class Implementations
- java.lang.Object
-
- org.eclipse.sisu.inject.Implementations
-
final class Implementations extends java.lang.Object
Utility methods for discovering the implementations behind Guice bindings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Implementations.ClassFinder
BindingTargetVisitor
that attempts to find the implementations behind bindings.
-
Field Summary
Fields Modifier and Type Field Description private static boolean
HAS_JSR250_PRIORITY
-
Constructor Summary
Constructors Modifier Constructor Description private
Implementations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static <T extends java.lang.annotation.Annotation>
TadaptJsr250(com.google.inject.Binding<?> binding, java.lang.Class<?> clazz)
private static <T extends java.lang.annotation.Annotation>
TadaptLegacy(com.google.inject.Binding<?> binding, java.lang.Class<?> clazz)
static java.lang.Class<?>
find(com.google.inject.Binding<?> binding)
Attempts to find the implementation behind the givenBinding
.static <T extends java.lang.annotation.Annotation>
TgetAnnotation(com.google.inject.Binding<?> binding, java.lang.Class<T> annotationType)
Attempts to find an annotation on the implementation behind the givenBinding
.
-
-
-
Method Detail
-
find
public static java.lang.Class<?> find(com.google.inject.Binding<?> binding)
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 java.lang.annotation.Annotation> T getAnnotation(com.google.inject.Binding<?> binding, java.lang.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 java.lang.annotation.Annotation> T adaptJsr250(com.google.inject.Binding<?> binding, java.lang.Class<?> clazz)
-
adaptLegacy
private static <T extends java.lang.annotation.Annotation> T adaptLegacy(com.google.inject.Binding<?> binding, java.lang.Class<?> clazz)
-
-