All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lep.default.service.factory.GeneratedServiceFactory.groovy Maven / Gradle / Ivy

There is a newer version: 4.0.21
Show newest version
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