[Java] Interface GroovyRunner
public interface GroovyRunner
Classes which can run scripts should implement this interface.
- Since:
- 2.5.0
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public boolean |
canRun(Class<?> scriptClass, GroovyClassLoader loader) Returns true if this runner is able to run the given class. | |
public Object |
run(Class<?> scriptClass, GroovyClassLoader loader) Runs the given class. |
Method Detail
public boolean canRun(Class<?> scriptClass, GroovyClassLoader loader)
Returns true
if this runner is able to run the given class.
- Parameters:
-
scriptClass
- class to run -
loader
- used to locate classes and resources
- Returns:
- true if given class can be run, else false
public Object run(Class<?> scriptClass, GroovyClassLoader loader)
Runs the given class.
- Parameters:
-
scriptClass
- class to run -
loader
- used to locate classes and resources
- Returns:
- result of running the class
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/apache/groovy/plugin/GroovyRunner.html