I would encourage you to just use @JsonIgnore because otherwise you're hiding something that's going on for those particular methods and dual-purposing annotations.
However... you can accomplish this by extending JacksonAnnotationIntrospector and overriding _isIgnorable(Annotated) like this:
publi class MyAnnotationIntrospector extends JacksonAnnotationIntrospector {
@Override
protected boolean _isIgnorable(Annotated a) {
boolean isIgnorable = super._isIgnorable(a);
if (!isIgnorable) {
SomeAnnotation ann = a.getAnnotation(SomeAnnotation.class);
isIgnorable = ann != null;
}
return isIgnorable;
}
}
Then set the annotation introspector on your object mapper:
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setAnnotationIntrospector(new MyAnnotationIntrospector());