br.com.objectos.way.code.AnnotationInfoHasAnnotation Maven / Gradle / Ivy
The newest version!
package br.com.objectos.way.code;
import com.google.common.base.Predicate;
import java.lang.annotation.Annotation;
import javax.annotation.Generated;
@Generated("br.com.objectos.way.auto.functional.AutoFunctionalProcessor")
public final class AnnotationInfoHasAnnotation implements Predicate {
private final Class extends Annotation> type;
private AnnotationInfoHasAnnotation(Class extends Annotation> type) {
this.type = type;
}
public static Predicate get(Class extends Annotation> type) {
return new AnnotationInfoHasAnnotation(type);
}
public static Predicate not(Class extends Annotation> type) {
return new AnnotationInfoHasAnnotationNot(type);
}
@Override
public boolean apply(AnnotationInfo input) {
return input.hasAnnotation(type);
}
private static final class AnnotationInfoHasAnnotationNot implements Predicate {
private final Class extends Annotation> type;
private AnnotationInfoHasAnnotationNot(Class extends Annotation> type) {
this.type = type;
}
@Override
public boolean apply(AnnotationInfo input) {
return !input.hasAnnotation(type);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy