public void removeMethodByParamsClass(JavaClassSource javaClassSource, String methodName, Class<?>... paramTypes) { logger.debug("Removing method: " + methodName + ", form class: " + javaClassSource.getName()); MethodSource<JavaClassSource> method = javaClassSource.getMethod(methodName, paramTypes); if (method != null) { javaClassSource.removeMethod(method); logger.debug("Method method: " + methodName + ", was removed from class: " + javaClassSource.getName()); } else { logger.debug("Method method: " + methodName + " not exists for class: " + javaClassSource.getName()); } }
public void removeMethodByParamsClassName(JavaClassSource javaClassSource, String methodName, String... paramTypes) { logger.debug("Removing method: " + methodName + ", form class: " + javaClassSource.getName()); MethodSource<JavaClassSource> method = javaClassSource.getMethod(methodName, paramTypes); if (method != null) { javaClassSource.removeMethod(method); logger.debug("Method method: " + methodName + ", was removed from class: " + javaClassSource.getName()); } else { logger.debug("Method method: " + methodName + " not exists for class: " + javaClassSource.getName()); } }
private void updateToString(final JavaClassSource targetEntity) { if (targetEntity.hasMethodSignature("toString")) { targetEntity.removeMethod(targetEntity.getMethod("toString")); } List<FieldSource<JavaClassSource>> fields = new ArrayList<>(); for (FieldSource<JavaClassSource> f : targetEntity.getFields()) { if (canAddFieldToToString(f)) { fields.add(f); } } if (!fields.isEmpty()) { Refactory.createToStringFromFields(targetEntity, fields); } }
javaClassSource.getMethod(method.getName(), methodParamClasses.toArray(new Class<?>[methodParamClasses.size()])); if (methodSource == null)