public class DefaultSignature extends java.lang.Object implements SignatureInterface
SignatureInterface
implementation which extracts the information of a signature string and
transforms it into an easy to access data structure.Constructor and Description |
---|
DefaultSignature() |
Modifier and Type | Method and Description |
---|---|
ExecutionError |
createSignature(java.lang.String signatureString,
ScriptSystemInterface<?,?> scriptSystem)
Initializes the signature according to the given string.
|
java.lang.String[] |
getKeyArray()
Returns the main key and the aliases as an array.
|
java.lang.String |
getKeysAsString()
Returns the main key and the aliases separated by a |.
|
java.lang.String |
getMainKey()
Returns the main key of the signature.
|
ParameterTuple |
getParameterTuple()
Returns the parameter tuple, including parameter keys, types and default values.
|
ScriptType |
getReturnValue()
Returns the return type of the signature.
|
java.lang.String |
getReturnValueAsString()
Returns the string representation of the return type, whereas no return type yields "void".
|
java.lang.String |
getStringRepresentation()
Returns a user-readable string representation of the object.
|
boolean |
isCreated()
Tells whether or not this instance was initialized.
|
java.lang.String |
toString() |
public ExecutionError createSignature(java.lang.String signatureString, ScriptSystemInterface<?,?> scriptSystem)
createSignature
in interface SignatureInterface
signatureString
- the string to parse.scriptSystem
- the script system to calculate default values.public ParameterTuple getParameterTuple()
SignatureInterface
getParameterTuple
in interface SignatureInterface
public boolean isCreated()
createSignature(java.lang.String, scriptinterface.ScriptSystemInterface<?, ?>)
was called successfully.public java.lang.String getKeysAsString()
SignatureInterface
getKeysAsString
in interface SignatureInterface
public java.lang.String getMainKey()
SignatureInterface
getMainKey
in interface SignatureInterface
public java.lang.String[] getKeyArray()
SignatureInterface
getKeyArray
in interface SignatureInterface
public ScriptType getReturnValue()
public java.lang.String getReturnValueAsString()
SignatureInterface
getReturnValueAsString
in interface SignatureInterface
public java.lang.String getStringRepresentation()
StringRepresentation
getStringRepresentation
in interface StringRepresentation
public java.lang.String toString()
toString
in class java.lang.Object