MCPcopy Index your code
hub / github.com/classgraph/classgraph / AnnotationInfo

Class AnnotationInfo

src/main/java/io/github/classgraph/AnnotationInfo.java:47–563  ·  view source on GitHub ↗

Holds metadata about a specific annotation instance on a class, method, method parameter or field.

Source from the content-addressed store, hash-verified

45
46/** Holds metadata about a specific annotation instance on a class, method, method parameter or field. */
47public class AnnotationInfo extends ScanResultObject implements Comparable<AnnotationInfo>, HasName {
48 /** The name. */
49 private String name;
50
51 /** The annotation param values. */
52 private AnnotationParameterValueList annotationParamValues;
53
54 /**
55 * Set to true once any Object[] arrays of boxed types in annotationParamValues have been lazily converted to
56 * primitive arrays.
57 */
58 private transient boolean annotationParamValuesHasBeenConvertedToPrimitive;
59
60 /** The annotation param values with defaults. */
61 private transient AnnotationParameterValueList annotationParamValuesWithDefaults;
62
63 /** Default constructor for deserialization. */
64 AnnotationInfo() {
65 super();
66 }
67
68 // -------------------------------------------------------------------------------------------------------------
69
70 /**
71 * Constructor.
72 *
73 * @param name
74 * The name of the annotation.
75 * @param annotationParamValues
76 * The annotation parameter values, or null if none.
77 */
78 AnnotationInfo(final String name, final AnnotationParameterValueList annotationParamValues) {
79 super();
80 this.name = name;
81 this.annotationParamValues = annotationParamValues;
82 }
83
84 // -------------------------------------------------------------------------------------------------------------
85
86 /**
87 * Get the name.
88 *
89 * @return The name of the annotation class.
90 */
91 @Override
92 public String getName() {
93 return name;
94 }
95
96 /**
97 * Checks if the annotation is inherited.
98 *
99 * @return true if this annotation is meta-annotated with {@link Inherited}.
100 */
101 public boolean isInherited() {
102 return getClassInfo().isInherited;
103 }
104

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…