Class AllAgents
- java.lang.Object
-
- org.eolang.opeo.decompilation.agents.AllAgents
-
- All Implemented Interfaces:
DecompilationAgent
public final class AllAgents extends Object implements DecompilationAgent
All agents that try to decompile incoming instructions.- Since:
- 0.2
- To do:
- #376:90min Decompilation Finish Condition.
Currently we decompile until we out of instructions.
But this might be incorrect when we start decompile high-level constructs.
We should check decompilation stack instead.
If it changes, we should continue. Otherwise, we should stop.
The current implementation you can find here
handle(DecompilerState)
. - Suppressed Checkstyle violations:
- ClassFanOutComplexityCheck (500 lines)
-
-
Constructor Summary
Constructors Constructor Description AllAgents()
Constructor.AllAgents(boolean counting, TracedAgent.Output output)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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()
Supported opcodes.String[]
supportedOpcodes()
Get supported opcodes.
-
-
-
Constructor Detail
-
AllAgents
public AllAgents()
Constructor.
-
AllAgents
public AllAgents(boolean counting, TracedAgent.Output output)
Constructor.- Parameters:
counting
- Do we put numbers to opcodes?output
- Where do we save output logs?
-
-
Method Detail
-
appropriate
public boolean appropriate(DecompilerState state)
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
public void handle(DecompilerState state)
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.
-
supportedOpcodes
public String[] supportedOpcodes()
Get supported opcodes.- Returns:
- Supported opcodes.
-
-