| FRAMES NO FRAMES | |||||||
| |||||||
| SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION | ||||||
any a; // empty, holds no value
a := 1234; // holds an integer value
a := new any; // empty, holds no value EPL supports casting of the any type to a concrete target type, for example: any a;
integer i := <integer> a; If the any is empty or an incorrect type, the cast will throw an exception, except for casts to optional which never fail: any a;
optional<integer> i := < optional<integer> > a; In this case, if the any is empty, or a type other than integer or optional<integer>, the cast will return an empty optional.
any a;
switch (a as myvalue)
{
case float: { / * myvalue can be accessed as a float here * / }
case integer: { / * myvalue can be accessed as an integer here * / }
default: { / * other type or empty * / }
} There is no case fall-through. If you do not provide a default clause, an exception will be thrown if the any does not match any case. an in the switch can be any expression returning any. If it is a simple identifier, then the as clause can be omitted and the identifier will be available cast to the appropriate type within the case block.
| Action summary | |
|---|---|
boolean | static canParse(string s)
Check if the string argument can be parsed as an any. |
any | clone()
Create a deep copy of the value contained within this any. |
boolean | empty()
Check whether this any contains a value or object. |
any | getAction(string actionName)
Get the action or method by name. |
sequence<string> | getActionNames()
Get the names of the actions or methods within this any. |
sequence<string> | getActionParameterNames()
Get the parameter names of the action contained in this any. |
dictionary<string, string> | getActionParameters()
Get a dictionary whose keys are the parameter names of the action contained in this any, and whose values are the types of each parameter. |
sequence<string> | getActionParameterTypeNames()
Get the parameter types of the action contained in this any. |
string | getActionReturnTypeName()
Get the name of the return type of the action contained in this any. |
any | getConstant(string constantName)
Get the value of a constant by name. |
sequence<string> | getConstantNames()
Get the names of the constants within this any. |
string | getDeclaredElementType()
If the object contained in this any is a sequence or dictionary type, get the name of the type of values contained within this object. |
string | getDeclaredKeyType()
If the object contained in this any is a dictionary type, then return the name of the key type of this dictionary. |
sequence<any> | getEntries()
Get all the entries within the contained object. |
any | getEntry(any key)
Get the entry corresponding to this key within the contained object. |
any | getField(string fieldName)
Get the value of a field by name. |
sequence<string> | getFieldNames()
Get the names of the fields within this any. |
sequence<any> | getFields()
Get the values of the fields within this any. |
string | getFieldString(string fieldName)
Get the value of a field by name. |
sequence<string> | getFieldTypes()
Get the names of the types of the fields within this any. |
sequence<string> | getFieldValues()
Get the values of the fields within this any. |
action<sequence<any>> returns any | getGenericAction()
Get the generic form of the action. |
dictionary<any, any> | getGenericDictionary()
Returns the contained object as a dictionary<any, any>. |
sequence<any> | getKeys()
Get the keys for the entries within the contained object. |
string | getTypeName()
Get the name of the type contained in this any. |
sequence<string> | getTypes()
Get the names of the types for the entries within the contained object. |
boolean | hasAction(string actionName)
Check whether an actionName exists within the contained object. |
boolean | hasEntry(any key)
Check whether a key exists within the contained object. |
boolean | hasField(string fieldName)
Check whether a fieldName exists within the contained object. |
integer | hash()
Get an integer hash representation of the underlying object. |
boolean | isDictionary()
Checks whether the object contained in this any is a dictionary. |
boolean | isEvent()
Checks whether the object contained in this any is an event. |
boolean | isSequence()
Checks whether the object contained in this any is a sequence. |
any | static newInstance(string typeName)
Create a new, default-initialized, instance of the given type name. |
any | static parse(string s)
Parse a string to an any. |
any | static parseType(string typeName, string stringForm)
Parse a string as a given type (by name). |
void | setEntry(any key, any value)
Set the entry in the contained type corresponding to a named key. |
void | setField(string fieldName, any value)
Set the value of a field by name. |
string | toString()
Convert this any to a string. |
string | valueToString()
Convert the contents of this any to a string. |
| Action detail |
|---|
boolean static canParse(string s)
Check if the string argument can be parsed as an any.
any clone()
Create a deep copy of the value contained within this any.
boolean empty()
Check whether this any contains a value or object.
any getAction(string actionName)
Get the action or method by name.
sequence<string> getActionNames()
Get the names of the actions or methods within this any.
sequence<string> getActionParameterNames()
Get the parameter names of the action contained in this any.
dictionary<string, string> getActionParameters()
Get a dictionary whose keys are the parameter names of the action contained in this any, and whose values are the types of each parameter.
sequence<string> getActionParameterTypeNames()
Get the parameter types of the action contained in this any.
string getActionReturnTypeName()
Get the name of the return type of the action contained in this any.
any getConstant(string constantName)
Get the value of a constant by name.
sequence<string> getConstantNames()
Get the names of the constants within this any.
string getDeclaredElementType()
If the object contained in this any is a sequence or dictionary type, get the name of the type of values contained within this object.
string getDeclaredKeyType()
If the object contained in this any is a dictionary type, then return the name of the key type of this dictionary.
sequence<any> getEntries()
Get all the entries within the contained object.
any getEntry(any key)
Get the entry corresponding to this key within the contained object.
any getField(string fieldName)
Get the value of a field by name.
sequence<string> getFieldNames()
Get the names of the fields within this any.
sequence<any> getFields()
Get the values of the fields within this any.
string getFieldString(string fieldName)
Get the value of a field by name.
sequence<string> getFieldTypes()
Get the names of the types of the fields within this any.
sequence<string> getFieldValues()
Get the values of the fields within this any.
action<sequence<any>> returns any getGenericAction()
Get the generic form of the action.
dictionary<any, any> getGenericDictionary()
Returns the contained object as a dictionary<any, any>.
sequence<any> getKeys()
Get the keys for the entries within the contained object.
string getTypeName()
Get the name of the type contained in this any.
sequence<string> getTypes()
Get the names of the types for the entries within the contained object.
boolean hasAction(string actionName)
Check whether an actionName exists within the contained object.
boolean hasEntry(any key)
Check whether a key exists within the contained object.
boolean hasField(string fieldName)
Check whether a fieldName exists within the contained object.
integer hash()
Get an integer hash representation of the underlying object.
boolean isDictionary()
Checks whether the object contained in this any is a dictionary.
boolean isEvent()
Checks whether the object contained in this any is an event.
boolean isSequence()
Checks whether the object contained in this any is a sequence.
any static newInstance(string typeName)
Create a new, default-initialized, instance of the given type name.
any static parse(string s)
Parse a string to an any.
any static parseType(string typeName, string stringForm)
Parse a string as a given type (by name).
void setEntry(any key, any value)
Set the entry in the contained type corresponding to a named key.
void setField(string fieldName, any value)
Set the value of a field by name.
string toString()
Convert this any to a string.
string valueToString()
Convert the contents of this any to a string.
| FRAMES NO FRAMES | |||||||
| |||||||
| SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION | ||||||