KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > ant > taskdefs > rmic > RmicAdapter


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

18
19 package org.apache.tools.ant.taskdefs.rmic;
20
21 import org.apache.tools.ant.BuildException;
22 import org.apache.tools.ant.taskdefs.Rmic;
23 import org.apache.tools.ant.types.Path;
24 import org.apache.tools.ant.util.FileNameMapper;
25
26 /**
27  * The interface that all rmic adapters must adhere to.
28  *
29  * <p>A rmic adapter is an adapter that interprets the rmic's
30  * parameters in preperation to be passed off to the compiler this
31  * adapter represents. As all the necessary values are stored in the
32  * Rmic task itself, the only thing all adapters need is the rmic
33  * task, the execute command and a parameterless constructor (for
34  * reflection).</p>
35  *
36  * @since Ant 1.4
37  */

38
39 public interface RmicAdapter {
40
41     /**
42      * Sets the rmic attributes, which are stored in the Rmic task.
43      * @param attributes the rmic attributes to use
44      */

45     void setRmic(Rmic attributes);
46
47     /**
48      * Call the rmic compiler.
49      *
50      * @return true if has the compilation been successful
51      * @throws BuildException on error
52      */

53     boolean execute() throws BuildException;
54
55     /**
56      * Maps source class files to the files generated by this rmic
57      * implementation.
58      * @return the filename mapper used by this implementation
59      */

60     FileNameMapper getMapper();
61
62     /**
63      * The CLASSPATH this rmic process will use.
64      * @return the classpaht this rmic process will use
65      */

66     Path getClasspath();
67 }
68
Popular Tags