Class MethodProxy


  • public class MethodProxy
    extends AbstractProxy
    A container for information about class methods to be used in ASM patching.
    Since:
    0.3.0
    • Field Detail

      • parameters

        public final TypeProxy[] parameters
        An array of TypeProxy each representing the parameters of the method.
      • returnType

        public final TypeProxy returnType
        The TypeProxy for the return type of the method.
    • Constructor Detail

      • MethodProxy

        protected MethodProxy​(java.lang.String name,
                              int modifiers,
                              QualifiableProxy parent,
                              org.objectweb.asm.Type[] parameters,
                              org.objectweb.asm.Type returnType)
        A protected constructor, called only from the builder.
        Parameters:
        name - the name of the method
        modifiers - the modifiers of the method
        parent - the QualifiableProxy for the parent
        parameters - the parameters of the method
        returnType - the return type of the method
      • MethodProxy

        public MethodProxy​(java.lang.reflect.Method m)
        A public constructor, builds a proxy from a Method obtained from reflection.
        Parameters:
        m - the Method object corresponding to this.
    • Method Detail

      • builder

        public static MethodProxy.Builder builder​(java.lang.String name)
        Returns a new instance of MethodProxy.Builder.
        Parameters:
        name - the name of the method
        Returns:
        the builder object for method proxies
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether the given object is a proxy for the same element as this.
        Overrides:
        equals in class AbstractProxy
        Parameters:
        obj - the object to perform
        Returns:
        true if it's equal