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

ch.obermuhlner.scriptengine.java.constructor.NullConstructorStrategy Maven / Gradle / Ivy

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

import javax.script.ScriptException;

/**
 * A {@link ConstructorStrategy} implementation that always returns {@code null}.
 *
 * Used to indicate that only static methods should be called to evaluate the
 * {@link ch.obermuhlner.scriptengine.java.JavaCompiledScript} holding the {@link Class}.
 */
public class NullConstructorStrategy implements ConstructorStrategy {
    @Override
    public Object construct(Class clazz) throws ScriptException {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy