public abstract class DirectiveScriptProcessor extends Object implements ScriptProcessor
ScriptProcessor
plugins that parse lines
of the form #@directive(...) ...
.Constructor and Description |
---|
DirectiveScriptProcessor(Predicate<String> directivesToMatch) |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
as(Object v,
Class<T> type)
Coerces some object into another object of the given type.
|
protected <T> List<T> |
asList(Object v,
Class<T> type)
Coerces some object into a list of objects of the given type.
|
void |
begin(ScriptInfo scriptInfo) |
protected ScriptInfo |
info()
Gets the active
ScriptInfo instance. |
protected boolean |
is(String key,
String desired)
Checks whether some key matches the desired value, ignoring case.
|
String |
process(String line) |
protected abstract String |
process(String directive,
Map<String,Object> attrs,
String theRest)
Processes the given directive.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
end
public void begin(ScriptInfo scriptInfo)
begin
in interface ScriptProcessor
public String process(String line)
process
in interface ScriptProcessor
protected abstract String process(String directive, Map<String,Object> attrs, String theRest)
protected ScriptInfo info()
ScriptInfo
instance.protected boolean is(String key, String desired)
protected <T> T as(Object v, Class<T> type)
Copyright © 2015–2022 SciJava. All rights reserved.