KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > js > IndentationTarget


1 /*
2  * Copyright 2003, 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  */

17 package org.apache.ws.jaxme.js;
18
19 import java.io.IOException JavaDoc;
20
21 /** <p>Interface that an IndentationEngine's target must
22  * fulfill.</p>
23  */

24 public interface IndentationTarget {
25   /** <p>Returns whether the IndentationEngine is creating a Java
26    * interface. Creating an interface means, for example, that
27    * method bodies are being suppressed.</p>
28    */

29   public boolean isInterface();
30   /** <p>Indents the current line by adding blanks for the given
31    * indentation level. This method must be called before any
32    * of the <code>write(String)</code> or <code>write()</code>
33    * methods or following the line terminating <code>write()</code>
34    * method.</p>
35    */

36   public void indent(int i) throws IOException JavaDoc;
37   /** <p>Converts a class name into a string. The string may then be
38    * written to the target using <code>write()</code>.</p>
39    */

40   public String JavaDoc asString(JavaQName pQName);
41   /** <p>Writes a string to the target.</p>
42    */

43   public void write(String JavaDoc pValue) throws IOException JavaDoc;
44   /** <p>Terminates a line in the target.</p>
45    */

46   public void write() throws IOException JavaDoc;
47 }
48
Popular Tags