public abstract class

AbstractInstructionOperandList

extends AbstractInstructionOperandGeneric
implements IInstructionOperandList
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandGeneric
     ↳ com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandList

Class Overview

Reference implementation for IInstructionOperandList.

Summary

Constants
int FLAG_MASK Reserved inner space for mask.
int NO_FLAG represent no flag
int SEPARATOR_COLON : separator
int SEPARATOR_COMMA , separator
int SEPARATOR_HYPHEN - separator
int SEPARATOR_SEMI_COLON ; separator
int SEPARATOR_SPACE " " separator
int SURROUND_BRACES {} container
int SURROUND_BRACKETS [] container
int SURROUND_CHEVRONS <> container
int SURROUND_DOUBLE_QUOTES "" container
int SURROUND_PARENTHESES () container
int SURROUND_QUOTES '' container
int SURROUND_SPACES "" container
int USER_DEFINED_1 Reserved value for Child classes
int USER_DEFINED_2
int USER_DEFINED_3
int USER_DEFINED_4
int USER_DEFINED_5
int USER_DEFINED_6
int USER_DEFINED_7
int USER_DEFINED_8
[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric
[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandGeneric
Public Constructors
AbstractInstructionOperandList(int size, long value, int flags, IInstructionOperandGeneric... operands)
AbstractInstructionOperandList(int type, int size, long value, int flags, IInstructionOperandGeneric... operands)
Public Methods
boolean equals(Object obj)
int getFlags()
IInstructionOperand[] getOperands()
Get the list of operands represented by this operand.
String getPrefix(IInstruction insn)
Get the optional prefix to be prepended to the formatted operand.
String getSeparator()
Retrieve the separator of the elements of the list
String getSuffix(IInstruction insn)
Get the optional suffix to be appended to the formatted operand.
int hashCode()
IInstructionOperandGeneric merge(long address)
Attempt to merge parameter list to 1 parameter.
Protected Methods
CharSequence formatOperand(IInstruction insn, long address)
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandGeneric
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
From interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric
From interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandList
From interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandRegisterBased
From interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandSized

Constants

public static final int FLAG_MASK

Reserved inner space for mask. Concrete children can have bigger space

Constant Value: 16777215 (0x00ffffff)

public static final int NO_FLAG

represent no flag

Constant Value: 0 (0x00000000)

public static final int SEPARATOR_COLON

: separator

Constant Value: 1024 (0x00000400)

public static final int SEPARATOR_COMMA

, separator

Constant Value: 512 (0x00000200)

public static final int SEPARATOR_HYPHEN

- separator

Constant Value: 4096 (0x00001000)

public static final int SEPARATOR_SEMI_COLON

; separator

Constant Value: 2048 (0x00000800)

public static final int SEPARATOR_SPACE

" " separator

Constant Value: 256 (0x00000100)

public static final int SURROUND_BRACES

{} container

Constant Value: 2 (0x00000002)

public static final int SURROUND_BRACKETS

[] container

Constant Value: 1 (0x00000001)

public static final int SURROUND_CHEVRONS

<> container

Constant Value: 8 (0x00000008)

public static final int SURROUND_DOUBLE_QUOTES

"" container

Constant Value: 32 (0x00000020)

public static final int SURROUND_PARENTHESES

() container

Constant Value: 4 (0x00000004)

public static final int SURROUND_QUOTES

'' container

Constant Value: 16 (0x00000010)

public static final int SURROUND_SPACES

"" container

Constant Value: 64 (0x00000040)

public static final int USER_DEFINED_1

Reserved value for Child classes

Constant Value: 65536 (0x00010000)

public static final int USER_DEFINED_2

Constant Value: 131072 (0x00020000)

public static final int USER_DEFINED_3

Constant Value: 262144 (0x00040000)

public static final int USER_DEFINED_4

Constant Value: 524288 (0x00080000)

public static final int USER_DEFINED_5

Constant Value: 1048576 (0x00100000)

public static final int USER_DEFINED_6

Constant Value: 2097152 (0x00200000)

public static final int USER_DEFINED_7

Constant Value: 4194304 (0x00400000)

public static final int USER_DEFINED_8

Constant Value: 8388608 (0x00800000)

Public Constructors

public AbstractInstructionOperandList (int size, long value, int flags, IInstructionOperandGeneric... operands)

Parameters
size size of the operand
value internal value, can be 0 if unnecessary
flags used to format the operand list : this concerns separator as well as container.
For example: BRACKETS | COMMA | SPACE will generate a list [el1, el2, el3]
operands list of operands

public AbstractInstructionOperandList (int type, int size, long value, int flags, IInstructionOperandGeneric... operands)

Public Methods

public boolean equals (Object obj)

public int getFlags ()

public IInstructionOperand[] getOperands ()

Get the list of operands represented by this operand.

public String getPrefix (IInstruction insn)

Get the optional prefix to be prepended to the formatted operand.

Returns
  • optional prefix

public String getSeparator ()

Retrieve the separator of the elements of the list

public String getSuffix (IInstruction insn)

Get the optional suffix to be appended to the formatted operand.

Returns
  • optional suffix

public int hashCode ()

public IInstructionOperandGeneric merge (long address)

Attempt to merge parameter list to 1 parameter. When not possible, this method will return null. Otherwise, the returned value can be considered as equivalent to the list. For example 0x45, 0 defined for a right shift is equivalent to 0x22, PC+4 is equivalent to its absolute address.

Protected Methods

protected CharSequence formatOperand (IInstruction insn, long address)