Class AbstractInstructionOperandList
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandGeneric
com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandList
- All Implemented Interfaces:
IInstructionOperandGeneric
,IInstructionOperandList
,IInstructionOperandRegisterBased
,IInstructionOperandSized
,IInstructionOperand
@Ser
public abstract class AbstractInstructionOperandList
extends AbstractInstructionOperandGeneric
implements IInstructionOperandList
Reference implementation for
IInstructionOperandList
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Reserved inner space for mask.static final int
represent no flagstatic final int
: separatorstatic final int
, separatorstatic final int
- separatorstatic final int
; separatorstatic final int
" " separatorstatic final int
" " before and after a separatorstatic final int
{} containerstatic final int
[] containerstatic final int
<> containerstatic final int
"" containerstatic final int
() containerstatic final int
'' containerstatic final int
"" containerstatic final int
Reserved value for Child classesstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandGeneric
size, type, value
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric
TYPE_ADDR, TYPE_ALIAS, TYPE_CMA, TYPE_IMM, TYPE_LIST, TYPE_MEMIMM, TYPE_MEMREG, TYPE_REG, TYPE_RELADDR, TYPE_SIMM, TYPE_USER_1
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractInstructionOperandList
(int type, int size, long value, int flags, IInstructionOperandGeneric... operands) AbstractInstructionOperandList
(int size, long value, int flags, IInstructionOperandGeneric... operands) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected CharSequence
formatOperand
(IInstruction insn, long address) int
getFlags()
Get the list of operands represented by this operand.getPrefix
(IInstruction insn) Get the optional prefix to be prepended to the formatted operand.Retrieve the separator of the elements of the listgetSuffix
(IInstruction insn) Get the optional suffix to be appended to the formatted operand.int
hashCode()
merge
(long address) Attempt to merge parameter list to 1 parameter.Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractInstructionOperandGeneric
format, getAlias, getOperandBitsize, getOperandType, getOperandValue, getOperandValue, innerFormat, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
format
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric
getAlias, getOperandType, getOperandValue, getOperandValue, isImmediate, isRegister
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandRegisterBased
getRegisterName
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandSized
getOperandBitsize
-
Field Details
-
NO_FLAG
public static final int NO_FLAGrepresent no flag- See Also:
-
SURROUND_BRACKETS
public static final int SURROUND_BRACKETS[] container- See Also:
-
SURROUND_BRACES
public static final int SURROUND_BRACES{} container- See Also:
-
SURROUND_PARENTHESES
public static final int SURROUND_PARENTHESES() container- See Also:
-
SURROUND_CHEVRONS
public static final int SURROUND_CHEVRONS<> container- See Also:
-
SURROUND_QUOTES
public static final int SURROUND_QUOTES'' container- See Also:
-
SURROUND_DOUBLE_QUOTES
public static final int SURROUND_DOUBLE_QUOTES"" container- See Also:
-
SURROUND_SPACES
public static final int SURROUND_SPACES"" container- See Also:
-
SEPARATOR_SPACE
public static final int SEPARATOR_SPACE" " separator- See Also:
-
SEPARATOR_COMMA
public static final int SEPARATOR_COMMA, separator- See Also:
-
SEPARATOR_COLON
public static final int SEPARATOR_COLON: separator- See Also:
-
SEPARATOR_SEMI_COLON
public static final int SEPARATOR_SEMI_COLON; separator- See Also:
-
SEPARATOR_HYPHEN
public static final int SEPARATOR_HYPHEN- separator- See Also:
-
SEPARATOR_SURROUND_SPACE
public static final int SEPARATOR_SURROUND_SPACE" " before and after a separator- See Also:
-
USER_DEFINED_1
public static final int USER_DEFINED_1Reserved value for Child classes- See Also:
-
USER_DEFINED_2
public static final int USER_DEFINED_2- See Also:
-
USER_DEFINED_3
public static final int USER_DEFINED_3- See Also:
-
USER_DEFINED_4
public static final int USER_DEFINED_4- See Also:
-
USER_DEFINED_5
public static final int USER_DEFINED_5- See Also:
-
USER_DEFINED_6
public static final int USER_DEFINED_6- See Also:
-
USER_DEFINED_7
public static final int USER_DEFINED_7- See Also:
-
USER_DEFINED_8
public static final int USER_DEFINED_8- See Also:
-
FLAG_MASK
public static final int FLAG_MASKReserved inner space for mask. Concrete children can have bigger space- See Also:
-
-
Constructor Details
-
AbstractInstructionOperandList
public AbstractInstructionOperandList(int size, long value, int flags, IInstructionOperandGeneric... operands) - Parameters:
size
- size of the operandvalue
- internal value, can be 0 if unnecessaryoperands
- list of operandsflags
- 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]
-
AbstractInstructionOperandList
public AbstractInstructionOperandList(int type, int size, long value, int flags, IInstructionOperandGeneric... operands)
-
-
Method Details
-
formatOperand
- Overrides:
formatOperand
in classAbstractInstructionOperandGeneric
-
getPrefix
Description copied from interface:IInstructionOperandGeneric
Get the optional prefix to be prepended to the formatted operand.- Specified by:
getPrefix
in interfaceIInstructionOperandGeneric
- Overrides:
getPrefix
in classAbstractInstructionOperandGeneric
- Returns:
- optional prefix
-
getSuffix
Description copied from interface:IInstructionOperandGeneric
Get the optional suffix to be appended to the formatted operand.- Specified by:
getSuffix
in interfaceIInstructionOperandGeneric
- Overrides:
getSuffix
in classAbstractInstructionOperandGeneric
- Returns:
- optional suffix
-
getOperands
Description copied from interface:IInstructionOperandList
Get the list of operands represented by this operand.- Specified by:
getOperands
in interfaceIInstructionOperandList
-
getFlags
public int getFlags() -
getSeparator
Description copied from interface:IInstructionOperandList
Retrieve the separator of the elements of the list- Specified by:
getSeparator
in interfaceIInstructionOperandList
-
merge
Description copied from interface:IInstructionOperandList
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.- Specified by:
merge
in interfaceIInstructionOperandList
- Returns:
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractInstructionOperandGeneric
-
equals
- Overrides:
equals
in classAbstractInstructionOperandGeneric
-