All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.obermuhlner.scriptengine.java.execution.ExecutionStrategy Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package ch.obermuhlner.scriptengine.java.execution;

import javax.script.ScriptException;

/**
 * The strategy used to execute a method on an object instance.
 */
public interface ExecutionStrategy {
    /**
     * Executes a method on an object instance, or a static method if the specified instance is {@code null}.
     *
     * @param instance the object instance to be executed or {@code null} to execute a static method
     * @return the return value of the method, or {@code null}
     * @throws ScriptException if no method to execute was found
     */
    Object execute(Object instance) throws ScriptException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy