Interface NameStrategy
-
- All Known Implementing Classes:
DefaultNameStrategy,FixNameStrategy
public interface NameStrategyThe strategy used to determine the name of a Java class in a script.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.lang.StringextractPackageName(java.lang.String fullName)Extracts the package name from a fully qualified class name.static java.lang.StringextractSimpleName(java.lang.String fullName)Extracts the simple name from a fully qualified class name.java.lang.StringgetFullName(java.lang.String script)Returns the fully qualified name of the Java class in the specified script.
-
-
-
Method Detail
-
getFullName
java.lang.String getFullName(java.lang.String script) throws javax.script.ScriptExceptionReturns the fully qualified name of the Java class in the specified script.- Parameters:
script- the Java script- Returns:
- the fully qualified class name
- Throws:
javax.script.ScriptException- if no class name could be determined
-
extractSimpleName
static java.lang.String extractSimpleName(java.lang.String fullName)
Extracts the simple name from a fully qualified class name.- Parameters:
fullName- the fully qualified class name- Returns:
- the simple class name
-
extractPackageName
static java.lang.String extractPackageName(java.lang.String fullName)
Extracts the package name from a fully qualified class name.- Parameters:
fullName- the fully qualified class name- Returns:
- the package name,
""if it is the default package
-
-