S - the type of the script.T - the type of the instance to provide.public class CachedScriptClassInstancePovider<S,T> extends Object implements ScriptClassInstanceProvider<T>
| Constructor and Description |
|---|
CachedScriptClassInstancePovider(SpongeEngine engine,
Function<String,S> createScriptFunction,
String format,
BiFunction<S,Class<T>,T> createInstanceFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
protected S |
createScript(String className) |
T |
newInstance(String className,
Class<T> javaClass) |
public CachedScriptClassInstancePovider(SpongeEngine engine, Function<String,S> createScriptFunction, String format, BiFunction<S,Class<T>,T> createInstanceFunction)
public T newInstance(String className, Class<T> javaClass)
newInstance in interface ScriptClassInstanceProvider<T>public void clear()
clear in interface ScriptClassInstanceProvider<T>Copyright © 2016–2021 Softelnet. All rights reserved.