public final class GroovyXmlTransform extends Object implements OfflineCommand
| Modifier and Type | Class and Description |
|---|---|
static class |
GroovyXmlTransform.Builder |
NOOP| Modifier and Type | Method and Description |
|---|---|
void |
apply(OfflineCommandContext ctx) |
static GroovyXmlTransform.Builder |
of(Class clazz)
A convenience shortcut for a case when the script is stored alongside the
clazz on the classpath,
has the same name and the .groovy extension. |
static GroovyXmlTransform.Builder |
of(Class resourceLoader,
String path)
Creates a
GroovyXmlTransform from a script loaded from classpath at path. |
String |
toString() |
public static GroovyXmlTransform.Builder of(Class clazz)
clazz on the classpath,
has the same name and the .groovy extension.clazz - the class that will be used for loading the script and also for discovering its nameof(Class, String)public static GroovyXmlTransform.Builder of(Class resourceLoader, String path)
GroovyXmlTransform from a script loaded from classpath at path. The resource
will be loaded by the resourceLoader class (Class.getResourceAsStream(String)).resourceLoader - class that will be used to load the script from classpathpath - path to the script on classpath (absolute or relative to resourceLoader)public void apply(OfflineCommandContext ctx) throws CommandFailedException, IOException
apply in interface OfflineCommandCommandFailedExceptionIOExceptionpublic String toString()
toString in interface OfflineCommandtoString in class ObjectCopyright © 2022. All rights reserved.