com.mercury.ftjadin.utils
Class Retval
java.lang.Object java.lang.Throwable com.mercury.ftjadin.utils.Retval
- All Implemented Interfaces:
- java.io.Serializable
- extends java.lang.Throwable
public final class Retval
The Retval class represents the result of a replay operation.
There are three types of constructors.
The first uses only an error code like OK or error.
For example, JavaList.Select may return OK, out of range,
or item not found. For example:
throw new NoMatchingMethodException(Retval.ILLEGAL_NUM_OF_PARAMS);
There is a single instance for every value, so that it is usually not necessary
to use new
. For example:
return Retval.ILLEGAL_PARAMETER;
The second constructor uses an error code and a return value.
For example:
return (new Retval(RError.E_OK, Integer.toString(counter)));
The third constructor takes only a return value, but no error code. The error code
is always E_OK.
- See Also:
- Serialized Form
Field Summary | |
---|---|
static Retval | ATTR_NOT_SUPPORTED Property in function call not supported. |
static Retval | DIFF The attribute does not have the desired value. |
static Retval | DISABLED Object is disabled or in a disabled window. |
int | err_code The error code property. |
static Retval | GENERAL_ERROR General error . |
static Retval | ILLEGAL_NUM_OF_PARAMS No method signature with number of parameters passed in this invocation. |
static Retval | ILLEGAL_OPERATION Operation cannot be performed. |
static Retval | ILLEGAL_PARAMETER Parameter undefined or not valid. |
static Retval | INCOMPLETE Could not get entire string or list. |
static Retval | ITEM_NOT_FOUND Item of this description or index not found. |
static Retval | NOT_DISPLAYED Object, menu, or window not visible or not available for user operation. |
static Retval | NOT_FOUND Window or object not found. |
static Retval | NOT_IMPLEMENTED Invoked function not implemented. |
static Retval | NOT_IN_MAPPING Item not mapped. |
static Retval | NOT_RESPONDING Method invocation timed out. |
static Retval | NOT_UNIQUE More than one window or object matches the description. |
static Retval | OBJECT_SYNTAX Descriptor cannot be parsed. |
static Retval | OK Operation successful. |
static Retval | OUT_OF_RANGE Parameter is out of range. |
static Retval | PROCESS_INPUT Application cannot respond - processing other input events. |
java.lang.Object | ret_val The return value object. |
static Retval | SET_WIN Need to make window active. |
Constructor Summary | |
---|---|
Retval(int rc) Creates a Retval having one of the predefined return codes and a null value. | |
Retval(int rc,
java.lang.Object val) Creates a Retval having one of the predefined return codes and the specified value. | |
Retval(java.lang.Object val) Creates a Retval for a successful operation with the specified value. |
Method Summary | |
---|---|
boolean | ok() Checks whether this Retval is the result of a successful operation. |
java.lang.String | toString() Returns a string representation of the object. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Field Detail |
---|
OK
public static final Retval OK
- Operation successful.
GENERAL_ERROR
public static final Retval GENERAL_ERROR
- General error .
NOT_FOUND
public static final Retval NOT_FOUND
- Window or object not found.
NOT_UNIQUE
public static final Retval NOT_UNIQUE
- More than one window or object matches the description.
ILLEGAL_OPERATION
public static final Retval ILLEGAL_OPERATION
- Operation cannot be performed.
OUT_OF_RANGE
public static final Retval OUT_OF_RANGE
- Parameter is out of range.
ILLEGAL_PARAMETER
public static final Retval ILLEGAL_PARAMETER
- Parameter undefined or not valid.
NOT_IN_MAPPING
public static final Retval NOT_IN_MAPPING
- Item not mapped.
PROCESS_INPUT
public static final Retval PROCESS_INPUT
- Application cannot respond - processing other input events.
NOT_IMPLEMENTED
public static final Retval NOT_IMPLEMENTED
- Invoked function not implemented.
INCOMPLETE
public static final Retval INCOMPLETE
- Could not get entire string or list.
NOT_DISPLAYED
public static final Retval NOT_DISPLAYED
- Object, menu, or window not visible or not available for user operation.
DISABLED
public static final Retval DISABLED
- Object is disabled or in a disabled window.
ITEM_NOT_FOUND
public static final Retval ITEM_NOT_FOUND
- Item of this description or index not found.
NOT_RESPONDING
public static final Retval NOT_RESPONDING
- Method invocation timed out.
OBJECT_SYNTAX
public static final Retval OBJECT_SYNTAX
- Descriptor cannot be parsed.
ILLEGAL_NUM_OF_PARAMS
public static final Retval ILLEGAL_NUM_OF_PARAMS
- No method signature with number of parameters passed in this invocation.
ATTR_NOT_SUPPORTED
public static final Retval ATTR_NOT_SUPPORTED
- Property in function call not supported.
DIFF
public static final Retval DIFF
- The attribute does not have the desired value.
SET_WIN
public static final Retval SET_WIN
- Need to make window active.
err_code
public int err_code
- The error code property.
ret_val
public java.lang.Object ret_val
- The return value object.
Constructor Detail |
---|
Retval
public Retval(int rc)
- Creates a Retval having one of the predefined return codes and a null value. For example, new Retval(RError.E_OK);
Retval
public Retval(int rc, java.lang.Object val)
- Creates a Retval having one of the predefined return codes and the specified value. For example, new Retval(RError.E_OK, valueObj);
Retval
public Retval(java.lang.Object val)
- Creates a Retval for a successful operation with the specified value. The error code is E_OK. The value is the object passed.
Method Detail |
---|
toString
public java.lang.String toString()
- Returns a string representation of the object.
- Overrides:
toString
in classjava.lang.Throwable
ok
public boolean ok()
- Checks whether this Retval is the result of a successful operation.
- Returns:
- True if the error code is E_OK.