public abstract class FunctionScript extends FunctionInitializer implements PropertySource
FunctionInitializer.ParseContext
PropertySource.PropertyConvention
applicationContext, closeContext
CONTEXT
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier | Constructor and Description |
---|---|
|
FunctionScript()
Constuctor.
|
protected |
FunctionScript(ApplicationContext applicationContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addProperty(String name,
Object value)
Add a property to the script.
|
protected ApplicationContext |
buildApplicationContext(C context) |
Object |
get(String key)
Get a property value of the given key.
|
String |
getName() |
protected void |
injectThis(ApplicationContext applicationContext)
Injects this instance.
|
Iterator<String> |
iterator() |
protected ExecutableMethod<Object,Object> |
resolveFunction(LocalFunctionRegistry localFunctionRegistry,
String functionName)
Resolve a function from the
LocalFunctionRegistry . |
protected String |
resolveFunctionName(Environment env)
Resolves the function name to execution for the environment.
|
protected Environment |
startEnvironment(ApplicationContext applicationContext)
Start the environment specified.
|
protected void |
startThis(ApplicationContext applicationContext)
Start this environment.
|
close, run
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConvention, of, of, of, of
forEach, spliterator
public FunctionScript()
protected FunctionScript(ApplicationContext applicationContext)
applicationContext
- applicationContext@Internal public Object get(String key)
PropertySource
get
in interface PropertySource
key
- The keypublic final String getName()
getName
in interface PropertySource
protected void addProperty(String name, Object value)
name
- name of the propertyvalue
- value@Internal protected void startThis(ApplicationContext applicationContext)
FunctionInitializer
startThis
in class FunctionInitializer
applicationContext
- The application context@Internal protected void injectThis(ApplicationContext applicationContext)
FunctionInitializer
injectThis
in class FunctionInitializer
applicationContext
- The ApplicationContext
protected ExecutableMethod<Object,Object> resolveFunction(LocalFunctionRegistry localFunctionRegistry, String functionName)
LocalFunctionRegistry
.localFunctionRegistry
- The LocalFunctionRegistry
functionName
- The function nameprotected String resolveFunctionName(Environment env)
env
- The environmentprotected ApplicationContext buildApplicationContext(@Nullable C context)
context
- A platform specific context objectApplicationContext
to useprotected Environment startEnvironment(ApplicationContext applicationContext)
applicationContext
- the application context with the environment