KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

35         return resultSet;
36     }
37
38
39 }
40
Popular Tags