lep.default.service.factory.GeneratedServiceFactory.groovy Maven / Gradle / Ivy
import org.springframework.util.ClassUtils
Class type = lepContext.inArgs.type
if (ClassUtils.hasConstructor(type)) {
def ctor = type.getConstructor();
return ctor.newInstance();
} else {
def ctor = type.getConstructors()[0];
def parameter = ctor.getParameters()[0]
def lepContextType = parameter.getType()
return ctor.newInstance(lepContext.asType(lepContextType))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy