Class UtilsModule
java.lang.Object
org.eclipse.tracecompass.incubator.scripting.core.utils.UtilsModule
A utility scripting module that wraps certain classes in more convenient
objects. Script developers should try to use the wrapped class directly first
as it may not be problematic in some cases and if there are execution
problems when running the script, use the wrapper instead.
- Author:
- Geneviève Bastien
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> ListWrapper<T>
Create a new list wrapper.String[]
strToArray
(String string) Convert a string to an array of string, as some scripting languages do not easily support arrays (like jython)
-
Constructor Details
-
UtilsModule
public UtilsModule()
-
-
Method Details
-
createListWrapper
Create a new list wrapper. Useful when passingFunction
classes to module methods where the function return value is aList
. Some scripting engines do not handle very well those objects.- Type Parameters:
T
- The type of elements that will be in the list- Returns:
- The
ListWrapper
object with an empty list
-
strToArray
Convert a string to an array of string, as some scripting languages do not easily support arrays (like jython)- Parameters:
string
- The element to add to the array- Returns:
- An array of string containing the element in parameter
-