1
2
3
4
5
6
7
8 package org.codehaus.metaclass.tools.tasks;
9
10 import org.apache.tools.ant.ProjectComponent;
11 import org.apache.tools.ant.types.Path;
12
13 /***
14 * An element used by ant to configure an interceptor.
15 *
16 * @author Peter Donald
17 * @version $Revision: 1.2 $ $Date: 2003/11/27 08:14:26 $
18 */
19 public class PluginElement
20 extends ProjectComponent
21 {
22 /*** The fileset to use */
23 private Path m_path;
24
25 /*** The classname of the interceptor. */
26 private String m_name;
27
28 /***
29 * Add the classpath that interceptor loaded from.
30 *
31 * @return the classpath that interceptor loaded from.
32 */
33 public Path createClasspath()
34 {
35 if( null == m_path )
36 {
37 m_path = new Path( getProject() );
38 }
39 return m_path;
40 }
41
42 /***
43 * Set the classname of the interceptor.
44 *
45 * @param name the classname of the interceptor.
46 */
47 public void setName( final String name )
48 {
49 m_name = name;
50 }
51
52 /***
53 * Return the path defining fileset to load interceptor from.
54 *
55 * @return the path defining fileset to load interceptor from.
56 */
57 public Path getPath()
58 {
59 return m_path;
60 }
61
62 /***
63 * Return the classname of the interceptor.
64 *
65 * @return the classname of the interceptor.
66 */
67 public String getName()
68 {
69 return m_name;
70 }
71 }