|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.jqno.equalsverifier.util.annotations.AnnotationAccessor
public class AnnotationAccessor
Provides access to the annotations that are defined on a class and its fields.
Constructor Summary | |
---|---|
AnnotationAccessor(Annotation[] supportedAnnotations,
Class<?> type,
boolean ignoreFailure)
Constructor |
Method Summary | |
---|---|
boolean |
fieldHas(String fieldName,
Annotation annotation)
Determines whether type has a particular annotation on a
particular field. |
boolean |
typeHas(Annotation annotation)
Determines whether type has a particular annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationAccessor(Annotation[] supportedAnnotations, Class<?> type, boolean ignoreFailure)
supportedAnnotations
- Collection of annotations to query.type
- The class whose annotations need to be queried.ignoreFailure
- Ignore when processing annotations fails when the
class file cannot be read.Method Detail |
---|
public boolean typeHas(Annotation annotation)
type
has a particular annotation.
annotation
- The annotation we want to find.
type
has an annotation with the supplied name.public boolean fieldHas(String fieldName, Annotation annotation)
type
has a particular annotation on a
particular field.
fieldName
- The name of the field for which we want to know if it
has the annotation.annotation
- The annotation we want to find.
type
has the specified
annotation.
ReflectionException
- if type
does not have the specified
field.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |