| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Annotations.
Checks for the presence of annotations. |
| private static class | |
| private static @interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final Annotations. | |
| private static final Annotations. | |
| private static final LoadingCache | |
| private static final Joiner. | |
| private static final Annotations. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | annotationEquals(Class<? extends Annotation> type, Map<String, Object> members, Object other)
Implements |
| private static int | annotationHashCode(Class<? extends Annotation> type, Map<String, Object> members)
Implements |
| public static String | annotationInstanceClassString(Class<? extends Annotation> ann, boolean includePackage)
Returns the string representation of the annotation class as it would appear in an annotation instance's toString() method. |
| private static String | annotationToString(Class<? extends Annotation> type, Map<String, Object> members)
Implements |
| public static Annotation | canonicalizeIfNamed(Annotation annotation)
If the annotation is an instance of |
| public static Class | canonicalizeIfNamed(Class<? extends Annotation> annotationType)
If the annotation is the class |
| public static void | checkForMisplacedScopeAnnotations(Class<?> type, Object source, Errors errors)
Adds an error if there is a misplaced annotations on |
| pack-priv static boolean | |
| private static Annotations. | |
| private static String | |
| public static Annotation | findBindingAnnotation(Errors errors, Member member, Annotation[] annotations)
Returns the binding annotation on |
| public static Class | findScopeAnnotation(Errors errors, Class<?> implementation)
Returns the scope annotation on |
| public static Class | findScopeAnnotation(Errors errors, Annotation[] annotations)
Returns the scoping annotation, or null if there isn't one. |
| public static <T extends Annotation> T | |
| private static <T extends Annotation> T | |
| public static Key | getKey(TypeLiteral<?> type, Member member, Annotation[] annotations, Errors errors)
Gets a key for the given type, member and annotations. |
| public static boolean | |
| public static boolean | isBindingAnnotation(Class<? extends Annotation> annotationType)
Returns true if annotations of the specified type are binding annotations. |
| public static boolean | isMarker(Class<? extends Annotation> annotationType)
Returns |
| public static boolean | isRetainedAtRuntime(Class<? extends Annotation> annotationType)
Returns true if the given annotation is retained at runtime. |
| public static boolean | |
| public static String | memberValueString(String value)
Returns |
| public static String | memberValueString(String memberName, Object value)
Returns string representation of the annotation memeber. |
| public static String | |
| private static ImmutableMap |
| ANNOTATION_TO_STRING_CONFIG | back to summary |
|---|---|
| private static final Annotations. | |
| bindingAnnotationChecker | back to summary |
|---|---|
| private static final Annotations. | |
| cache | back to summary |
|---|---|
| private static final LoadingCache<Class<? extends Annotation>, Annotation> cache | |
| JOINER | back to summary |
|---|---|
| private static final Joiner. | |
| scopeChecker | back to summary |
|---|---|
| private static final Annotations. | |
| Annotations | back to summary |
|---|---|
| public Annotations() | |
| annotationEquals | back to summary |
|---|---|
| private static boolean annotationEquals(Class<? extends Annotation> type, Map<String, Object> members, Object other) throws Exception Implements | |
| annotationHashCode | back to summary |
|---|---|
| private static int annotationHashCode(Class<? extends Annotation> type, Map<String, Object> members) throws Exception Implements | |
| annotationInstanceClassString | back to summary |
|---|---|
| public static String annotationInstanceClassString(Class<? extends Annotation> ann, boolean includePackage) Returns the string representation of the annotation class as it would appear in an annotation instance's toString() method. In earlier JDKs, the string representation mirrored Class.getName() (which uses $ to separate outer and inner classes), but newer JDKs use . as the separator). | |
| annotationToString | back to summary |
|---|---|
| private static String annotationToString(Class<? extends Annotation> type, Map<String, Object> members) throws Exception Implements | |
| canonicalizeIfNamed | back to summary |
|---|---|
| public static Annotation canonicalizeIfNamed(Annotation annotation) If the annotation is an instance of | |
| canonicalizeIfNamed | back to summary |
|---|---|
| public static Class If the annotation is the class | |
| checkForMisplacedScopeAnnotations | back to summary |
|---|---|
| public static void checkForMisplacedScopeAnnotations(Class<?> type, Object source, Errors errors) Adds an error if there is a misplaced annotations on | |
| containsComponentAnnotation | back to summary |
|---|---|
| pack-priv static boolean containsComponentAnnotation(Annotation[] annotations) | |
| determineAnnotationToStringConfig | back to summary |
|---|---|
private static Annotations.
| |
| dotSeparatedParentOrPackage | back to summary |
|---|---|
| private static String dotSeparatedParentOrPackage(Class<?> ann, boolean includePackage) | |
| findBindingAnnotation | back to summary |
|---|---|
| public static Annotation findBindingAnnotation(Errors errors, Member member, Annotation[] annotations) Returns the binding annotation on | |
| findScopeAnnotation | back to summary |
|---|---|
| public static Class Returns the scope annotation on | |
| findScopeAnnotation | back to summary |
|---|---|
| public static Class Returns the scoping annotation, or null if there isn't one. | |
| generateAnnotation | back to summary |
|---|---|
| public static <T extends Annotation> T generateAnnotation(Class<T> annotationType) Generates an Annotation for the annotation class. Requires that the annotation is all optionals.
| |
| generateAnnotationImpl | back to summary |
|---|---|
| private static <T extends Annotation> T generateAnnotationImpl(final Class<T> annotationType) | |
| getKey | back to summary |
|---|---|
| public static Key Gets a key for the given type, member and annotations. | |
| isAllDefaultMethods | back to summary |
|---|---|
| public static boolean isAllDefaultMethods(Class<? extends Annotation> annotationType) | |
| isBindingAnnotation | back to summary |
|---|---|
| public static boolean isBindingAnnotation(Class<? extends Annotation> annotationType) Returns true if annotations of the specified type are binding annotations. | |
| isMarker | back to summary |
|---|---|
| public static boolean isMarker(Class<? extends Annotation> annotationType) Returns | |
| isRetainedAtRuntime | back to summary |
|---|---|
| public static boolean isRetainedAtRuntime(Class<? extends Annotation> annotationType) Returns true if the given annotation is retained at runtime. | |
| isScopeAnnotation | back to summary |
|---|---|
| public static boolean isScopeAnnotation(Class<? extends Annotation> annotationType) | |
| memberValueString | back to summary |
|---|---|
| public static String memberValueString(String value) Returns | |
| memberValueString | back to summary |
|---|---|
| public static String memberValueString(String memberName, Object value) Returns string representation of the annotation memeber. The value of the member is prefixed with `memberName=` unless the runtime omits the member name. The value of the member is quoted if annotation implementations quote their member values and the value type is String. In Java 9, annotations quote their string members and in Java 15, the member name is omitted. | |
| nameOf | back to summary |
|---|---|
| public static String nameOf(Key<?> key) Returns the name the binding should use. This is based on the annotation. If the annotation has an instance and is not a marker annotation, we ask the annotation for its toString. If it was a marker annotation or just an annotation type, we use the annotation's name. Otherwise, the name is the empty string. | |
| resolveMembers | back to summary |
|---|---|
| private static ImmutableMap | |
| Modifier and Type | Field and Description |
|---|---|
| private final Collection | |
| pack-priv final LoadingCache | |
| private CacheLoader | hasAnnotations
Returns true if the given class has one of the desired annotations. |
| Access | Constructor and Description |
|---|---|
| pack-priv | AnnotationChecker(Collection<Class<? extends Annotation>> annotationTypes)
Constructs a new checker that looks for annotations of the given types. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | hasAnnotations(Class<? extends Annotation> annotated)
Returns true if the given type has one of the desired annotations. |
| annotationTypes | back to summary |
|---|---|
| private final Collection<Class<? extends Annotation>> annotationTypes | |
| cache | back to summary |
|---|---|
| pack-priv final LoadingCache<Class<? extends Annotation>, Boolean> cache | |
| hasAnnotations | back to summary |
|---|---|
| private CacheLoader<Class<? extends Annotation>, Boolean> hasAnnotations Returns true if the given class has one of the desired annotations. | |
| AnnotationChecker | back to summary |
|---|---|
| pack-priv AnnotationChecker(Collection<Class<? extends Annotation>> annotationTypes) Constructs a new checker that looks for annotations of the given types. | |
| hasAnnotations | back to summary |
|---|---|
| pack-priv boolean hasAnnotations(Class<? extends Annotation> annotated) Returns true if the given type has one of the desired annotations. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| dollarSeparator | back to summary |
|---|---|
| pack-priv final boolean dollarSeparator | |
| includeMemberName | back to summary |
|---|---|
| pack-priv final boolean includeMemberName | |
| quote | back to summary |
|---|---|
| pack-priv final boolean quote | |
| AnnotationToStringConfig | back to summary |
|---|---|
| pack-priv AnnotationToStringConfig(boolean quote, boolean includeMemberName, boolean dollarSeparator) | |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| value | back to summary |
|---|---|
| public String value() | |