Class DefaultNameStrategy
- java.lang.Object
-
- ch.obermuhlner.scriptengine.java.name.DefaultNameStrategy
-
- All Implemented Interfaces:
NameStrategy
public class DefaultNameStrategy extends java.lang.Object implements NameStrategy
ANameStrategythat scans the Java script to determine the package name and class name defined in the script.
-
-
Constructor Summary
Constructors Constructor Description DefaultNameStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFullName(java.lang.String script)Returns the fully qualified name of the Java class in the specified script.
-
-
-
Method Detail
-
getFullName
public java.lang.String getFullName(java.lang.String script) throws javax.script.ScriptExceptionDescription copied from interface:NameStrategyReturns the fully qualified name of the Java class in the specified script.- Specified by:
getFullNamein interfaceNameStrategy- Parameters:
script- the Java script- Returns:
- the fully qualified class name
- Throws:
javax.script.ScriptException- if no class name could be determined
-
-