# Interface: com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric

This interface is used to represent the most common types of operands: immediate values, registers, direct addresses \(absolute or relative\), memory access, etc.

## Static Field: TYPE_ADDR
Type: `int`

Constant value: `2`
Description: An absolute address. Value= the address.

## Static Field: TYPE_ALIAS
Type: `int`

Constant value: `6`
Description: An alias for some value, represented as a String. Implement [#getAlias(long)](#getAlias(long)) to display the correct String. Value= TBD.

## Static Field: TYPE_CMA
Type: `int`

Constant value: `8`
Description: A complex memory access operand. Child class is specialized, it implements [IInstructionOperandCMA](IInstructionOperandCMA). Value= N/A.

## Static Field: TYPE_IMM
Type: `int`

Constant value: `1`
Description: Immediate value of at most 64\-bit. Value= the value itself. Signedness is auto\-determined for immediates whose [bitsize](#getOperandBitsize()) is less than or equal to 63 bits. For 64\-bit immediates, unsigned is assumed.

## Static Field: TYPE_LIST
Type: `int`

Constant value: `7`
Description: A list of operands. Child class is specialized, it implements [IInstructionOperandList](IInstructionOperandList). Value= TBD.

## Static Field: TYPE_MEMIMM
Type: `int`

Constant value: `5`
Description: Memory access via absolute address. The operand size identifies the size of the accessed data. Value= immediate value that corresponds to the memory access address.

## Static Field: TYPE_MEMREG
Type: `int`

Constant value: `4`
Description: Memory access via register. The operand size identifies the size of the accessed data. Value= register identifier that determines the memory access address.

## Static Field: TYPE_REG
Type: `int`

Constant value: `0`
Description: A register. Value= an opaque register identifier.

## Static Field: TYPE_RELADDR
Type: `int`

Constant value: `3`
Description: An offset to the instruction address. Value= the relative or absolute address, using [getOperandValue\(instruction\_address\)](#getOperandValue(long)).

## Static Field: TYPE_SIMM
Type: `int`

Constant value: `9`
Description: Signed immediate value of at most 64\-bit.

## Static Field: TYPE_USER_1
Type: `int`

Constant value: `4096`
Description: Type to be used for specific user entries. Other types can be declared using `TYPE_USER_1 + n`, with `0 <= n < 0x1000`.

## Method: getAlias
- parameter: `value`, type: `long`
- return type: `java.lang.String`

Description: Get the optional alias string to be displayed instead of a given integer value.
parameter: value: integer value to alias
return: optional alias

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

Description: Get the operand type. Used to determine how to interpret the results provided by [#getOperandBitsize()](#getOperandBitsize()) and [#getOperandValue()](#getOperandValue()).
return: one of the `TYPE_Xxx` constants

## Method: getOperandValue
- return type: `long`

Description: Get the value of the operand. The interpretation of the value depends on the operand type and the underlying implementation.
return: the opaque operand value

## Method: getOperandValue
- parameter: `address`, type: `long`
- return type: `long`

Description: Get the value of the operand, adjusted \(if relevant\) for an instruction located at the provided address. Example: If the operand is a memory access, this method may return "address \+ operand value".
parameter: address: instruction address
return: the address\-adjusted operand value

## Method: getPrefix
- parameter: `insn`, type: `com.pnfsoftware.jeb.core.units.code.IInstruction`
- return type: `java.lang.String`

Description: Get the optional prefix to be prepended to the formatted operand.
parameter: insn: instruction containing this operand
return: optional prefix

## Method: getSuffix
- parameter: `insn`, type: `com.pnfsoftware.jeb.core.units.code.IInstruction`
- return type: `java.lang.String`

Description: Get the optional suffix to be appended to the formatted operand.
parameter: insn: instruction containing this operand
return: optional suffix

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

Description: Test if an operand type is [#TYPE_IMM](#TYPE_IMM)
return: true for Immediate

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

Description: Test if an operand type is [#TYPE_REG](#TYPE_REG)
return: true for Register

