Class InvokespecialAgent

  • All Implemented Interfaces:
    DecompilationAgent

    public final class InvokespecialAgent
    extends Object
    implements DecompilationAgent
    Invokespecial instruction handler.
    Since:
    0.1
    To do:
    #229:90min Is Labeled Class an Abstraction Failure? As you can see in InvokespecialAgent we use many 'instanceof' checks. This is a clear sign that the class hierarchy is not well designed. The original problem lies in the Labeled class. We need to find more elegant solutions to handle labels in AST.
    Suppressed Checkstyle violations:
    NoJavadocForOverriddenMethodsCheck (500 lines), MultilineJavadocTagsCheck (500 lines)
    • Constructor Detail

      • InvokespecialAgent

        public InvokespecialAgent()
    • 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 interface DecompilationAgent
        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 interface DecompilationAgent
        Returns:
        Supported opcodes.
      • handle

        public void handle​(DecompilerState state)
        Handle invokespecial instruction.
        Specified by:
        handle in interface DecompilationAgent
        Parameters:
        state - Current instruction to handle together with operand stack and variables.
        To do:
        #344:90min Super and Constructor classes ambiguity. Recently I removed the following code from this method: state.stack().push( new Constructor( target, new Attributes().descriptor(descriptor).interfaced(interfaced), args ) ); The reason behind this integration test with WebProperties$Resources$Chain$Strategy$Content.xmir class. See JeoAndOpeoTest for more info. We need to use both Super and This classes. Moreover, we might need to add some other representations. Don't forget to remove suppressions.