class ResourceMethodValidator extends AbstractResourceModelVisitor
Modifier and Type | Field and Description |
---|---|
private org.glassfish.hk2.api.ServiceLocator |
locator |
private static java.util.Set<java.lang.Class> |
PARAM_ANNOTATION_SET |
Constructor and Description |
---|
ResourceMethodValidator(org.glassfish.hk2.api.ServiceLocator locator)
Create new resource method validator.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkMethod(ResourceMethod method) |
private void |
checkParameters(ResourceMethod method) |
private void |
checkValueProviders(ResourceMethod method) |
private static java.util.Set<java.lang.Class> |
createParamAnnotationSet() |
private static boolean |
isConcreteParameterizedType(java.lang.reflect.ParameterizedType pt) |
private static boolean |
isConcreteType(java.lang.reflect.Type t) |
(package private) static void |
validateParameter(Parameter parameter,
java.lang.Object source,
java.lang.String reportedSourceName,
java.lang.String reportedParameterName,
boolean injectionsForbidden)
Validate a single parameter instance.
|
private void |
visitJaxrsResourceMethod(ResourceMethod method) |
void |
visitResourceMethod(ResourceMethod method)
Visit a single resource method model.
|
private void |
visitSubResourceLocator(ResourceMethod locator) |
visitChildResource, visitInvocable, visitMethodHandler, visitResource, visitResourceHandlerConstructor, visitResourceModel, visitRuntimeResource
private final org.glassfish.hk2.api.ServiceLocator locator
private static final java.util.Set<java.lang.Class> PARAM_ANNOTATION_SET
public ResourceMethodValidator(org.glassfish.hk2.api.ServiceLocator locator)
locator
- HK2 service locator.public void visitResourceMethod(ResourceMethod method)
ResourceModelVisitor
visitResourceMethod
in interface ResourceModelVisitor
visitResourceMethod
in class AbstractResourceModelVisitor
method
- resource method model.private void visitJaxrsResourceMethod(ResourceMethod method)
private void checkMethod(ResourceMethod method)
private void checkValueProviders(ResourceMethod method)
private void visitSubResourceLocator(ResourceMethod locator)
private void checkParameters(ResourceMethod method)
private static java.util.Set<java.lang.Class> createParamAnnotationSet()
static void validateParameter(Parameter parameter, java.lang.Object source, java.lang.String reportedSourceName, java.lang.String reportedParameterName, boolean injectionsForbidden)
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
.private static boolean isConcreteType(java.lang.reflect.Type t)
private static boolean isConcreteParameterizedType(java.lang.reflect.ParameterizedType pt)