Class JerseyProxyResolver

    • Constructor Detail

      • JerseyProxyResolver

        public JerseyProxyResolver()
    • Method Detail

      • isPrixiable

        public boolean isPrixiable​(Injectee injectee)
        Returns true if one of the proxiable annotations is present on the clazz into which values are injected.

        In these cases the value is not proxiable:

        • Class without the annotation
        • Class annotated by RequestScoped
        • Class annotated by RequestScoped
          Parameters:
          injectee - information about the injection point.
          Returns:
          true if contains one proxiable annotation at least.
        • isPrixiable

          public boolean isPrixiable​(Class<? extends Annotation> scopeAnnotation)
          Returns true if one of the proxiable annotations is present on the clazz.

          In these cases the value is not proxiable:

          • Class without the annotation
          • Class annotated by RequestScoped
          • Class annotated by RequestScoped
            Parameters:
            scopeAnnotation - annotation belonging to the scope of the class.
            Returns:
            true if contains one proxiable annotation at least.
          • proxy

            public Object proxy​(Injectee injectee,
                                InjectionResolver resolver)
            Returns a proxy (newly created or cached) which is able to call InjectionResolver with the given Injectee to get the value in proper scope.
            Parameters:
            injectee - information about the injection point.
            resolver - dedicated resolver which find the value.
            Returns:
            created proxy which resolve the value in the proper scope.
          • noCachedProxy

            public Object noCachedProxy​(Injectee injectee,
                                        Supplier<Object> supplier)
            Returns a proxy (newly created or cached) which is able to call the given Supplier. This method does not cache a result.
            Parameters:
            injectee - information about the injection point.
            supplier - supplier called using the proxy.
            Returns:
            created proxy which resolve the value in the proper scope.