Interface LazyComposite

  • All Superinterfaces:
    All Known Implementing Classes:
    AccessorLibrary, EntityLibrary, LazyTypedCompositeActor, ModularCodeGenLazyTypedCompositeActor, ModularCodeGenTypedCompositeActor, ModularCompiledSDFTypedCompositeActor

    public interface LazyComposite
    extends Configurable
    A marker interface for lazy composites. A lazy composite is a CompositeEntity that does not automatically populate itself with contained entities and relations when it is instantiated. It does populate itself with attributes and ports, but the contained entities and relations are not created until they are explicitly requested.

    Note that a class that implements this interface cannot have parameters whose values are expressions that refer to contained entities or relations or attributes contained by those. This is a rather esoteric use of expressions, so this limitation may not be onerous.

    Ptolemy II 8.0
    Edward A. Lee, Christopher Hylands
    See Also:
    NamedObj, RecorderListener
    Green (cxh)
    Green (eal)
    • Method Detail

      • populate

        void populate()
               throws InvalidStateException
        Populate the actor by reading the file specified by the source parameter. Note that the exception thrown here is a runtime exception, inappropriately. This is because execution of this method is deferred to the last possible moment, and it is often evaluated in a context where a compile-time exception cannot be thrown. Thus, extra care should be exercised to provide valid MoML specifications.
        InvalidStateException - If the source cannot be read, or if an exception is thrown parsing its MoML data.