KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > tools > xdoclet > BlockInfoSubTask


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.tools.xdoclet;
9
10 import java.net.URL JavaDoc;
11 import xdoclet.TemplateSubTask;
12 import xdoclet.XDocletException;
13
14 /**
15  * Generates BlockInfo 'xinfo' for Blocks
16  *
17  * @author <a HREF="mailto:vinay_chandran@users.sourceforge.net">Vinay Chandrasekharan</a>
18  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
19  * @version $Revision: 1.11 $ $Date: 2002/08/25 05:56:40 $
20  */

21 public class BlockInfoSubTask
22     extends TemplateSubTask
23 {
24     private static final String JavaDoc DEFAULT_TEMPLATE_FILE =
25         "/org/apache/avalon/phoenix/tools/xdoclet/blockinfo.xdt";
26
27     public BlockInfoSubTask()
28     {
29         setupParams();
30     }
31
32     private void setupParams()
33     {
34         setSubTaskName( "blockinfo" );
35         final URL JavaDoc resource = getClass().getResource( DEFAULT_TEMPLATE_FILE );
36         setTemplateURL( resource );
37         setDestinationFile( "{0}.xinfo" );
38         setAcceptAbstractClasses( false );
39         setHavingClassTag( "phoenix:block" );
40     }
41
42     protected void engineStarted() throws XDocletException
43     {
44         System.out.println( "Generating BlockInfo file: " + getGeneratedFileName( getCurrentClass() ) );
45     }
46 }
47
Popular Tags