Class DefaultNameStrategy
java.lang.Object
ch.obermuhlner.scriptengine.java.name.DefaultNameStrategy
- All Implemented Interfaces:
NameStrategy
A
NameStrategy
that scans the Java script to determine the package name and class name defined in the script.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFullName
(String script) Returns the fully qualified name of the Java class in the specified script.
-
Field Details
-
NAME_PATTERN
-
PACKAGE_PATTERN
-
-
Constructor Details
-
DefaultNameStrategy
public DefaultNameStrategy()
-
-
Method Details
-
getFullName
Description copied from interface:NameStrategy
Returns the fully qualified name of the Java class in the specified script.- Specified by:
getFullName
in interfaceNameStrategy
- Parameters:
script
- the Java script- Returns:
- the fully qualified class name
- Throws:
ScriptException
- if no class name could be determined
-