Modifier and Type | Field and Description |
---|---|
static AnnotatedElement |
EMPTY_ANNOTATED_ELEMENT
An empty re-usable element.
|
static List<String> |
INTERNAL_ANNOTATION_NAMES |
static String |
KOTLIN_METADATA
Constant for Kotlin metadata.
|
static AnnotatedElement[] |
ZERO_ANNOTATED_ELEMENTS
Constant indicating an zero annotation.
|
static Annotation[] |
ZERO_ANNOTATIONS
Constant indicating an zero annotation.
|
Constructor and Description |
---|
AnnotationUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areEqual(Object o1,
Object o2)
Computes whether 2 annotation values are equal.
|
static int |
calculateHashCode(Map<? extends CharSequence,Object> values)
Calculates the hash code of annotation values.
|
static List<String> |
internListOf(Object... objects)
Converts the given objects into a set of potentially cached and interned strings contained within an internal pool of lists.
|
static Map<String,Object> |
internMapOf(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 String KOTLIN_METADATA
public static final Annotation[] ZERO_ANNOTATIONS
public static final AnnotatedElement[] ZERO_ANNOTATED_ELEMENTS
public static final AnnotatedElement EMPTY_ANNOTATED_ELEMENT
public static List<String> internListOf(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 Map<String,Object> internMapOf(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(Map<? extends CharSequence,Object> values)
values
- The map to calculate values' hash code