Class MethodMapping

    • Constructor Detail

      • MethodMapping

        public MethodMapping​(String owner,
                             String oldName,
                             String descriptor,
                             String newName,
                             boolean propagate)
        Creates a new method mapping with hierarchy propagation option.
        Parameters:
        owner - The internal name of the class owning the method (e.g., "com/example/MyClass")
        oldName - The old method name (e.g., "process")
        descriptor - The method descriptor (e.g., "(ILjava/lang/String;)V")
        newName - The new method name (e.g., "handle")
        propagate - Whether to propagate the rename through the inheritance hierarchy
      • MethodMapping

        public MethodMapping​(String owner,
                             String oldName,
                             String descriptor,
                             String newName)
        Creates a new method mapping without hierarchy propagation.
        Parameters:
        owner - The internal name of the class owning the method (e.g., "com/example/MyClass")
        oldName - The old method name (e.g., "process")
        descriptor - The method descriptor (e.g., "(ILjava/lang/String;)V")
        newName - The new method name (e.g., "handle")
        Throws:
        IllegalArgumentException - if any argument is null or empty, if the names are equal, or if the old name is a constructor or static initializer
    • Method Detail

      • getOwner

        public String getOwner()
        Returns:
        the owner
      • getDescriptor

        public String getDescriptor()
        Returns:
        the descriptor
      • isPropagate

        public boolean isPropagate()
        Returns:
        whether propagate
      • getFullyQualifiedName

        public String getFullyQualifiedName()
        Joins the owner, original name and descriptor into one identifier.
        Returns:
        the identifier, formatted as "owner.oldName:descriptor"
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object