Interface Instantiable

    • Method Detail

      • getChildren

        java.util.List getChildren()
        Return a list of weak references to instances of Instantiable that are children of this object. An implementor of this method may return null or an empty list to indicate that there are no children.
        Returns:
        An unmodifiable list of instances of java.lang.ref.WeakReference that refer to instances of Instantiable or null if this object has no children.
      • getParent

        Instantiable getParent()
        Return the parent of this object, or null if there is none.
        Returns:
        The parent of this object, or null if there is none.
      • instantiate

        Instantiable instantiate​(NamedObj container,
                                 java.lang.String name)
                          throws java.lang.CloneNotSupportedException,
                                 IllegalActionException,
                                 NameDuplicationException
        Create an instance by (deeply) cloning this object and then adjusting the parent-child relationships between the clone and its parent. Specifically, the clone defers its definition to this object, which becomes its "parent." The "child" inherits all the objects contained by this object. If this object is a composite, then this method must adjust any parent-child relationships that are entirely contained within the child. That is, for any parent-child relationship that is entirely contained within this object (i.e., both the parent and the child are deeply contained by this object), a corresponding parent-child relationship is created within the clone such that both the parent and the child are entirely contained within the clone.

        The new object is not a class definition by default (it is an "instance" rather than a "class"). That is, isClassDefinition() returns false.

        Parameters:
        container - The container for the instance, or null to instantiate it at the top level.
        name - The name for the instance.
        Returns:
        A new instance that is a clone of this object with adjusted deferral relationships.
        Throws:
        java.lang.CloneNotSupportedException - If this object cannot be cloned.
        IllegalActionException - If this object is not a class definition or the proposed container is not acceptable.
        NameDuplicationException - If the name collides with an object already in the container.
      • isClassDefinition

        boolean isClassDefinition()
        Return true if this object is a class definition, which means that it can be instantiated.
        Returns:
        True if this object is a class definition.