public class AnnotationAttribute extends Object
Annotation
.Constructor and Description |
---|
AnnotationAttribute(Class<? extends Annotation> annotationType)
|
AnnotationAttribute(Class<? extends Annotation> annotationType,
String attributeName)
Creates a new
AnnotationAttribute for the given Annotation type and annotation attribute name. |
Modifier and Type | Method and Description |
---|---|
Class<? extends Annotation> |
getAnnotationType()
Returns the annotation type.
|
String |
getValueFrom(AnnotatedElement annotatedElement)
Reads the
Annotation attribute's value from the given AnnotatedElement . |
String |
getValueFrom(Annotation annotation)
Returns the
Annotation attribute's value from the given Annotation . |
String |
getValueFrom(MethodParameter parameter)
Reads the
Annotation attribute's value from the given MethodParameter . |
public AnnotationAttribute(Class<? extends Annotation> annotationType)
annotationType
- must not be null.public AnnotationAttribute(Class<? extends Annotation> annotationType, String attributeName)
AnnotationAttribute
for the given Annotation
type and annotation attribute name.annotationType
- must not be null.attributeName
- can be null, defaults to value
.public Class<? extends Annotation> getAnnotationType()
public String getValueFrom(MethodParameter parameter)
Annotation
attribute's value from the given MethodParameter
.parameter
- must not be null.public String getValueFrom(AnnotatedElement annotatedElement)
Annotation
attribute's value from the given AnnotatedElement
.annotatedElement
- must not be null.public String getValueFrom(Annotation annotation)
Annotation
attribute's value from the given Annotation
.annotation
- must not be null.Copyright © 2012-2016–2018 Pivotal, Inc.. All rights reserved.