Class XmlMethod


  • public final class XmlMethod
    extends Object
    XML method.
    Since:
    0.1
    • Constructor Detail

      • XmlMethod

        public XmlMethod​(String name,
                         int access,
                         String descriptor,
                         XmlBytecodeEntry... entries)
        Constructor.
        Parameters:
        name - Method name.
        access - Access modifiers.
        descriptor - Method descriptor.
        entries - Method instructions.
    • Method Detail

      • name

        public String name()
        Method name.
        Returns:
        Name.
      • access

        public int access()
        Method access modifiers.
        Returns:
        Access modifiers.
      • descriptor

        public String descriptor()
        Method descriptor.
        Returns:
        Descriptor.
      • node

        public Node node()
        XML node.
        Returns:
        XML node.
      • isConstructor

        public boolean isConstructor()
        Checks if method is a constructor.
        Returns:
        True if method is a constructor.
      • copy

        public XmlMethod copy()
        Copy method node.
        Returns:
        Instructions.
      • invokeVirtuals

        public List<XmlInvokeVirtual> invokeVirtuals()
        Retrieves the list of all invocations of other object methods. Usually they are invoke virtual instructions which look like this: - GET FIELD: foo - LIST OF ARGUMENTS - INVOKEVIRTUAL: bar This list represents the following command: foo.bar(a, b);
        Returns:
        List of invocations.
      • inline

        public void inline​(XmlMethod inline)
        Inline all method invocations.
        Parameters:
        inline - Method to inline.
      • setInstructions

        public void setInstructions​(List<XmlBytecodeEntry> updated)
        Set instructions for method.
        Parameters:
        updated - New instructions.