Class Morph.Binder

    • Constructor Detail

      • Binder

        protected Binder​(MethodDescription forwardingMethod)
        Creates a new binder.
        Parameters:
        forwardingMethod - The method which is overridden for generating the proxy class.
    • Method Detail

      • install

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

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

        private static MethodDescription onlyMethod​(TypeDescription typeDescription)
        Extracts the only method of a given type and validates to fit the constraints of the morph annotation.
        Parameters:
        typeDescription - The type to extract the method from.
        Returns:
        The only method after validation.