@Override public String inferName(JMethod method) { if (isBooleanProperty(method) && method.getName().startsWith(IS_PREFIX)) { return Introspector.decapitalize(method.getName().substring(2)); } return super.inferName(method); }
@Override public String inferName(JMethod method) { if (isBooleanProperty(method) && method.getName().startsWith(IS_PREFIX)) { return Introspector.decapitalize(method.getName().substring(2)); } return super.inferName(method); }
public AutoBeanMethod build() { if (toReturn.action.equals(JBeanMethod.GET) || toReturn.action.equals(JBeanMethod.SET) || toReturn.action.equals(JBeanMethod.SET_BUILDER)) { PropertyName annotation = toReturn.method.getAnnotation(PropertyName.class); if (annotation != null) { toReturn.propertyName = annotation.value(); } else { toReturn.propertyName = toReturn.action.inferName(toReturn.method); } } try { return toReturn; } finally { toReturn = null; } }
public AutoBeanMethod build() { if (toReturn.action.equals(JBeanMethod.GET) || toReturn.action.equals(JBeanMethod.SET) || toReturn.action.equals(JBeanMethod.SET_BUILDER)) { PropertyName annotation = toReturn.method.getAnnotation(PropertyName.class); if (annotation != null) { toReturn.propertyName = annotation.value(); } else { toReturn.propertyName = toReturn.action.inferName(toReturn.method); } } try { return toReturn; } finally { toReturn = null; } }
continue; if (!which.inferName(maybeSetter).equals(parts[i])) { continue;
continue; if (!which.inferName(maybeSetter).equals(parts[i])) { continue;
if (JBeanMethod.GET.matches(method)) { transportedType = method.getReturnType(); String propertyName = JBeanMethod.GET.inferName(method); JMethod previouslySeen = duplicatePropertyGetters.get(propertyName); if (previouslySeen == null) {
if (JBeanMethod.GET.matches(method)) { transportedType = method.getReturnType(); String propertyName = JBeanMethod.GET.inferName(method); JMethod previouslySeen = duplicatePropertyGetters.get(propertyName); if (previouslySeen == null) {
PropertyName propertyNameAnnotation = setter.getAnnotation(PropertyName.class); String propertyName = propertyNameAnnotation == null ? JBeanMethod.SET.inferName(setter) : propertyNameAnnotation.value(); String maybeReturn = JBeanMethod.SET_BUILDER.matches(setter) ? "return this;" : "";
PropertyName propertyNameAnnotation = setter.getAnnotation(PropertyName.class); String propertyName = propertyNameAnnotation == null ? JBeanMethod.SET.inferName(setter) : propertyNameAnnotation.value(); String maybeReturn = JBeanMethod.SET_BUILDER.matches(setter) ? "return this;" : "";