Class IfAgent
java.lang.Object
org.eolang.opeo.decompilation.agents.IfAgent
- All Implemented Interfaces:
DecompilationAgent
If instruction handler.
[value1, value2] → []
If value1 is greater than value2, branch to instruction at branchoffset
(signed short constructed from unsigned bytes branchbyte1 << 8 | branchbyte2)
- Since:
- 0.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
appropriate
(DecompilerState state) Check if the agent is suitable for the current state.void
handle
(DecompilerState state) Handle the current state.org.eolang.opeo.decompilation.agents.Supported
Supported opcodes.
-
Constructor Details
-
IfAgent
public IfAgent()
-
-
Method Details
-
appropriate
Description copied from interface:DecompilationAgent
Check if the agent is suitable for the current state.- Specified by:
appropriate
in interfaceDecompilationAgent
- Parameters:
state
- Current state.- Returns:
- True if the agent is suitable for the current state.
-
supported
public org.eolang.opeo.decompilation.agents.Supported supported()Description copied from interface:DecompilationAgent
Supported opcodes.- Specified by:
supported
in interfaceDecompilationAgent
- Returns:
- Supported opcodes.
-
handle
Description copied from interface:DecompilationAgent
Handle the current state.- Specified by:
handle
in interfaceDecompilationAgent
- Parameters:
state
- Current state to handle together with operand stack and variables.
-