KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > cpmake > CleanRule


1 /*
2  * Copyright (c) 2004, Brian Hawkins
3  * brianhks@activeclickweb.com
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the Free
7  * Software Foundation; either version 2 of the License, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13  * for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the
17  * Free Software Foundation, Inc.,
18  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */

20  
21 package cpmake;
22
23 class CleanRule implements Rule
24     {
25     CPMake m_make;
26     
27     public CleanRule(CPMake make)
28         {
29         m_make = make;
30         }
31         
32     public boolean matchTarget(String JavaDoc target)
33         {
34         return (target.equals("clean"));
35         }
36         
37     public String JavaDoc[] getPrerequisites(String JavaDoc target)
38         {
39         return (new String JavaDoc[0]);
40         }
41         
42     public String JavaDoc getScriptCall()
43         {
44         return (null);
45         }
46         
47     public boolean verify()
48         {
49         return (false);
50         }
51         
52     public boolean hasAction()
53         {
54         return (true);
55         }
56         
57     public void callAction(String JavaDoc target)
58             throws CPMakeException
59         {
60         m_make.autoClean();
61         }
62     }
63
Popular Tags