/** * Helper method that can be used to check whether method returns * a value or not; if return type declared as <code>void</code>, returns * false, otherwise true * * @since 2.4 */ public boolean hasReturnType() { Class<?> rt = getRawReturnType(); return (rt != Void.TYPE && rt != Void.class); }
Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false;
Class<?> rawBuildType = _buildMethod.getRawReturnType(); Class<?> rawValueType = valueType.getRawClass(); if ((rawBuildType != rawValueType)
int argCount = factory.getParameterCount(); if (argCount == 1) { Class<?> returnType = factory.getRawReturnType();
break; Class<?> returnType = factory.getRawReturnType();
/** * Helper method that can be used to check whether method returns * a value or not; if return type declared as <code>void</code>, returns * false, otherwise true * * @since 2.4 */ public boolean hasReturnType() { Class<?> rt = getRawReturnType(); return (rt != Void.TYPE && rt != Void.class); }
/** * Helper method that can be used to check whether method returns * a value or not; if return type declared as <code>void</code>, returns * false, otherwise true * * @since 2.4 */ public boolean hasReturnType() { Class<?> rt = getRawReturnType(); return (rt != Void.TYPE && rt != Void.class); }
/** * Helper method that can be used to check whether method returns * a value or not; if return type declared as <code>void</code>, returns * false, otherwise true * * @since 2.4 */ public boolean hasReturnType() { Class<?> rt = getRawReturnType(); return (rt != Void.TYPE && rt != Void.class); }
/** * Helper method that can be used to check whether method returns * a value or not; if return type declared as <code>void</code>, returns * false, otherwise true * * @since 2.4 */ public boolean hasReturnType() { Class<?> rt = getRawReturnType(); return (rt != Void.TYPE && rt != Void.class); }
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; }
Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false;
Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false;
Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false;
Class<?> rt = am.getRawReturnType(); if (!getBeanClass().isAssignableFrom(rt)) { return false;
Class<?> rawBuildType = _buildMethod.getRawReturnType(); if (!valueType.getRawClass().isAssignableFrom(rawBuildType)) { throw new IllegalArgumentException("Build method '"+_buildMethod.getFullName()
int argCount = factory.getParameterCount(); if (argCount == 1) { Class<?> returnType = factory.getRawReturnType();
int argCount = factory.getParameterCount(); if (argCount == 1) { Class<?> returnType = factory.getRawReturnType();
int argCount = factory.getParameterCount(); if (argCount == 1) { Class<?> returnType = factory.getRawReturnType();
int argCount = factory.getParameterCount(); if (argCount == 1) { Class<?> returnType = factory.getRawReturnType();