FileDocCategorySizeDatePackage
UndefinedDelegate.javaAPI DocApache Axis 1.42790Sat Apr 22 18:57:28 BST 2006org.apache.axis.wsdl.symbolTable

UndefinedDelegate

public class UndefinedDelegate extends Object implements Undefined
This UndefinedDelegate class implements the common functions of UndefinedType and UndefinedElement.

Fields Summary
private Vector
list
Field list
private TypeEntry
undefinedType
Field undefinedType
Constructors Summary
UndefinedDelegate(TypeEntry te)
Constructor

param
te

        list = new Vector();
        undefinedType = te;
    
Methods Summary
public voidregister(TypeEntry referrant)
Register referrant TypeEntry so that the code can update the TypeEntry when the Undefined Element or Type is defined

param
referrant

        list.add(referrant);
    
public voidupdate(TypeEntry def)
Call update with the actual TypeEntry. This updates all of the referrant TypeEntry's that were registered.

param
def
throws
IOException


        boolean done = false;

        while (!done) {
            done = true;             // Assume this is the last pass

            // Call updatedUndefined for all items on the list
            // updateUndefined returns true if the state of the te TypeEntry
            // is changed.  The outer loop is traversed until there are no more
            // state changes.
            for (int i = 0; i < list.size(); i++) {
                TypeEntry te = (TypeEntry) list.elementAt(i);

                if (te.updateUndefined(undefinedType, def)) {
                    done = false;    // Items still undefined, need another pass
                }
            }
        }

        // It is possible that the def TypeEntry depends on an Undefined type.
        // If so, register all of the entries with the undefined type.
        TypeEntry uType = def.getUndefinedTypeRef();

        if (uType != null) {
            for (int i = 0; i < list.size(); i++) {
                TypeEntry te = (TypeEntry) list.elementAt(i);

                ((Undefined) uType).register(te);
            }
        }