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; } }
public void setMethods(List<AutoBeanMethod> methods) { toReturn.methods = new ArrayList<AutoBeanMethod>(methods); Collections.sort(toReturn.methods, new Comparator<AutoBeanMethod>() { public int compare(AutoBeanMethod o1, AutoBeanMethod o2) { int c = o1.getAction().compareTo(o2.getAction()); if (c != 0) { return c; } // Name alone would cause overload conflicts return o1.getMethod().getReadableDeclaration().compareTo( o2.getMethod().getReadableDeclaration()); } }); toReturn.methods = Collections.unmodifiableList(toReturn.methods); toReturn.simpleBean = true; for (AutoBeanMethod method : methods) { if (method.getAction().equals(JBeanMethod.CALL)) { if (method.getStaticImpl() == null) { toReturn.simpleBean = false; } else { affectedByCategories = true; } } } }
public void setMethods(List<AutoBeanMethod> methods) { toReturn.methods = new ArrayList<AutoBeanMethod>(methods); Collections.sort(toReturn.methods, new Comparator<AutoBeanMethod>() { public int compare(AutoBeanMethod o1, AutoBeanMethod o2) { int c = o1.getAction().compareTo(o2.getAction()); if (c != 0) { return c; } // Name alone would cause overload conflicts return o1.getMethod().getReadableDeclaration().compareTo( o2.getMethod().getReadableDeclaration()); } }); toReturn.methods = Collections.unmodifiableList(toReturn.methods); toReturn.simpleBean = true; for (AutoBeanMethod method : methods) { if (method.getAction().equals(JBeanMethod.CALL)) { if (method.getStaticImpl() == null) { toReturn.simpleBean = false; } else { affectedByCategories = true; } } } }
if (JBeanMethod.CALL.equals(which)) { continue;
if (JBeanMethod.CALL.equals(which)) { continue;
if (JBeanMethod.CALL.equals(action)) { JMethod staticImpl = findStaticImpl(beanType, method); if (staticImpl == null && objectMethods.contains(method)) {
if (JBeanMethod.CALL.equals(action)) { JMethod staticImpl = findStaticImpl(beanType, method); if (staticImpl == null && objectMethods.contains(method)) {
if (!method.getAction().equals(JBeanMethod.GET)) { continue; for (AutoBeanMethod maybeSetter : type.getMethods()) { boolean isASetter = maybeSetter.getAction().equals(JBeanMethod.SET) || maybeSetter.getAction().equals(JBeanMethod.SET_BUILDER); if (isASetter && maybeSetter.getPropertyName().equals(method.getPropertyName())) { setter = maybeSetter;
if (!method.getAction().equals(JBeanMethod.GET)) { continue; for (AutoBeanMethod maybeSetter : type.getMethods()) { boolean isASetter = maybeSetter.getAction().equals(JBeanMethod.SET) || maybeSetter.getAction().equals(JBeanMethod.SET_BUILDER); if (isASetter && maybeSetter.getPropertyName().equals(method.getPropertyName())) {
beanType.getQualifiedSourceName()); for (AutoBeanMethod missing : autoBeanType.getMethods()) { if (missing.getAction().equals(JBeanMethod.CALL) && missing.getStaticImpl() == null) { poison(missing.getMethod().getReadableDeclaration());
beanType.getQualifiedSourceName()); for (AutoBeanMethod missing : autoBeanType.getMethods()) { if (missing.getAction().equals(JBeanMethod.CALL) && missing.getStaticImpl() == null) { poison(missing.getMethod().getReadableDeclaration());
if (JBeanMethod.SET_BUILDER.equals(method.getAction())) { sw.println("return this;");
if (JBeanMethod.SET_BUILDER.equals(method.getAction())) { sw.println("return this;");
if (JBeanMethod.SET_BUILDER.equals(method.getAction())) { sw.println("return this;");
if (JBeanMethod.SET_BUILDER.equals(method.getAction())) { sw.println("return this;");