java.lang.Object | |
↳ | com.pnfsoftware.jeb.client.script.ScriptUtil |
Utility methods.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ScriptUtil() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String |
filenameToClassname(String filename)
Determine the main class of a script from the script filename.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Determine the main class of a script from the script filename.
Rules:
- the leading digits, dashes and underscores are removed from the file name to generate the
class name
- the trailing dashes and underscores are removed from the file name to generate the class
name
Examples:
Sample.py -> Sample _Sample.py -> Sample 1_Sample.py -> Sample 2-Sample_.py -> Sample a1_Sample.py -> a1_Sample Sample_123.py -> Sample_123 Sample_123__.py -> Sample_123 111.py -> null (would be empty) __1-3 -> null (would be empty) __1.3 -> .3 __1._ -> null (would be . which is not allowed) __1..__ -> null (would be .. which is not allowed) __1...__ -> ... (not recommended though)
filename | a simple file name (not a path) |
---|