public boolean isApplicable(BeanCreationDirective directive) { String createMethod = directive.getCreateMethod(); return !MappingUtils.isBlankOrNull(createMethod); }
public boolean isApplicable(BeanCreationDirective directive) { String createMethod = directive.getCreateMethod(); return !MappingUtils.isBlankOrNull(createMethod); }
public boolean isApplicable(BeanCreationDirective directive) { String createMethod = directive.getCreateMethod(); return !MappingUtils.isBlankOrNull(createMethod); }
public Object create(MappingParameters params, BeanCreationDirective directive) { Class<?> actualClass = directive.getActualClass(); String createMethod = directive.getCreateMethod(); Method method; if (createMethod.contains(".")) { String methodName = createMethod.substring(createMethod.lastIndexOf(".") + 1, createMethod.length()); String typeName = createMethod.substring(0, createMethod.lastIndexOf(".")); DozerClassLoader loader = BeanContainer.getInstance().getClassLoader(); Class<?> type = loader.loadClass(typeName); method = findMethod(type, methodName); } else { method = findMethod(actualClass, createMethod); } return ReflectionUtils.invoke(method, null, null); }
public Object create(BeanCreationDirective directive) { Class<?> actualClass = directive.getActualClass(); String createMethod = directive.getCreateMethod(); Method method; if (createMethod.contains(".")) { String methodName = createMethod.substring(createMethod.lastIndexOf(".") + 1, createMethod.length()); String typeName = createMethod.substring(0, createMethod.lastIndexOf(".")); DozerClassLoader loader = BeanContainer.getInstance().getClassLoader(); Class type = loader.loadClass(typeName); method = findMethod(type, methodName); } else { method = findMethod(actualClass, createMethod); } return ReflectionUtils.invoke(method, null, null); }
public Object create(MappingParameters params, BeanCreationDirective directive) { Class<?> actualClass = directive.getActualClass(); String createMethod = directive.getCreateMethod(); Method method; if (createMethod.contains(".")) { String methodName = createMethod.substring(createMethod.lastIndexOf(".") + 1, createMethod.length()); String typeName = createMethod.substring(0, createMethod.lastIndexOf(".")); DozerClassLoader loader = BeanContainer.getInstance().getClassLoader(); Class<?> type = loader.loadClass(typeName); method = findMethod(type, methodName); } else { method = findMethod(actualClass, createMethod); } return ReflectionUtils.invoke(method, null, null); }