Class SimplePathElement

java.lang.Object
helma.framework.demo.SimplePathElement
All Implemented Interfaces:
IPathElement

public class SimplePathElement extends Object implements IPathElement
This is an example implementation for the helma.framework.IPathElement interface. It creates any child element which is requested on the fly without ever asking.
  • Constructor Details

    • SimplePathElement

      public SimplePathElement()
      Constructor for the root element.
    • SimplePathElement

      public SimplePathElement(String n, IPathElement p)
      Constructor for non-root elements.
  • Method Details

    • getChildElement

      public IPathElement getChildElement(String n)
      Returns a child element for this object, creating it on the fly.
      Specified by:
      getChildElement in interface IPathElement
    • getParentElement

      public IPathElement getParentElement()
      Returns this object's parent element
      Specified by:
      getParentElement in interface IPathElement
    • getElementName

      public String getElementName()
      Returns the element name to be used for this object.
      Specified by:
      getElementName in interface IPathElement
    • getPrototype

      public String getPrototype()
      Returns the name of the scripting prototype to be used for this object. This will be "root" for the root element and "hopobject for everything else.
      Specified by:
      getPrototype in interface IPathElement
    • toString

      public String toString()
      Returns a string representation of this element.
      Overrides:
      toString in class Object