Class NullConstructorStrategy
- java.lang.Object
-
- ch.obermuhlner.scriptengine.java.constructor.NullConstructorStrategy
-
- All Implemented Interfaces:
ConstructorStrategy
public class NullConstructorStrategy extends java.lang.Object implements ConstructorStrategy
AConstructorStrategyimplementation that always returnsnull. Used to indicate that only static methods should be called to evaluate theJavaCompiledScriptholding theClass.
-
-
Constructor Summary
Constructors Constructor Description NullConstructorStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectconstruct(java.lang.Class<?> clazz)Constructs an instance of aClass.
-
-
-
Method Detail
-
construct
public java.lang.Object construct(java.lang.Class<?> clazz) throws javax.script.ScriptExceptionDescription copied from interface:ConstructorStrategyConstructs an instance of aClass.- Specified by:
constructin interfaceConstructorStrategy- Parameters:
clazz- theClass- Returns:
- the constructed instance or
null - Throws:
javax.script.ScriptException- if the instance could not be constructed
-
-