Package org.jclouds.rest
Class InputParamValidator
java.lang.Object
org.jclouds.rest.InputParamValidator
Validates method parameters.
Checks the
ParamValidators annotation for validators. There can be method-level validators that apply to all
parameters, and parameter-level validators. When validation on at least one parameter doesn't pass, throws
IllegalStateException.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateMethodParametersOrThrow(Invocation invocation, List<com.google.common.reflect.Parameter> parameters) Validates that method parameters are correct, according toParamValidators.
-
Constructor Details
-
InputParamValidator
@Inject public InputParamValidator(com.google.inject.Injector injector) -
InputParamValidator
public InputParamValidator()
-
-
Method Details
-
validateMethodParametersOrThrow
public void validateMethodParametersOrThrow(Invocation invocation, List<com.google.common.reflect.Parameter> parameters) Validates that method parameters are correct, according toParamValidators.- Parameters:
method- method with optionally setParamValidatorsargs- method arguments with optionally setParamValidators- Throws:
IllegalStateException- if validation failed- See Also:
-