org.apache.struts2.interceptor.validation

## Class AnnotationValidationInterceptor

- java.lang.Object
- - org.apache.struts2.interceptor.AbstractInterceptor
  - - com.opensymphony.xwork2.interceptor.AbstractInterceptor
    - - com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
      - - com.opensymphony.xwork2.validator.ValidationInterceptor
        - - org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor

- All Implemented Interfaces:
    Serializable, ConditionalInterceptor, Interceptor

      public class AnnotationValidationInterceptor
      extends ValidationInterceptor

  Extends the xwork validation interceptor to also check for a @SkipValidation annotation, and if found, don't validate this action method
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.opensymphony.xwork2.interceptor.ConditionalInterceptor

      `ConditionalInterceptor.LegacyAdapter`

  - ### Field Summary

    - ### Fields inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor

      `excludeMethods, includeMethods`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnnotationValidationInterceptor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `doIntercept(ActionInvocation invocation)` Subclasses must override to implement the interceptor logic.
    `protected Method` | `getActionMethod(Class<?> actionClass, String methodName)`

    - ### Methods inherited from class com.opensymphony.xwork2.validator.ValidationInterceptor

      `doBeforeInvocation, getValidationContext, isValidateAnnotatedMethodOnly, setActionValidatorManager, setAlwaysInvokeValidate, setDeclarative, setProgrammatic, setValidateAnnotatedMethodOnly`

    - ### Methods inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor

      `applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods`

    - ### Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor

      `intercept, shouldIntercept, shouldIntercept`

    - ### Methods inherited from class org.apache.struts2.interceptor.AbstractInterceptor

      `destroy, init, setDisabled`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.opensymphony.xwork2.interceptor.ConditionalInterceptor

      `adapt`

    - ### Methods inherited from interface com.opensymphony.xwork2.interceptor.Interceptor

      `adapt`

    - ### Methods inherited from interface org.apache.struts2.interceptor.Interceptor

      `destroy, init`

- - ### Constructor Detail

    - #### AnnotationValidationInterceptor

          public AnnotationValidationInterceptor()

  - ### Method Detail

    - #### doIntercept

          protected String doIntercept(ActionInvocation invocation)
                                throws Exception

      Description copied from class: `MethodFilterInterceptor`
      Subclasses must override to implement the interceptor logic.
      Overrides:
        `doIntercept` in class `ValidationInterceptor`
      Parameters:
        `invocation` - the action invocation
      Returns:
        the result of invocation
      Throws:
        `Exception` - in case of any errors

    - #### getActionMethod

          protected Method getActionMethod(Class<?> actionClass,
                                           String methodName)

Copyright © 2000–2025 Apache Software Foundation. All rights reserved.