接口 NameStrategy
- 所有已知实现类:
DefaultNameStrategy,FixNameStrategy
public interface NameStrategy
The strategy used to determine the name of a Java class in a script.
-
方法概要
修饰符和类型方法说明static StringextractPackageName(String fullName) Extracts the package name from a fully qualified class name.static StringextractSimpleName(String fullName) Extracts the simple name from a fully qualified class name.getFullName(String script) Returns the fully qualified name of the Java class in the specified script.
-
方法详细资料
-
getFullName
Returns the fully qualified name of the Java class in the specified script.- 参数:
script- the Java script- 返回:
- the fully qualified class name
- 抛出:
ScriptException- if no class name could be determined
-
extractSimpleName
Extracts the simple name from a fully qualified class name.- 参数:
fullName- the fully qualified class name- 返回:
- the simple class name
-
extractPackageName
Extracts the package name from a fully qualified class name.- 参数:
fullName- the fully qualified class name- 返回:
- the package name,
""if it is the default package
-