Class Template

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Template
    extends AbstractTemplate
    The timed automaton template class
    See Also:
    Serialized Form
    • Constructor Detail

      • Template

        public Template​(Element prototype)
        Constructor
        Parameters:
        prototype - - The prototype
    • Method Detail

      • createLocation

        public Location createLocation()
        Create a new location with this template as the parent and optionally a prototype according to the '#location' property of the template. The new location is not inserted into the tree!
        Returns:
        The new location
      • createBranchPoint

        public BranchPoint createBranchPoint()
        Create a new branch point with this template as the parent and optionally a prototype according to the '#branchpoint' property of the template. The new branch point is not inserted into the tree!
        Returns:
        The new branch point
      • createEdge

        public Edge createEdge()
        Create a new edge with this template as the parent and optionally a prototype according to the '#edge' property of the template. The new edge is not inserted into the tree!
        Returns:
        a newly constructed edge.
      • getPrototypeFromParent

        public Element getPrototypeFromParent​(Element parent)
        Description copied from class: Element
        Return the proper prototype for this element stored in the parent. This is used by importInto().
        Specified by:
        getPrototypeFromParent in class AbstractTemplate
        Parameters:
        parent - - The parent element
        Returns:
        the #template property value of the parent argument.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a deep clone of the template. The source and target of any edges in the template are set to the corresponding clones of the locations of the template.
        Overrides:
        clone in class AbstractTemplate
        Returns:
        The cloned object
        Throws:
        java.lang.CloneNotSupportedException - the object could not be cloned.