Class Script
- java.lang.Object
-
- de.aristaflow.adept2.model.scripts.Script
-
- All Implemented Interfaces:
Serializable
public class Script extends Object implements Serializable
Provides easy access to the components of a script declaration.- Author:
- Patrick Schmidt
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Script(String type, String name, LinkedHashMap<String,? extends Serializable> inputValues, String extensions, String body)
Constructs a newScript
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getBody()
Returns the script body ornull
if the script did not contain a body.String
getExtensions()
Returns the script extensions ornull
if the script did not contain any extensions.LinkedHashMap<String,Serializable>
getInputValues()
Returns the optional parameter values;null
if the parameter parentheses were not present; empty if the parameter parentheses were present but didn't contain any parameters.String
getName()
Returns the script name ornull
.String
getType()
Returns the script type.int
hashCode()
String
toString()
Returns a valid string representation of this script declaration.
-
-
-
Constructor Detail
-
Script
public Script(String type, String name, LinkedHashMap<String,? extends Serializable> inputValues, String extensions, String body)
Constructs a newScript
.- Parameters:
type
- the script typename
- the optional script nameinputValues
- the optional parameter values;null
if the parameter parentheses were not present; empty if the parameter parentheses were present but didn't contain any parameters; theLinkedHashMap
is used to preserve the parameter orderextensions
- the optional script extensionsbody
- the script body, i.e. the actual script
-
-
Method Detail
-
getType
public String getType()
Returns the script type.- Returns:
- the script type
-
getName
public String getName()
Returns the script name ornull
.- Returns:
- the script name or
null
-
getInputValues
public LinkedHashMap<String,Serializable> getInputValues()
Returns the optional parameter values;null
if the parameter parentheses were not present; empty if the parameter parentheses were present but didn't contain any parameters. The returned map is ordered and consistent with the order of the parameters.- Returns:
- the optional parameter values
-
getExtensions
public String getExtensions()
Returns the script extensions ornull
if the script did not contain any extensions.- Returns:
- the script extensions or
null
-
getBody
public String getBody()
Returns the script body ornull
if the script did not contain a body.- Returns:
- script body or
null
-
toString
public String toString()
Returns a valid string representation of this script declaration.
-
-