/** * Another helper method to deal with Groovy's problematic metadata accessors */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { String pkgName = ClassUtil.getPackageName(am.getRawType()); return (pkgName != null) && pkgName.startsWith("groovy.lang"); }
Class<?> rt = am.getRawType();
/** * @since 2.5 */ public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming) { if (name.startsWith("is")) { // plus, must return a boolean Class<?> rt = am.getRawType(); if (rt == Boolean.class || rt == Boolean.TYPE) { return stdNaming ? stdManglePropertyName(name, 2) : legacyManglePropertyName(name, 2); } } return null; }
for (BeanPropertyDefinition definition : definitions) { if (definition.hasGetter() && Collection.class.isAssignableFrom(definition.getGetter().getRawType())) {
if (useGettersAsSetters && _isSetterlessType(getter.getRawType())) {
@Override public PropertyName findNameForSerialization(Annotated a) { // 16-Sep-2016, tatu: Prior to 2.9 logic her more complicated, on assumption // that visibility rules may require return of "" if method/fied visible; // however, that is not required and causes issues so... now simpler: if (a instanceof AnnotatedMethod) { AnnotatedMethod am = (AnnotatedMethod) a; return isVisible(am) ? findJaxbPropertyName(am, am.getRawType(), BeanUtil.okNameForGetter(am, true)) : null; } if (a instanceof AnnotatedField) { AnnotatedField af = (AnnotatedField) a; return isVisible(af) ? findJaxbPropertyName(af, af.getRawType(), null) : null; } return null; }
idPropName = findJaxbPropertyName(m, m.getRawType(), BeanUtil.okNameForGetter(m, true)); break method_loop; case 1: // setter idPropName = findJaxbPropertyName(m, m.getRawType(), BeanUtil.okNameForMutator(m, "set", true)); break method_loop;
/** * Another helper method to deal with rest of [JACKSON-103] */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { Class<?> rt = am.getRawType(); if (rt == null || rt.isArray()) { return false; } Package pkg = rt.getPackage(); if (pkg != null && pkg.getName().startsWith("groovy.lang")) { return true; } return false; }
/** * Another helper method to deal with rest of [JACKSON-103] */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { Class<?> rt = am.getRawType(); if (rt == null || rt.isArray()) { return false; } Package pkg = rt.getPackage(); if (pkg != null && pkg.getName().startsWith("groovy.lang")) { return true; } return false; }
/** * Another helper method to deal with rest of [JACKSON-103] */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { Class<?> rt = am.getRawType(); if (rt == null || rt.isArray()) { return false; } Package pkg = rt.getPackage(); if (pkg != null && pkg.getName().startsWith("groovy.lang")) { return true; } return false; }
/** * Another helper method to deal with rest of [JACKSON-103] */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { Class<?> rt = am.getRawType(); if (rt == null || rt.isArray()) { return false; } Package pkg = rt.getPackage(); if (pkg != null && pkg.getName().startsWith("groovy.lang")) { return true; } return false; }
public static String okNameForIsGetter(AnnotatedMethod am, String name) { if (name.startsWith("is")) { // plus, must return boolean... Class<?> rt = am.getRawType(); if (rt != Boolean.class && rt != Boolean.TYPE) { return null; } return manglePropertyName(name.substring(2)); } // no, not a match by name return null; }
public static String okNameForIsGetter(AnnotatedMethod am, String name) { if (name.startsWith("is")) { // plus, must return boolean... Class<?> rt = am.getRawType(); if (rt != Boolean.class && rt != Boolean.TYPE) { return null; } return manglePropertyName(name.substring(2)); } // no, not a match by name return null; }
/** * Another helper method to deal with Groovy's problematic metadata accessors */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { String pkgName = ClassUtil.getPackageName(am.getRawType()); return (pkgName != null) && pkgName.startsWith("groovy.lang"); }
/** * Another helper method to deal with rest of [JACKSON-103] */ protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am) { Class<?> rt = am.getRawType(); if (rt == null || rt.isArray()) { return false; } String pkgName = ClassUtil.getPackageName(rt); if (pkgName != null && pkgName.startsWith("groovy.lang")) { return true; } return false; }
Class<?> rt = am.getRawType();
/** * @since 2.5 */ public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming) { if (name.startsWith("is")) { // plus, must return a boolean Class<?> rt = am.getRawType(); if (rt == Boolean.class || rt == Boolean.TYPE) { return stdNaming ? stdManglePropertyName(name, 2) : legacyManglePropertyName(name, 2); } } return null; }
/** * @since 2.5 */ public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming) { if (name.startsWith("is")) { // plus, must return a boolean Class<?> rt = am.getRawType(); if (rt == Boolean.class || rt == Boolean.TYPE) { return stdNaming ? stdManglePropertyName(name, 2) : legacyManglePropertyName(name, 2); } } return null; }
/** * @since 2.5 */ public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming) { if (name.startsWith("is")) { // plus, must return a boolean Class<?> rt = am.getRawType(); if (rt == Boolean.class || rt == Boolean.TYPE) { return stdNaming ? stdManglePropertyName(name, 2) : legacyManglePropertyName(name, 2); } } return null; }
/** * @since 2.5 */ public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming) { if (name.startsWith("is")) { // plus, must return a boolean Class<?> rt = am.getRawType(); if (rt == Boolean.class || rt == Boolean.TYPE) { return stdNaming ? stdManglePropertyName(name, 2) : legacyManglePropertyName(name, 2); } } return null; }