Package org.kissweb.restServer
Class GroovyClass
java.lang.Object
org.kissweb.restServer.GroovyClass
-
Constructor Summary
ConstructorDescriptionGroovyClass
(boolean calculatePath, String sourceFile) Load a groovy source file. -
Method Summary
Modifier and TypeMethodDescriptionConstructor<?>
getConstructor
(Class<?>... argTypes) static Object
invoke
(boolean calculatePath, String sourceFile, String methodName, Object instance, Object... args)
-
Constructor Details
-
GroovyClass
Load a groovy source file. If the file was previously loaded the old version will be used to avoid a duplicate load. If a reload is desired, call reset() first.
If calculatePath is true, the path to sourceFile is calculated relative to the running system. If it is false, sourceFile is used as-is.
A notable exception thrown by this method is FileNotFoundException. That occurs if the source file is not found. Other exceptions indicate a problem with the file.- Parameters:
calculatePath
-sourceFile
-- Throws:
Exception
-
-
Method Details