# Class: com.pnfsoftware.jeb.client.script.ScriptUtil

Utility methods.

## Constructor: ScriptUtil


## Static Method: filenameToClassname
- parameter: `filename`, type: `java.lang.String`
- return type: `java.lang.String`

Description: 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)
 
```
parameter: filename: a simple file name \(not a path\)
return: the expected primary class name \(that should be defined inside the script file\); on         error, the method returns null

## Static Method: looksLikeJEPScript
- parameter: `scriptfile`, type: `java.io.File`
- parameter: `classname`, type: `java.lang.String`
- return type: `boolean`

Description: Heuristic to determine whether a Python script is better suited to run using Jython or JEP.
parameter: scriptfile: script file
parameter: classname: script class name
return: true if the script looks like it should be run using JEP
throws: 

