ch.obermuhlner.scriptengine.java.constructor.ConstructorStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-scriptengine Show documentation
Show all versions of java-scriptengine Show documentation
Java script engine for Java as a scripting language.
package ch.obermuhlner.scriptengine.java.constructor;
import javax.script.ScriptException;
/**
* The strategy used to construct an instance of a {@link Class}.
*/
public interface ConstructorStrategy {
/**
* Constructs an instance of a {@link Class}.
*
* @param clazz the {@link Class}
* @return the constructed instance or {@code null}
* @throws ScriptException if the instance could not be constructed
*/
Object construct(Class> clazz) throws ScriptException;
}