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