Class Handle

  • All Implemented Interfaces:
    Xmir

    public final class Handle
    extends Object
    implements Xmir
    Method or field reference.
    Since:
    0.5
    To do:
    #329:90min Refactor and rename Handle class. I implemented this class as fast as possible to implement DynamicInvocation class. It is not a good name for this class. It should be renamed to something more meaningful. Moreover, we need to add more tests for it.
    • Constructor Detail

      • Handle

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

        public Handle​(org.eolang.jeo.representation.xmir.XmlNode root,
                      List<org.eolang.jeo.representation.xmir.XmlNode> children)
        Constructor.
        Parameters:
        root - XMIR node to parse.
        children - XMIR root node children to parse.
      • Handle

        public Handle​(org.objectweb.asm.Handle handle)
        Constructor.
        Parameters:
        handle - ASM handle.
      • Handle

        public Handle​(int tag,
                      String name,
                      String owner,
                      String desc,
                      boolean itf)
        Constructor.
        Parameters:
        tag - Reference type.
        name - Name of the method or field.
        owner - Owner of the method or field.
        desc - Descriptor of the method or field.
        itf - Is it an interface method?
        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.
      • toAsm

        public org.objectweb.asm.Handle toAsm()
        Convert to ASM handle.
        Returns:
        ASM handle.