Class Pipe.Binder

    • Field Detail

      • forwardingMethod

        private final MethodDescription forwardingMethod
        The method which implements the behavior of forwarding a method invocation. This method needs to define a single non-static method with an Object to Object mapping.
    • Constructor Detail

      • Binder

        protected Binder​(MethodDescription forwardingMethod)
        Creates a new binder. This constructor is not doing any validation of the forwarding method and its declaring type. Such validation is normally performed by the install(Class) method.
        Parameters:
        forwardingMethod - The method which implements the behavior of forwarding a method invocation. This method needs to define a single non-static method with an Object to Object mapping.
    • Method Detail

      • install

        public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install​(java.lang.Class<?> type)
        Installs a given type for use on a Pipe annotation. The given type must be an interface without any super interfaces and a single method which maps an Object type to another Object type. The use of generics is permitted.
        Parameters:
        type - The type to install.
        Returns:
        A binder for the Pipe annotation.
      • install

        public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install​(TypeDescription typeDescription)
        Installs a given type for use on a Pipe annotation. The given type must be an interface without any super interfaces and a single method which maps an Object type to another Object type. The use of generics is permitted.
        Parameters:
        typeDescription - The type to install.
        Returns:
        A binder for the Pipe annotation.
      • onlyMethod

        private static MethodDescription onlyMethod​(TypeDescription typeDescription)
        Locates the only method of a type that is compatible to being overridden for invoking the proxy.
        Parameters:
        typeDescription - The type that is being installed.
        Returns:
        Its only method after validation.