Clover coverage report - XJavaDoc - 1.1 Coverage timestamp: Sun Oct 3 2004 19:56:54 BST FRAMES NO FRAMES |
file stats: | LOC: | 39 |  | Methods: | 3
| NCLOC: | 21 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
TagValidator.java | 0% | 0% | 0% | 0% |

1 |  |
     /*
2 |  |
      * Copyright (c) 2001-2003 The XDoclet team
3 |  |
      * All rights reserved.
4 |  |
      */
5 |  |
     package xjavadoc;
6 |  |
7 |  |
     import org.apache.commons.collections.Predicate;
8 |  |
9 |  |
     /**
10 |  |
      * A class that can validate tags. It reuses logic from predicates.
11 |  |
      *
12 |  |
      * @author    Aslak Hellesøy
13 |  |
      * @created   24. februar 2003
14 |  |
      * @version   $Revision: 1.3 $
15 |  |
      */
16 |  |
     public class TagValidator
17 |  |
     {
18 |  |
         private Predicate  _predicate;
19 |  |
20 | 0 |
         public TagValidator( Predicate predicate )
21 |  |
         {
22 | 0 |
             setPredicate( predicate );
23 |  |
         }
24 |  |
25 | 0 |
         public void setPredicate( Predicate predicate )
26 |  |
         {
27 | 0 |
             _predicate = predicate;
28 |  |
29 |  |
         }
30 |  |
31 | 0 |
         public void validate( XTag tag ) throws TagValidationException
32 |  |
         {
33 | 0 |
             if( !_predicate.evaluate( tag ) )
34 |  |
             {
35 | 0 |
                 throw new TagValidationException( "Validation error", tag );
36 |  |
             }
37 |  |
         }
38 |  |
     }
39 |  |