public class Annotation extends Object
Modifier and Type | Method and Description |
---|---|
protected static Collection<Annotation> |
convertToAnnotations(ClassLoaderReference clRef,
AnnotationsReader.AnnotationAttribute[] allAnnotations) |
boolean |
equals(Object obj) |
static Collection<Annotation> |
getAnnotationsFromReader(AnnotationsReader r,
ClassLoaderReference clRef) |
Map<String,AnnotationsReader.ElementValue> |
getNamedArguments()
Get the named arguments to the annotation, represented as a mapping from
name to value
|
static Collection<Annotation>[] |
getParameterAnnotationsFromReader(AnnotationsReader r,
ClassLoaderReference clRef)
If r != null, return parameter annotations as an array with length equal to
number of annotatable parameters.
|
TypeReference |
getType()
Get the type of the annotation
|
Pair<TypeReference,Object>[] |
getUnnamedArguments()
Get the unnamed arguments to the annotation (e.g., constructor arguments
for C# attributes), represented as an array of pairs (T,V), where T is the
argument type and V is the value.
|
int |
hashCode() |
static Annotation |
make(TypeReference t) |
static Annotation |
makeUnnamedAndNamed(TypeReference t,
Map<String,AnnotationsReader.ElementValue> namedArguments,
Pair<TypeReference,Object>[] unnamedArguments) |
static Annotation |
makeWithNamed(TypeReference t,
Map<String,AnnotationsReader.ElementValue> namedArguments) |
static Annotation |
makeWithUnnamed(TypeReference t,
Pair<TypeReference,Object>[] unnamedArguments) |
String |
toString() |
public static Annotation makeUnnamedAndNamed(TypeReference t, Map<String,AnnotationsReader.ElementValue> namedArguments, Pair<TypeReference,Object>[] unnamedArguments)
public static Annotation makeWithUnnamed(TypeReference t, Pair<TypeReference,Object>[] unnamedArguments)
public static Annotation make(TypeReference t)
public static Annotation makeWithNamed(TypeReference t, Map<String,AnnotationsReader.ElementValue> namedArguments)
public static Collection<Annotation> getAnnotationsFromReader(AnnotationsReader r, ClassLoaderReference clRef) throws InvalidClassFileException
InvalidClassFileException
public static Collection<Annotation>[] getParameterAnnotationsFromReader(AnnotationsReader r, ClassLoaderReference clRef) throws InvalidClassFileException
InvalidClassFileException
protected static Collection<Annotation> convertToAnnotations(ClassLoaderReference clRef, AnnotationsReader.AnnotationAttribute[] allAnnotations)
public Pair<TypeReference,Object>[] getUnnamedArguments()
public Map<String,AnnotationsReader.ElementValue> getNamedArguments()
public TypeReference getType()