# Class: com.pnfsoftware.jeb.util.interpreter.ExecutionResult

An object representing the result of execution of an action, including a type integer \(return code\) and a message string.

## Static Field: CODE_ERROR
Type: `int`

Constant value: `-1`
Description: Generic error result code.

## Static Field: CODE_NOT_IMPLEMENTED
Type: `int`

Constant value: `-3`
Description: Not\-implemented operation result code.

## Static Field: CODE_NOT_SUPPORTED
Type: `int`

Constant value: `-2`
Description: Unsupported operation result code.

## Static Field: CODE_SUCCESS
Type: `int`

Constant value: `0`
Description: Success result code.

## Static Field: GENERIC_ERROR
Type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`
Description: Generic failed execution result.

## Static Field: GENERIC_SUCCESS
Type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`
Description: Generic successful execution result.

## Static Field: NOT_IMPLEMENTED
Type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`
Description: Generic not\-implemented execution result.

## Static Field: NOT_SUPPORTED
Type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`
Description: Generic unsupported\-operation execution result.

## Method: equals
- parameter: `obj`, type: `java.lang.Object`
- return type: `boolean`


## Method: getCode
- return type: `int`

Description: Get the result code.
return: result code

## Method: getMessage
- return type: `java.lang.String`

Description: Get the result message.
return: result message, never null

## Method: hashCode
- return type: `int`


## Method: isError
- return type: `boolean`

Description: Determine whether execution failed.
return: true if the result code is not [#CODE_SUCCESS](#CODE_SUCCESS)

## Method: isSuccess
- return type: `boolean`

Description: Determine whether execution succeeded.
return: true if the result code is [#CODE_SUCCESS](#CODE_SUCCESS)

## Method: toString
- return type: `java.lang.String`


## Static Method: error
- parameter: `msg`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`

Description: Create an error execution result.
parameter: msg: error message
return: an error execution result

## Static Method: error
- parameter: `e`, type: `java.lang.Throwable`
- return type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`

Description: Create an error execution result from an exception.
parameter: e: exception to convert
return: an error execution result

## Static Method: failure
- parameter: `msg`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`

Description: Create an error execution result.
parameter: msg: error message
return: an error execution result

## Static Method: fromBoolean
- parameter: `success`, type: `boolean`
- return type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`

Description: Convert a boolean to a generic execution result.
parameter: success: true for success, false for error
return: [#GENERIC_SUCCESS](#GENERIC_SUCCESS) or [#GENERIC_ERROR](#GENERIC_ERROR)

## Static Method: fromObject
- parameter: `object`, type: `java.lang.Object`
- return type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`

Description: Convert an object to an execution result.
parameter: object: object to convert
return: a successful result containing `object.toString()`, or [#GENERIC_ERROR](#GENERIC_ERROR)         if the object is null

## Static Method: success
- parameter: `msg`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.util.interpreter.ExecutionResult`

Description: Create a successful execution result.
parameter: msg: result message
return: a successful execution result

