KickJava   Java API By Example, From Geeks To Geeks.

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


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.Serializable JavaDoc;
20
21
22 /** <p>A qualified class name, including package name. Instances
23  * of JavaQName are obtained by invoking private methods of the
24  * class JavaQNameImpl.</p>
25  */

26 public interface JavaQName extends Comparable JavaDoc, Serializable JavaDoc {
27     /** <p>Returns the JavaQName's package name. The empty string
28      * represents the default package.</p>
29      */

30     public String JavaDoc getPackageName();
31     
32     /** <p>Returns the JavaQName's class name. This is the composition of
33      * {@link #getOuterClassName()} and {@link #getInnerClassName}.</p>
34      */

35     public String JavaDoc getClassName();
36     
37     /** <p>If the class is an inner class: Returns the name of the enclosing
38      * class. Otherwise returns null.</p>
39      */

40     public String JavaDoc getOuterClassName();
41     
42     /** <p>If the class is an inner class: Returns the name of the inner
43      * class. Otherwise returns {@link #getClassName()}.</p>
44      */

45     public String JavaDoc getInnerClassName();
46     
47     /** <p>Returns whether the class described by the JavaQName is
48      * actually an array class. If so, you may use the
49      * <code>getInstanceClass()</code> method to determine the
50      * JavaQName of the array elements.</p>
51      */

52     public boolean isArray();
53     
54     /** <p>If the method <code>isArray()</code> returns true,
55      * you may use this method to obtain the instance class.</p>
56      *
57      * @throws IllegalStateException This JavaQName is no array,
58      * and <code>isArray()</code> returns false.
59      */

60     public JavaQName getInstanceClass();
61     
62     /** <p>Returns whether this is a primitive class. Primitive classes
63      * are {@link JavaQNameImpl#VOID}, {@link JavaQNameImpl#BOOLEAN},
64      * {@link JavaQNameImpl#BYTE}, {@link JavaQNameImpl#SHORT},
65      * {@link JavaQNameImpl#INT}, {@link JavaQNameImpl#LONG},
66      * {@link JavaQNameImpl#FLOAT}, {@link JavaQNameImpl#DOUBLE}, and
67      * {@link JavaQNameImpl#CHAR}.</p>
68      */

69     public boolean isPrimitive();
70     
71     /** <p>Returns whether this class may be imported. For instance,
72      * this is not the case for primitive classes.</p>
73      */

74     public boolean isImportable();
75     
76     /** <p>Returns whether this class is an inner class.</p>
77      */

78     public boolean isInnerClass();
79     
80     /** If the class is primitive: Returns the corresponding
81      * object type.
82      */

83     public JavaQName getObjectType();
84
85     /** If the class is primitive: Returns the name of the
86      * corresponding object classes method for converting
87      * the object into a primitive value.
88      */

89     public String JavaDoc getPrimitiveConversionMethod();
90 }
91
Popular Tags