@Override @Deprecated // since 2.9 public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
/** * Method called to check whether potential Creator (constructor or static factory * method) has explicit annotation to indicate it as actual Creator; and if so, * which {@link com.fasterxml.jackson.annotation.JsonCreator.Mode} to use. *<p> * NOTE: caller needs to consider possibility of both `null` (no annotation found) * and {@link com.fasterxml.jackson.annotation.JsonCreator.Mode#DISABLED} (annotation found, * but disabled); latter is necessary as marker in case multiple introspectors are chained, * as well as possibly as when using mix-in annotations. * * @param config Configuration settings in effect (for serialization or deserialization) * @param a Annotated accessor (usually constructor or static method) to check * * @since 2.9 */ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated a) { // 13-Sep-2016, tatu: for backwards compatibility, implement using delegation /// (remove from version AFTER 2.9) if (hasCreatorAnnotation(a)) { JsonCreator.Mode mode = findCreatorBinding(a); if (mode == null) { mode = JsonCreator.Mode.DEFAULT; } return mode; } return null; }
@Override public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
@Override public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
@Override public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
@Override public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
@Override public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
@Override @Deprecated // since 2.9 public boolean hasCreatorAnnotation(Annotated a) { return _primary.hasCreatorAnnotation(a) || _secondary.hasCreatorAnnotation(a); }
/** * Method called to check whether potential Creator (constructor or static factory * method) has explicit annotation to indicate it as actual Creator; and if so, * which {@link com.fasterxml.jackson.annotation.JsonCreator.Mode} to use. *<p> * NOTE: caller needs to consider possibility of both `null` (no annotation found) * and {@link com.fasterxml.jackson.annotation.JsonCreator.Mode#DISABLED} (annotation found, * but disabled); latter is necessary as marker in case multiple introspectors are chained, * as well as possibly as when using mix-in annotations. * * @param config Configuration settings in effect (for serialization or deserialization) * @param a Annotated accessor (usually constructor or static method) to check * * @since 2.9 */ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated a) { // 13-Sep-2016, tatu: for backwards compatibility, implement using delegation /// (remove from version AFTER 2.9) if (hasCreatorAnnotation(a)) { JsonCreator.Mode mode = findCreatorBinding(a); if (mode == null) { mode = JsonCreator.Mode.DEFAULT; } return mode; } return null; }
protected boolean isFactoryMethod(AnnotatedMethod am) { /* First: return type must be compatible with the introspected class * (i.e. allowed to be sub-class, although usually is the same * class) */ Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false; } /* Also: must be a recognized factory method, meaning: * (a) marked with @JsonCreator annotation, or * (a) "valueOf" (at this point, need not be public) */ if (_annotationIntrospector.hasCreatorAnnotation(am)) { return true; } if ("valueOf".equals(am.getName())) { return true; } return false; }
protected boolean isFactoryMethod(AnnotatedMethod am) { /* First: return type must be compatible with the introspected class * (i.e. allowed to be sub-class, although usually is the same * class) */ Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false; } /* Also: must be a recognized factory method, meaning: * (a) marked with @JsonCreator annotation, or * (a) "valueOf" (at this point, need not be public) */ if (_annotationIntrospector.hasCreatorAnnotation(am)) { return true; } if ("valueOf".equals(am.getName())) { return true; } return false; }
if (_annotationIntrospector.hasCreatorAnnotation(am)) { return true;
if (_annotationIntrospector.hasCreatorAnnotation(am)) { return true;
if (_annotationIntrospector.hasCreatorAnnotation(am)) { return true;
if (!_annotationIntrospector.hasCreatorAnnotation(param.getOwner())) { return;
if (ctxt.getAnnotationIntrospector().hasCreatorAnnotation(factory)) { int argCount = factory.getParameterCount(); if (argCount == 1) {
if (ctxt.getAnnotationIntrospector().hasCreatorAnnotation(factory)) { int argCount = factory.getParameterCount(); if (argCount == 1) {
if (config.getAnnotationIntrospector().hasCreatorAnnotation(factory)) { int argCount = factory.getParameterCount(); if (argCount == 1) {
if (config.getAnnotationIntrospector().hasCreatorAnnotation(factory)) { int argCount = factory.getParameterCount(); if (argCount == 1) {
if (config.getAnnotationIntrospector().hasCreatorAnnotation(factory)) { int argCount = factory.getParameterCount(); if (argCount == 1) {