Class MethodProxy.Builder

    • Method Detail

      • addParameter

        public MethodProxy.Builder addParameter​(java.lang.String fqn,
                                                int arrayLevel)
        Adds a parameter of a given type.
        Parameters:
        fqn - the fully qualified name of the parameter type
        arrayLevel - the array level of the parameter type
        Returns:
        the builder's state after the change
      • addParameter

        public MethodProxy.Builder addParameter​(java.lang.Class<?> paramType)
        Adds a parameter of a given type.
        Parameters:
        paramType - the Class object corresponding to the parameter type.
        Returns:
        the builder's state after the change
      • setReturnType

        public MethodProxy.Builder setReturnType​(java.lang.String fqn,
                                                 int arrayLevel)
        Sets the return type to the given type.
        Parameters:
        fqn - the fully qualified name of the return type
        arrayLevel - the array level of the return type
        Returns:
        the builder's state after the change
      • setParent

        public MethodProxy.Builder setParent​(java.lang.String parentFQN,
                                             int modifiers)
        Sets the parent class of this method to the one described by the fully qualified name and with the given modifiers.
        Parameters:
        parentFQN - the fully qualified name of the parent
        modifiers - the modifiers of the parent
        Returns:
        the builder's state after the change
      • setParent

        public MethodProxy.Builder setParent​(java.lang.String parentFQN)
        Sets the parent class of this method to the one described by the fully qualified name.
        Parameters:
        parentFQN - the fully qualified name of the parent
        Returns:
        the builder's state after the change
      • setReturnType

        public MethodProxy.Builder setReturnType​(java.lang.Class<?> returnType)
        Sets the return type to the given type.
        Parameters:
        returnType - the Class object corresponding to the return type
        Returns:
        the builder's state after the change
      • setDescriptor

        public MethodProxy.Builder setDescriptor​(java.lang.String descr)
        Sets the type of the method to the given descriptor, and extracts return and parameter types from it.
        Overrides:
        setDescriptor in class AbstractProxy.Builder<MethodProxy>
        Parameters:
        descr - the descriptor
        Returns:
        the builder's state after the change