KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > ant > modulesbuilder > Module


1 /*
2  * Copyright (c) 2001, 2002 The XDoclet team
3  * All rights reserved.
4  */

5 package xdoclet.ant.modulesbuilder;
6
7 import java.io.File JavaDoc;
8 import java.util.Enumeration JavaDoc;
9
10 import java.util.Vector JavaDoc;
11
12 /**
13  * Holds information related to a module.
14  *
15  * @author Ara Abrahamian (ara_e_w@yahoo.com)
16  * @created Jun 9, 2002
17  * @version $Revision: 1.1 $
18  */

19 final class Module
20 {
21     private Vector JavaDoc dependencies = new Vector JavaDoc();
22     private String JavaDoc name;
23     private boolean executed;
24     private File JavaDoc baseDir;
25
26     /**
27      * Returns an enumeration of the dependencies of this target.
28      *
29      * @return an enumeration of the dependencies of this target
30      */

31     public Enumeration JavaDoc getDependencies()
32     {
33         return dependencies.elements();
34     }
35
36     /**
37      * Returns the name of this module.
38      *
39      * @return the name of this module, or <code>null</code> if the name has not been set yet.
40      */

41     public String JavaDoc getName()
42     {
43         return name;
44     }
45
46     public boolean isExecuted()
47     {
48         return executed;
49     }
50
51     public File JavaDoc getBaseDir()
52     {
53         return baseDir;
54     }
55
56     /**
57      * Sets the name of this module.
58      *
59      * @param name The name of this module. Should not be <code>null</code>.
60      */

61     public void setName(String JavaDoc name)
62     {
63         this.name = name;
64     }
65
66     public void setExecuted(boolean executed)
67     {
68         this.executed = executed;
69     }
70
71     public void setBaseDir(File JavaDoc baseDir)
72     {
73         this.baseDir = baseDir;
74     }
75
76     /**
77      * Adds a dependency to this target.
78      *
79      * @param dependency The name of a target this target is dependent on. Must not be <code>null</code>.
80      */

81     public void addDependency(String JavaDoc dependency)
82     {
83         dependencies.addElement(dependency);
84     }
85 }
86
Popular Tags