KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsdl > symbolTable > UndefinedType


1 /*
2  * Copyright 2001-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.axis.wsdl.symbolTable;
17
18 import javax.xml.namespace.QName JavaDoc;
19 import java.io.IOException JavaDoc;
20
21 /**
22  * This represents a QName found in a reference but is not defined.
23  * If the type is later defined, the UndefinedType is replaced with a new Type
24  */

25 public class UndefinedType extends Type implements Undefined {
26
27     /** Field delegate */
28     private UndefinedDelegate delegate = null;
29
30     /**
31      * Construct a referenced (but as of yet undefined) type
32      *
33      * @param pqName
34      */

35     public UndefinedType(QName JavaDoc pqName) {
36
37         super(pqName, null);
38
39         undefined = true;
40         delegate = new UndefinedDelegate(this);
41     }
42
43     /**
44      * Register referrant TypeEntry so that
45      * the code can update the TypeEntry when the Undefined Element or Type is defined
46      *
47      * @param referrant
48      */

49     public void register(TypeEntry referrant) {
50         delegate.register(referrant);
51     }
52
53     /**
54      * Call update with the actual TypeEntry. This updates all of the
55      * referrant TypeEntry's that were registered.
56      *
57      * @param def
58      * @throws IOException
59      */

60     public void update(TypeEntry def) throws IOException JavaDoc {
61         delegate.update(def);
62     }
63 }
64
Popular Tags