Class WrapperUtil


  • @Deprecated
    public class WrapperUtil
    extends java.lang.Object
    Deprecated.
    Will be removed in next minor release.
    Utility methods for the wrappers.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String JAX_RS_PACKAGE_PREFIX
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      WrapperUtil()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      (package private) static boolean checkForJaxRsAnnotations​(java.lang.reflect.Method javaMethod)
      Deprecated.
      Checks, if the given annotation is annotated with at least one JAX-RS related annotation.
      private static boolean checkParamAnnotations​(java.lang.reflect.Constructor<?> constr)
      Deprecated.
      Checks if the parameters for the constructor are valid for a JAX-RS root resource class.
      private static boolean checkParameterAnnotation​(java.lang.annotation.Annotation[] parameterAnnotations, java.lang.Class<?> parameterType)
      Deprecated.
      Checks, if the annotations are valid for a runtime environment handled constructor.
      static java.util.List<MediaType> convertToMediaTypes​(java.lang.String[] mimes)
      Deprecated.
      Converts the given mimes to a List of MediaTypes.
      static java.lang.Object createInstance​(java.lang.reflect.Constructor<?> constructor, java.lang.Object... args)
      Deprecated.
      Creates an instance of the root resource class.
      static java.lang.reflect.Constructor<?> findJaxRsConstructor​(java.lang.Class<?> jaxRsClass, java.lang.String rrcOrProvider)
      Deprecated.
      Finds the constructor to use by the JAX-RS runtime.
      (package private) static Method getHttpMethod​(java.lang.reflect.Method javaMethod)
      Deprecated.
      Returns the HTTP method related to the given java method.
      static java.lang.String getValue​(NamedValue<java.lang.String> namedValue)
      Deprecated.
      Returns the value from the given Parameter.
      static boolean isBeanSetter​(java.lang.reflect.Method method, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
      Deprecated.
      Checks, if the given method is a bean setter and annotated with the given annotation.
      (package private) static boolean isVolatile​(java.lang.reflect.Method javaMethod)
      Deprecated.
      Checks, if the method is volatile(the return type of a sub class differs from the return type of the superclass, but is compatibel).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JAX_RS_PACKAGE_PREFIX

        private static final java.lang.String JAX_RS_PACKAGE_PREFIX
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WrapperUtil

        public WrapperUtil()
        Deprecated.
    • Method Detail

      • checkForJaxRsAnnotations

        static boolean checkForJaxRsAnnotations​(java.lang.reflect.Method javaMethod)
        Deprecated.
        Checks, if the given annotation is annotated with at least one JAX-RS related annotation.
        Parameters:
        javaMethod - Java method, class or something like that.
        Returns:
        true, if the given accessible object is annotated with any JAX-RS-Annotation.
      • checkParamAnnotations

        private static boolean checkParamAnnotations​(java.lang.reflect.Constructor<?> constr)
        Deprecated.
        Checks if the parameters for the constructor are valid for a JAX-RS root resource class.
        Parameters:
        paramAnnotationss -
        parameterTypes -
        Throws:
        IllegalTypeException - If a parameter is annotated with Context, but the type is invalid (must be UriInfo, Request or HttpHeaders).
      • checkParameterAnnotation

        private static boolean checkParameterAnnotation​(java.lang.annotation.Annotation[] parameterAnnotations,
                                                        java.lang.Class<?> parameterType)
        Deprecated.
        Checks, if the annotations are valid for a runtime environment handled constructor.
        Parameters:
        parameterAnnotations -
        parameterType -
        Returns:
      • convertToMediaTypes

        public static java.util.List<MediaType> convertToMediaTypes​(java.lang.String[] mimes)
        Deprecated.
        Converts the given mimes to a List of MediaTypes. Will never returns null.
        Parameters:
        mimes -
        Returns:
        Returns an unmodifiable List of MediaTypes
      • createInstance

        public static java.lang.Object createInstance​(java.lang.reflect.Constructor<?> constructor,
                                                      java.lang.Object... args)
                                               throws java.lang.reflect.InvocationTargetException,
                                                      InstantiateException
        Deprecated.
        Creates an instance of the root resource class.
        Parameters:
        constructor -
        args -
        Returns:
        the created instance
        Throws:
        java.lang.reflect.InvocationTargetException
        InstantiateException
      • findJaxRsConstructor

        public static java.lang.reflect.Constructor<?> findJaxRsConstructor​(java.lang.Class<?> jaxRsClass,
                                                                            java.lang.String rrcOrProvider)
                                                                     throws MissingConstructorException
        Deprecated.
        Finds the constructor to use by the JAX-RS runtime.
        Parameters:
        jaxRsClass - the root resource or provider class.
        rrcOrProvider - "root resource class" or "provider"
        Returns:
        Returns the constructor to use for the given root resource class or provider. If no constructor could be found, null is returned. Than try Class.newInstance()
        Throws:
        MissingConstructorException
      • getHttpMethod

        static Method getHttpMethod​(java.lang.reflect.Method javaMethod)
        Deprecated.
        Returns the HTTP method related to the given java method.
        Parameters:
        javaMethod -
        Returns:
      • getValue

        public static java.lang.String getValue​(NamedValue<java.lang.String> namedValue)
        Deprecated.
        Returns the value from the given Parameter. If the given parameter is null, null will returned. If the parameter is not null, but it's value, "" is returned.
        Parameters:
        namedValue - The name/value string couple.
        Returns:
        the value from the given Parameter. If the given parameter is null, null will returned. If the parameter is not null, but it's value, "" is returned.
      • isBeanSetter

        public static boolean isBeanSetter​(java.lang.reflect.Method method,
                                           java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
                                    throws java.lang.SecurityException
        Deprecated.
        Checks, if the given method is a bean setter and annotated with the given annotation. If it is a bean setter, the accessible attribute of is set the method is set to true.
        Parameters:
        method -
        annotationClass -
        Returns:
        true, if the method is a bean setter, or false if not
        Throws:
        java.lang.SecurityException
      • isVolatile

        static boolean isVolatile​(java.lang.reflect.Method javaMethod)
        Deprecated.
        Checks, if the method is volatile(the return type of a sub class differs from the return type of the superclass, but is compatibel).
        Parameters:
        javaMethod -
        Returns:
        true, if the method is volatile, otherwise false.