/* Class used to test ComponentRelation
Copyright (c) 2006 The Regents of the University of California.
All rights reserved.
Permission is hereby granted, without written agreement and without
license or royalty fees, to use, copy, modify, and distribute this
software and its documentation for any purpose, provided that the above
copyright notice and the following two paragraphs appear in all copies
of this software.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
ENHANCEMENTS, OR MODIFICATIONS.
PT_COPYRIGHT_VERSION_2
COPYRIGHTENDKEY
*/
package ptolemy.kernel.test;
import ptolemy.kernel.ComponentRelation;
import ptolemy.kernel.CompositeEntity;
import ptolemy.kernel.util.IllegalActionException;
import ptolemy.kernel.util.NameDuplicationException;
import ptolemy.kernel.util.NamedObj;
//////////////////////////////////////////////////////////////////////////
//// TestComponentRelation
/**
This class is used to test protected method(s) in ComponentRelation
@author Christopher Hylands
@version $Id$
@since Ptolemy II 5.2
@Pt.ProposedRating Yellow (cxh)
@Pt.AcceptedRating Red (cxh)
*/
public class TestComponentRelation extends ComponentRelation {
/** Construct a TestComponentRelation
* @param container The container entity.
* @param name The name of the port.
* @exception IllegalActionException If the port is not of an acceptable
* class for the container.
* @exception NameDuplicationException If the name coincides with
* a port already in the container.
*/
public TestComponentRelation(CompositeEntity container, String name)
throws IllegalActionException, NameDuplicationException {
super(container, name);
}
/* Test _getContainedObject().
* @param relativeName The name relative to the container.
* @param container The container expected to contain the object, which
* must be an instance of CompositeEntity.
* @return An object of the same class as this object, or null if
* there is none.
* @exception IllegalActionException If the object exists
* and has the wrong class, or if the specified container is not
* an instance of CompositeEntity.
*/
public NamedObj testGetContainedObject(NamedObj container,
String relativeName) throws IllegalActionException {
return _getContainedObject(container, relativeName);
}
/** Test _propagateExistence()
* @param container The container.
* @return What ever _propagateExistance(container) returns.
* @exception IllegalActionException If the object
* cannot be cloned.
*/
public NamedObj testPropagateExistence(NamedObj container)
throws IllegalActionException {
return _propagateExistence(container);
}
}