View Javadoc

1   /*
2    * Copyright (C) The MetaClass Group. All rights reserved.
3    *
4    * This software is published under the terms of the Spice
5    * Software License version 1.1, a copy of which has been included
6    * with this distribution in the LICENSE.txt file.
7    */
8   package org.codehaus.metaclass.tools.tasks;
9   
10  import org.apache.tools.ant.Project;
11  import org.apache.tools.ant.Task;
12  
13  /***
14   * Task that simply registers all the other MetaClass tasks using a single
15   * classloader.
16   *
17   * @author Peter Donald
18   * @version $Revision: 1.1 $ $Date: 2003/11/27 07:47:10 $
19   */
20  public class RegisterMetaClassLibTask
21      extends Task
22  {
23      /***
24       * Register other MetaClass Tasks and types.
25       */
26      public void execute()
27      {
28          final Project project = getProject();
29          project.addDataTypeDefinition( "metaclass_interceptorSet",
30                                         InterceptorSet.class );
31          project.addDataTypeDefinition( "metaclass_filterSet", FilterSet.class );
32          project.addTaskDefinition( "metaclass_generate",
33                                     GenerateClassDescriptorsTask.class );
34          project.addTaskDefinition( "metaclass_addToInterceptorSet",
35                                     AddToInterceptorSetTask.class );
36          project.addTaskDefinition( "metaclass_addToFilterSet",
37                                     AddToFilterSetTask.class );
38      }
39  }