Enum Class CometCScriptFunction.CallStyle
java.lang.Object
java.lang.Enum<CometCScriptFunction.CallStyle>
com.priint.pubserver.comet.bridge.CometCScriptFunction.CallStyle
- All Implemented Interfaces:
Serializable,Comparable<CometCScriptFunction.CallStyle>,Constable
- Enclosing class:
- CometCScriptFunction
The enum Call style.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFunctions return a (calculated) value, therefore we cannot use the result value of the corresponding cscript functions to indicate errors.
The result type is determined by the result type of the Java method annotated as CometCScriptFunction.Procedures don't have a return value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static CometCScriptFunction.CallStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PROCEDURE
Procedures don't have a return value. The result type of the corresponding cscript function therefore is an integer value indicating the result of the procedure call (0 = success, other values = error). -
FUNCTION
Functions return a (calculated) value, therefore we cannot use the result value of the corresponding cscript functions to indicate errors.
The result type is determined by the result type of the Java method annotated as CometCScriptFunction. Only certain types are supported:- Java type java.lang.String: cscript char *
- Java type List<String> or String[]: cscript type StringList
- Java type com.priint.pubserver.comet.bridge.entitydata.RecordID: cscript type idtype
- Java type List<RecordID>: cscript type idtypelist
- Java type com.priint.pubserver.comet.bridge.entitydata.Product: cscript type product
- Java type List<Product>: cscript type productlist
To indicate errors, you have to return significant values (e.g. -1 for an index, which cannot possibly be a valid index) OR add an integer pointer parameter after the last regular parameter of the function call.
In this case, the result / error code will be assigned to the variable denoted by this address.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-