AMRef.java revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
/*
* Copyright (C) 1996 Active Software, Inc.
* All rights reserved.
*
* @(#) AMRef.java 1.14 - last change made 07/18/96
*/
/**
* A reference to an attribute manager object. The reference can
* merely be the expected name of the object, if necessary. That way
* there will be no error until the reference is actually needed.
* This reference can be made to serve in forward-referencing
* situations (like file loads) when the object referred to hasn't
* been loaded yet.
*
* @see AttributeManager
* @version 1.14, 07/18/96
*/
public class AMRef {
private AttributeManager mgr;
// AMRef Table: a record of unresolved AMRefs created
/**
* Starts recording the AMRefs that are created using a name only.
* Later a call to the stopRecording method can be used in order to
* force the resolution of all the AMRefs created since this call
* was made. The Designer uses this in order to insure that all
* AMRefs created during the loading of a file are force to resolve
* and bind to the real AttributeManager objects to which they
* refer.
*
* @see #stopRecording
*/
public static void startRecording() {
}
/**
* Stops recording the AMRefs that are created and resolves them.
* Resolution occurrs within the scope of the tree given. If scope
* is null then stops recording, clears the list, and doesn't
* resolve anything.
*
* @param scope the attribute manager tree in which to resolve names
* @see #startRecording
*/
/* BEGIN JSTYLED */
/* END JSTYLED */
}
}
}
}
/**
* Creates a shadow reference from the name only.
*
* @see #getRef
* @param name name of object to which this reference refers
*/
refRecord.addElement(this);
}
/**
* Creates an already-resolved reference.
*
* @param mgr the object referred to
*/
}
/**
* Returns the object referred to. Resolves it from
* the name if necessary.
*
* @param scope the attribute manager tree in which
* to resolve the name
*/
}
return (mgr);
}
/**
* Returns the name of the object referred to.
*/
return (name);
}
}