Class ResourceMethodValidator

  • All Implemented Interfaces:
    ResourceModelVisitor

    class ResourceMethodValidator
    extends AbstractResourceModelVisitor
    Validator checking resource methods and sub resource locators. The validator mainly checks the parameters of resource methods and sub resource locators.
    • Field Detail

      • valueParamProviders

        private final java.util.Collection<ValueParamProvider> valueParamProviders
      • PARAM_ANNOTATION_SET

        private static final java.util.Set<java.lang.Class> PARAM_ANNOTATION_SET
    • Constructor Detail

      • ResourceMethodValidator

        ResourceMethodValidator​(java.util.Collection<ValueParamProvider> valueParamProviders)
    • Method Detail

      • visitJaxrsResourceMethod

        private void visitJaxrsResourceMethod​(ResourceMethod method)
      • checkUnexpectedAnnotations

        private void checkUnexpectedAnnotations​(ResourceMethod resourceMethod)
      • checkValueProviders

        private void checkValueProviders​(ResourceMethod method)
      • visitSubResourceLocator

        private void visitSubResourceLocator​(ResourceMethod locator)
      • checkParameters

        private void checkParameters​(ResourceMethod method)
      • isSseInjected

        private boolean isSseInjected​(Invocable invocable)
      • createParamAnnotationSet

        private static java.util.Set<java.lang.Class> createParamAnnotationSet()
      • validateParameter

        static void validateParameter​(Parameter parameter,
                                      java.lang.Object source,
                                      java.lang.String reportedSourceName,
                                      java.lang.String reportedParameterName,
                                      boolean injectionsForbidden)
        Validate a single parameter instance.
        Parameters:
        parameter - parameter to be validated.
        source - parameter source; used for issue reporting.
        reportedSourceName - source name; used for issue reporting.
        reportedParameterName - parameter name; used for issue reporting.
        injectionsForbidden - true if parameters cannot be injected by parameter annotations, eg. @HeaderParam.
      • isConcreteType

        private static boolean isConcreteType​(java.lang.reflect.Type t)
      • isConcreteParameterizedType

        private static boolean isConcreteParameterizedType​(java.lang.reflect.ParameterizedType pt)