KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > retest > util > ClassComparator


1 package xdoclet.retest.util;
2
3 import xdoclet.XDocletException;
4 import xdoclet.retest.XDocletRetestMessages;
5
6
7 /**
8  * @author Vincent Harcq (vincent.harcq@hubmethods.com)
9  * @created Mars 5, 2002
10  * @version $Revision: 1.4 $
11  */

12 public class ClassComparator
13     extends AbstractClassAndInterfaceComparator
14 {
15     public ClassComparator(Class JavaDoc one,Class JavaDoc two)
16     {
17         super(one,two);
18     }
19
20     public ComparisonResultSet compare()
21     throws XDocletException
22     {
23         if ( one.isInterface() )
24         {
25             resultSet.addError(XDocletRetestMessages.IS_NOT_A_CLASS,new String JavaDoc[] {one.getName()} );
26             return resultSet;
27         }
28         if ( two.isInterface() )
29         {
30             resultSet.addError(XDocletRetestMessages.IS_NOT_A_CLASS,new String JavaDoc[] {two.getName()} );
31             return resultSet;
32         }
33         compareClassSignature();
34         compareClassMethodsSignature();
35         //TODO compareClassFieldsSignature();
36
//TODO compareClassContent();
37

38         return resultSet;
39    }
40
41
42 }
43
Popular Tags