@Internal public class AnnotationUtil extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.reflect.AnnotatedElement |
EMPTY_ANNOTATED_ELEMENT
An empty re-usable element.
|
static java.util.List<java.lang.String> |
INTERNAL_ANNOTATION_NAMES |
static java.lang.String |
KOTLIN_METADATA
Constant for Kotlin metadata.
|
static java.lang.String |
NON_NULL
Simple Annotation name used for non-null.
|
static java.lang.String |
NULLABLE
Simple Annotation name used for nullable.
|
static java.util.List<java.lang.String> |
STEREOTYPE_EXCLUDES
Packages excludes from stereotype processing.
|
static java.lang.reflect.AnnotatedElement[] |
ZERO_ANNOTATED_ELEMENTS
Constant indicating an zero annotation.
|
static java.lang.annotation.Annotation[] |
ZERO_ANNOTATIONS
Constant indicating an zero annotation.
|
Constructor and Description |
---|
AnnotationUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areEqual(java.lang.Object o1,
java.lang.Object o2)
Computes whether 2 annotation values are equal.
|
static int |
calculateHashCode(java.util.Map<? extends java.lang.CharSequence,java.lang.Object> values)
Calculates the hash code of annotation values.
|
static java.util.List<java.lang.String> |
internListOf(java.lang.Object... objects)
Converts the given objects into a set of potentially cached and interned strings contained within an internal pool of lists.
|
static java.util.Map<java.lang.String,java.lang.Object> |
internMapOf(java.lang.Object... values)
Converts the given objects into a map of potentially cached and interned strings where the keys and values are alternating entries in the passed array.
|
public static final java.lang.String KOTLIN_METADATA
public static final java.util.List<java.lang.String> INTERNAL_ANNOTATION_NAMES
public static final java.util.List<java.lang.String> STEREOTYPE_EXCLUDES
public static final java.lang.annotation.Annotation[] ZERO_ANNOTATIONS
public static final java.lang.reflect.AnnotatedElement[] ZERO_ANNOTATED_ELEMENTS
public static final java.lang.reflect.AnnotatedElement EMPTY_ANNOTATED_ELEMENT
public static final java.lang.String NULLABLE
public static final java.lang.String NON_NULL
public static java.util.List<java.lang.String> internListOf(java.lang.Object... objects)
String.intern()
.
This method serves the purpose of reducing memory footprint by pooling common lists of annotations in compiled AnnotationMetadata
objects
- The objectspublic static java.util.Map<java.lang.String,java.lang.Object> internMapOf(java.lang.Object... values)
String.intern()
.
The values stored at even number positions will be converted to strings and interned.
values
- The objectsCollectionUtils.mapOf(Object...)
public static int calculateHashCode(java.util.Map<? extends java.lang.CharSequence,java.lang.Object> values)
values
- The map to calculate values' hash codepublic static boolean areEqual(java.lang.Object o1, java.lang.Object o2)
o1
- One objecto2
- Another object