Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kasource.commons.reflection.filter.fields;
Filters all fields which is annotated with an annotation which is annotated with a specific meta annotation.

Note: It's not recommended to use this class directly, instead use the org.kasource.commons.reflection.FieldFilterBuilder.

public class MetaAnnotatedFieldFilter implements FieldFilter {
    private Class<? extends AnnotationinheritedAnnotation;
    public MetaAnnotatedFieldFilter(Class<? extends AnnotationinheritedAnnotation) {
        this. = inheritedAnnotation;
    public boolean passFilter(Field field) {
        Annotation[] annotations = field.getDeclaredAnnotations();
        for (Annotation annotation : annotations) {
            if (annotation.annotationType().isAnnotationPresent()) {
                return true;
        return false;
New to GrepCode? Check out our FAQ X