Class MethodProxy.Builder

java.lang.Object
ftbsc.lll.proxies.AbstractProxy.Builder<MethodProxy>
ftbsc.lll.proxies.impl.MethodProxy.Builder
Enclosing class:
MethodProxy

public static class MethodProxy.Builder extends AbstractProxy.Builder<MethodProxy>
A builder object for MethodProxy.
  • Method Details

    • addParameter

      public MethodProxy.Builder addParameter(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(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(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(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(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(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(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
    • build

      public MethodProxy build()
      Builds a MethodProxy of the given kind.
      Specified by:
      build in class AbstractProxy.Builder<MethodProxy>
      Returns:
      the built MethodProxy