Class FunctionEncodedMemoryArea
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.processor.memory.AbstractEncodedMemoryArea
com.pnfsoftware.jeb.core.units.code.asm.processor.memory.FunctionEncodedMemoryArea
- All Implemented Interfaces:
IEncodedMemoryArea
Function Encoded Memory area uses a generic Function to determine the real memory area to use.
Since Memory area is dynamic, the length is also dynamic and must be set by user (it is
discouraged to use this
FunctionEncodedMemoryArea in composed EncodedMemoryAreaList
when length is dynamic).-
Constructor Summary
ConstructorsConstructorDescriptionFunctionEncodedMemoryArea(int length, Function<byte[], Long> f) Create a function-backed encoded memory area. -
Method Summary
Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.processor.memory.AbstractEncodedMemoryArea
decodeInt, shift
-
Constructor Details
-
FunctionEncodedMemoryArea
Create a function-backed encoded memory area.- Parameters:
length- encoded area length in bitsf- decoding function
-
-
Method Details
-
getLength
public int getLength()Description copied from interface:IEncodedMemoryAreaRetrieve the encoded area length in bits.- Returns:
- length in bits
-
decode
public long decode(byte[] code) Description copied from interface:IEncodedMemoryAreaDecode the area from instruction bytes.- Parameters:
code- instruction bytes- Returns:
- decoded value
-