Class HTMLBuilderImpl

  • All Implemented Interfaces:
    HTMLBuilder

    public class HTMLBuilderImpl
    extends java.lang.Object
    implements HTMLBuilder
    • Constructor Detail

      • HTMLBuilderImpl

        public HTMLBuilderImpl()
    • Method Detail

      • startTag

        public void startTag​(java.lang.String tag)
        Description copied from interface: HTMLBuilder
        Pushes a new open tag onto the context
        Specified by:
        startTag in interface HTMLBuilder
        Parameters:
        tag - xhtml tag to push.
      • addAttribute

        public void addAttribute​(java.lang.String name,
                                 java.lang.String value)
        Specified by:
        addAttribute in interface HTMLBuilder
      • addText

        public void addText​(java.lang.String text)
        Specified by:
        addText in interface HTMLBuilder
      • escape

        protected java.lang.String escape​(java.lang.String s)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • withParentTag

        public HTMLBuilder withParentTag()
        Specified by:
        withParentTag in interface HTMLBuilder
        Returns:
        an HTML builder for the parent tag, allowing you to modify already created HTML elements.
      • withRootTag

        public HTMLBuilder withRootTag()
        Specified by:
        withRootTag in interface HTMLBuilder
        Returns:
        the HTML builder for the root (i.e. <html>) tag at the start of the document.