1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.springmodules.validation.bean.context;
19
20
21
22
23 public class ExtendingValidationContext extends DefaultValidationContext {
24
25 private ValidationContext extendedContext;
26
27 public ExtendingValidationContext(String token, ValidationContext extendedContext) {
28 this(new String[] { token }, extendedContext);
29 }
30
31 public ExtendingValidationContext(String[] tokens, ValidationContext extendedContext) {
32 super(tokens);
33 this.extendedContext = extendedContext;
34 }
35
36 public boolean supportsTokens(String[] tokens) {
37 return extendedContext.supportsTokens(tokens) || super.supportsTokens(tokens);
38 }
39
40 }