Class DynamicInvocation

  • All Implemented Interfaces:
    AstNode, Typed, Xmir

    public final class DynamicInvocation
    extends Object
    implements AstNode, Typed
    Dynamic invocation.
    Since:
    0.5
    To do:
    #329:90min Add Unit Test To Test DynamicInvocation Arguments. I added arguments field althogether with parsing and translation logic. But I didn't test this logic. We need to add unit tests for arguments parsing and translation.
    • Constructor Detail

      • DynamicInvocation

        public DynamicInvocation​(org.eolang.jeo.representation.xmir.XmlNode root)
        Constructor.
        Parameters:
        root - XMIR node to parse.
      • DynamicInvocation

        public DynamicInvocation​(org.eolang.jeo.representation.xmir.XmlNode root,
                                 Parser parser)
        Constructor.
        Parameters:
        root - XMIR node to parse.
        parser - Parser to find AST nodes of children.
      • DynamicInvocation

        public DynamicInvocation​(org.eolang.jeo.representation.xmir.XmlNode root,
                                 List<org.eolang.jeo.representation.xmir.XmlNode> chldren,
                                 Parser parser)
        Constructor. Added for efficiency to receive children nodes only once.
        Parameters:
        root - XMIR node to parse.
        chldren - XMIR node children.
        parser - Parser to find AST nodes of children.
      • DynamicInvocation

        public DynamicInvocation​(String name,
                                 Handle factory,
                                 String descriptor,
                                 List<Object> arguments)
        Constructor.
        Parameters:
        name - Name of the method.
        factory - Factory method reference.
        descriptor - Method descriptor.
        arguments - Factory method arguments.
        Suppressed Checkstyle violations:
        ParameterNumberCheck (5 lines)
      • DynamicInvocation

        public DynamicInvocation​(String name,
                                 Handle factory,
                                 String descriptor,
                                 List<Object> farguments,
                                 List<AstNode> arguments)
        Constructor.
        Parameters:
        name - Name of the method.
        factory - Factory method reference.
        descriptor - Method descriptor.
        farguments - Factory method arguments.
        arguments - Dynamic invocation method arguments.
        Suppressed Checkstyle violations:
        ParameterNumberCheck (5 lines)
      • DynamicInvocation

        public DynamicInvocation​(String name,
                                 Handle factory,
                                 Attributes attributes,
                                 List<Object> farguments,
                                 List<AstNode> arguments)
        Constructor.
        Parameters:
        name - Name of the method.
        factory - Factory method reference.
        attributes - Method attributes.
        farguments - Factory method arguments.
        arguments - Dynamic invocation arguments.
        Suppressed Checkstyle violations:
        ParameterNumberCheck (5 lines)
    • Method Detail

      • toXmir

        public Iterable<org.xembly.Directive> toXmir()
        Description copied from interface: Xmir
        Convert node to XMIR.
        Specified by:
        toXmir in interface Xmir
        Returns:
        XMIR XML.
      • opcodes

        public List<AstNode> opcodes()
        Description copied from interface: AstNode
        Bytecode instructions.
        Specified by:
        opcodes in interface AstNode
        Returns:
        List of opcodes.
      • type

        public org.objectweb.asm.Type type()
        Description copied from interface: Typed
        Node type.
        Specified by:
        type in interface Typed
        Returns:
        Type.