KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > xdoclet > ComponentSubTask


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.xdoclet;
17
18 import xdoclet.TemplateSubTask;
19 import xdoclet.XDocletException;
20
21 /**
22  * @ant.element
23  * name="component"
24  * parent="xdoclet.DocletTask"
25  *
26  * @author <a HREF="mailto:Jiri.Zaloudek@ivancice.cz">Jiri Zaloudek</a> (latest modification by $Author: matzew $)
27  * @version $Revision: 1.1 $ $Date: 2004/12/30 09:37:27 $
28  * $Log: ComponentSubTask.java,v $
29  * Revision 1.1 2004/12/30 09:37:27 matzew
30  * added a new RenderKit for WML. Thanks to Jirí Žaloudek
31  *
32  */

33 public class ComponentSubTask extends TemplateSubTask {
34     
35     /** Creates a new instance of ComponentSubTask */
36     public ComponentSubTask() {
37         setDestinationFile("{0}.java");
38         setTemplateURL(getClass().getResource("/org/apache/myfaces/xdoclet/resources/component.xdt"));
39     }
40     
41     public void validateOptions() throws XDocletException {
42         super.validateOptions();
43         if (getDestinationFile() == null) {
44             throw new XDocletException("Ant Doclet Subtaksk ComponentSubTaks: You have to set attribute 'destinationFile'.");
45         }
46     }
47     
48 }
49
Popular Tags