diff --git a/src/main/java/j2html/TagCreator.java b/src/main/java/j2html/TagCreator.java index 10bd91b7..fa192e43 100644 --- a/src/main/java/j2html/TagCreator.java +++ b/src/main/java/j2html/TagCreator.java @@ -8,9 +8,7 @@ import j2html.tags.InlineStaticResource; import j2html.tags.Text; import j2html.tags.UnescapedText; -import j2html.tags.specialized.BodyTag; -import j2html.tags.specialized.HeadTag; -import j2html.tags.specialized.HtmlTag; +import j2html.tags.specialized.*; import java.util.Collection; import java.util.List; @@ -209,368 +207,43 @@ public static ContainerTag scriptWithInlineFile_min(String path) { public static DomContent document() { return rawHtml(""); } + // -- start of manually managed tags -- - // EmptyTags, generated in class j2html.tags.TagCreatorCodeGenerator - public static EmptyTag area() { - return new EmptyTag("area"); - } - - public static EmptyTag area(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("area"), shortAttr); - } - - public static EmptyTag base() { - return new EmptyTag("base"); - } - - public static EmptyTag base(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("base"), shortAttr); - } - - public static EmptyTag br() { - return new EmptyTag("br"); - } - - public static EmptyTag br(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("br"), shortAttr); - } - - public static EmptyTag col() { - return new EmptyTag("col"); - } - - public static EmptyTag col(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("col"), shortAttr); - } - - public static EmptyTag embed() { - return new EmptyTag("embed"); - } - - public static EmptyTag embed(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("embed"), shortAttr); - } - - public static EmptyTag hr() { - return new EmptyTag("hr"); - } - - public static EmptyTag hr(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("hr"), shortAttr); - } - - public static EmptyTag img() { - return new EmptyTag("img"); - } - - public static EmptyTag img(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("img"), shortAttr); - } - - public static EmptyTag input() { - return new EmptyTag("input"); - } - - public static EmptyTag input(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("input"), shortAttr); - } - - public static EmptyTag keygen() { - return new EmptyTag("keygen"); - } - - public static EmptyTag keygen(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("keygen"), shortAttr); - } - - public static EmptyTag link() { - return new EmptyTag("link"); - } - - public static EmptyTag link(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("link"), shortAttr); - } - - public static EmptyTag meta() { - return new EmptyTag("meta"); - } - - public static EmptyTag meta(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("meta"), shortAttr); - } - - public static EmptyTag param() { - return new EmptyTag("param"); - } - - public static EmptyTag param(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("param"), shortAttr); - } - - public static EmptyTag source() { - return new EmptyTag("source"); - } - - public static EmptyTag source(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("source"), shortAttr); - } - - public static EmptyTag track() { - return new EmptyTag("track"); - } - - public static EmptyTag track(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("track"), shortAttr); - } - - public static EmptyTag wbr() { - return new EmptyTag("wbr"); - } - - public static EmptyTag wbr(Attr.ShortForm shortAttr) { - return Attr.addTo(new EmptyTag("wbr"), shortAttr); - } - - // ContainerTags, generated in class j2html.tags.TagCreatorCodeGenerator - public static ContainerTag a() { - return new ContainerTag("a"); - } - - public static ContainerTag a(String text) { - return new ContainerTag("a").withText(text); - } - - public static ContainerTag a(DomContent... dc) { - return new ContainerTag("a").with(dc); - } - - public static ContainerTag a(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("a"), shortAttr); - } - - public static ContainerTag a(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("a").withText(text), shortAttr); - } - - public static ContainerTag a(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("a").with(dc), shortAttr); - } - - public static ContainerTag abbr() { - return new ContainerTag("abbr"); - } - - public static ContainerTag abbr(String text) { - return new ContainerTag("abbr").withText(text); - } - - public static ContainerTag abbr(DomContent... dc) { - return new ContainerTag("abbr").with(dc); - } - - public static ContainerTag abbr(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("abbr"), shortAttr); - } - - public static ContainerTag abbr(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("abbr").withText(text), shortAttr); - } - - public static ContainerTag abbr(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("abbr").with(dc), shortAttr); - } - - public static ContainerTag address() { - return new ContainerTag("address"); - } - - public static ContainerTag address(String text) { - return new ContainerTag("address").withText(text); - } - - public static ContainerTag address(DomContent... dc) { - return new ContainerTag("address").with(dc); - } - - public static ContainerTag address(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("address"), shortAttr); - } - - public static ContainerTag address(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("address").withText(text), shortAttr); - } - - public static ContainerTag address(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("address").with(dc), shortAttr); - } - - public static ContainerTag article() { - return new ContainerTag("article"); - } - - public static ContainerTag article(String text) { - return new ContainerTag("article").withText(text); - } - - public static ContainerTag article(DomContent... dc) { - return new ContainerTag("article").with(dc); - } - - public static ContainerTag article(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("article"), shortAttr); - } - - public static ContainerTag article(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("article").withText(text), shortAttr); - } - - public static ContainerTag article(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("article").with(dc), shortAttr); - } - - public static ContainerTag aside() { - return new ContainerTag("aside"); - } - - public static ContainerTag aside(String text) { - return new ContainerTag("aside").withText(text); - } - - public static ContainerTag aside(DomContent... dc) { - return new ContainerTag("aside").with(dc); - } - - public static ContainerTag aside(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("aside"), shortAttr); - } - - public static ContainerTag aside(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("aside").withText(text), shortAttr); - } - - public static ContainerTag aside(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("aside").with(dc), shortAttr); - } - - public static ContainerTag audio() { - return new ContainerTag("audio"); - } - - public static ContainerTag audio(String text) { - return new ContainerTag("audio").withText(text); - } - - public static ContainerTag audio(DomContent... dc) { - return new ContainerTag("audio").with(dc); - } - - public static ContainerTag audio(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("audio"), shortAttr); - } - - public static ContainerTag audio(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("audio").withText(text), shortAttr); - } - - public static ContainerTag audio(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("audio").with(dc), shortAttr); - } - - public static ContainerTag b() { - return new ContainerTag("b"); - } - - public static ContainerTag b(String text) { - return new ContainerTag("b").withText(text); - } - - public static ContainerTag b(DomContent... dc) { - return new ContainerTag("b").with(dc); - } - - public static ContainerTag b(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("b"), shortAttr); - } - - public static ContainerTag b(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("b").withText(text), shortAttr); - } - - public static ContainerTag b(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("b").with(dc), shortAttr); - } - - public static ContainerTag bdi() { - return new ContainerTag("bdi"); - } - - public static ContainerTag bdi(String text) { - return new ContainerTag("bdi").withText(text); - } - - public static ContainerTag bdi(DomContent... dc) { - return new ContainerTag("bdi").with(dc); - } - - public static ContainerTag bdi(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("bdi"), shortAttr); - } - - public static ContainerTag bdi(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("bdi").withText(text), shortAttr); - } - - public static ContainerTag bdi(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("bdi").with(dc), shortAttr); - } - - public static ContainerTag bdo() { - return new ContainerTag("bdo"); - } - - public static ContainerTag bdo(String text) { - return new ContainerTag("bdo").withText(text); - } - - public static ContainerTag bdo(DomContent... dc) { - return new ContainerTag("bdo").with(dc); - } + // EmptyTags - public static ContainerTag bdo(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("bdo"), shortAttr); + //ContainerTags + public static HtmlTag html() { + return new HtmlTag(); } - public static ContainerTag bdo(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("bdo").withText(text), shortAttr); + public static HtmlTag html(Attr.ShortForm shortAttr) { + return Attr.addTo(new HtmlTag(), shortAttr); } - public static ContainerTag bdo(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("bdo").with(dc), shortAttr); + public static HtmlTag html(HeadTag head){ + return new HtmlTag(head); } - public static ContainerTag blockquote() { - return new ContainerTag("blockquote"); + public static HtmlTag html(BodyTag body){ + return new HtmlTag(body); } - public static ContainerTag blockquote(String text) { - return new ContainerTag("blockquote").withText(text); + public static HtmlTag html(HeadTag head, BodyTag body){ + return new HtmlTag(head, body); } - public static ContainerTag blockquote(DomContent... dc) { - return new ContainerTag("blockquote").with(dc); + public static HtmlTag html(Attr.ShortForm shortAttr, HeadTag head){ + return Attr.addTo(new HtmlTag(head), shortAttr); } - public static ContainerTag blockquote(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("blockquote"), shortAttr); + public static HtmlTag html(Attr.ShortForm shortAttr, BodyTag body){ + return Attr.addTo(new HtmlTag(body), shortAttr); } - public static ContainerTag blockquote(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("blockquote").withText(text), shortAttr); + public static HtmlTag html(Attr.ShortForm shortAttr, HeadTag head, BodyTag body){ + return Attr.addTo(new HtmlTag(head, body), shortAttr); } - public static ContainerTag blockquote(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("blockquote").with(dc), shortAttr); - } public static BodyTag body() { return new BodyTag(); @@ -596,2004 +269,720 @@ public static BodyTag body(Attr.ShortForm shortAttr, DomContent... dc) { return (BodyTag)Attr.addTo(new BodyTag().with(dc), shortAttr); } - public static ContainerTag button() { - return new ContainerTag("button"); - } - - public static ContainerTag button(String text) { - return new ContainerTag("button").withText(text); - } - - public static ContainerTag button(DomContent... dc) { - return new ContainerTag("button").with(dc); - } - - public static ContainerTag button(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("button"), shortAttr); - } - - public static ContainerTag button(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("button").withText(text), shortAttr); - } - - public static ContainerTag button(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("button").with(dc), shortAttr); - } - - public static ContainerTag canvas() { - return new ContainerTag("canvas"); - } - - public static ContainerTag canvas(String text) { - return new ContainerTag("canvas").withText(text); - } - - public static ContainerTag canvas(DomContent... dc) { - return new ContainerTag("canvas").with(dc); - } - - public static ContainerTag canvas(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("canvas"), shortAttr); - } - - public static ContainerTag canvas(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("canvas").withText(text), shortAttr); - } - - public static ContainerTag canvas(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("canvas").with(dc), shortAttr); - } - - public static ContainerTag caption() { - return new ContainerTag("caption"); - } - - public static ContainerTag caption(String text) { - return new ContainerTag("caption").withText(text); - } - - public static ContainerTag caption(DomContent... dc) { - return new ContainerTag("caption").with(dc); - } - - public static ContainerTag caption(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("caption"), shortAttr); - } - - public static ContainerTag caption(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("caption").withText(text), shortAttr); - } - - public static ContainerTag caption(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("caption").with(dc), shortAttr); - } - - public static ContainerTag cite() { - return new ContainerTag("cite"); - } - - public static ContainerTag cite(String text) { - return new ContainerTag("cite").withText(text); - } - - public static ContainerTag cite(DomContent... dc) { - return new ContainerTag("cite").with(dc); - } - - public static ContainerTag cite(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("cite"), shortAttr); - } - - public static ContainerTag cite(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("cite").withText(text), shortAttr); - } - - public static ContainerTag cite(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("cite").with(dc), shortAttr); + public static HeadTag head() { + return new HeadTag(); } - public static ContainerTag code() { - return new ContainerTag("code"); + public static HeadTag head(String text) { + return (HeadTag)new HeadTag().withText(text); } - public static ContainerTag code(String text) { - return new ContainerTag("code").withText(text); + public static HeadTag head(DomContent... dc) { + return (HeadTag)new HeadTag().with(dc); } - public static ContainerTag code(DomContent... dc) { - return new ContainerTag("code").with(dc); + public static HeadTag head(Attr.ShortForm shortAttr) { + return (HeadTag)Attr.addTo(new HeadTag(), shortAttr); } - public static ContainerTag code(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("code"), shortAttr); + public static HeadTag head(Attr.ShortForm shortAttr, String text) { + return (HeadTag)Attr.addTo(new HeadTag().withText(text), shortAttr); } - public static ContainerTag code(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("code").withText(text), shortAttr); + public static HeadTag head(Attr.ShortForm shortAttr, DomContent... dc) { + return (HeadTag)Attr.addTo(new HeadTag().with(dc), shortAttr); } - public static ContainerTag code(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("code").with(dc), shortAttr); - } + // -- end of manually managed tags -- - public static ContainerTag colgroup() { - return new ContainerTag("colgroup"); - } - public static ContainerTag colgroup(String text) { - return new ContainerTag("colgroup").withText(text); - } - public static ContainerTag colgroup(DomContent... dc) { - return new ContainerTag("colgroup").with(dc); - } - public static ContainerTag colgroup(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("colgroup"), shortAttr); - } - public static ContainerTag colgroup(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("colgroup").withText(text), shortAttr); - } - public static ContainerTag colgroup(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("colgroup").with(dc), shortAttr); - } - public static ContainerTag datalist() { - return new ContainerTag("datalist"); - } + // EmptyTags, generated in class j2html.tags.generators.TagCreatorCodeGenerator + public static AreaTag area () { return new AreaTag(); } + public static AreaTag area (Attr.ShortForm shortAttr) { return (AreaTag) Attr.addTo( new AreaTag(), shortAttr); } - public static ContainerTag datalist(String text) { - return new ContainerTag("datalist").withText(text); - } + public static BaseTag base () { return new BaseTag(); } + public static BaseTag base (Attr.ShortForm shortAttr) { return (BaseTag) Attr.addTo( new BaseTag(), shortAttr); } - public static ContainerTag datalist(DomContent... dc) { - return new ContainerTag("datalist").with(dc); - } + public static BrTag br () { return new BrTag(); } + public static BrTag br (Attr.ShortForm shortAttr) { return (BrTag) Attr.addTo( new BrTag(), shortAttr); } - public static ContainerTag datalist(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("datalist"), shortAttr); - } + public static ColTag col () { return new ColTag(); } + public static ColTag col (Attr.ShortForm shortAttr) { return (ColTag) Attr.addTo( new ColTag(), shortAttr); } - public static ContainerTag datalist(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("datalist").withText(text), shortAttr); - } + public static EmbedTag embed () { return new EmbedTag(); } + public static EmbedTag embed (Attr.ShortForm shortAttr) { return (EmbedTag) Attr.addTo( new EmbedTag(), shortAttr); } - public static ContainerTag datalist(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("datalist").with(dc), shortAttr); - } + public static HrTag hr () { return new HrTag(); } + public static HrTag hr (Attr.ShortForm shortAttr) { return (HrTag) Attr.addTo( new HrTag(), shortAttr); } - public static ContainerTag dd() { - return new ContainerTag("dd"); - } + public static ImgTag img () { return new ImgTag(); } + public static ImgTag img (Attr.ShortForm shortAttr) { return (ImgTag) Attr.addTo( new ImgTag(), shortAttr); } - public static ContainerTag dd(String text) { - return new ContainerTag("dd").withText(text); - } + public static InputTag input () { return new InputTag(); } + public static InputTag input (Attr.ShortForm shortAttr) { return (InputTag) Attr.addTo( new InputTag(), shortAttr); } - public static ContainerTag dd(DomContent... dc) { - return new ContainerTag("dd").with(dc); - } + public static KeygenTag keygen () { return new KeygenTag(); } + public static KeygenTag keygen (Attr.ShortForm shortAttr) { return (KeygenTag) Attr.addTo( new KeygenTag(), shortAttr); } - public static ContainerTag dd(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("dd"), shortAttr); - } + public static LinkTag link () { return new LinkTag(); } + public static LinkTag link (Attr.ShortForm shortAttr) { return (LinkTag) Attr.addTo( new LinkTag(), shortAttr); } - public static ContainerTag dd(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("dd").withText(text), shortAttr); - } + public static MetaTag meta () { return new MetaTag(); } + public static MetaTag meta (Attr.ShortForm shortAttr) { return (MetaTag) Attr.addTo( new MetaTag(), shortAttr); } - public static ContainerTag dd(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("dd").with(dc), shortAttr); - } + public static ParamTag param () { return new ParamTag(); } + public static ParamTag param (Attr.ShortForm shortAttr) { return (ParamTag) Attr.addTo( new ParamTag(), shortAttr); } - public static ContainerTag del() { - return new ContainerTag("del"); - } + public static SourceTag source () { return new SourceTag(); } + public static SourceTag source (Attr.ShortForm shortAttr) { return (SourceTag) Attr.addTo( new SourceTag(), shortAttr); } - public static ContainerTag del(String text) { - return new ContainerTag("del").withText(text); - } - - public static ContainerTag del(DomContent... dc) { - return new ContainerTag("del").with(dc); - } - - public static ContainerTag del(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("del"), shortAttr); - } - - public static ContainerTag del(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("del").withText(text), shortAttr); - } - - public static ContainerTag del(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("del").with(dc), shortAttr); - } - - public static ContainerTag details() { - return new ContainerTag("details"); - } - - public static ContainerTag details(String text) { - return new ContainerTag("details").withText(text); - } - - public static ContainerTag details(DomContent... dc) { - return new ContainerTag("details").with(dc); - } - - public static ContainerTag details(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("details"), shortAttr); - } - - public static ContainerTag details(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("details").withText(text), shortAttr); - } - - public static ContainerTag details(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("details").with(dc), shortAttr); - } - - public static ContainerTag dfn() { - return new ContainerTag("dfn"); - } - - public static ContainerTag dfn(String text) { - return new ContainerTag("dfn").withText(text); - } - - public static ContainerTag dfn(DomContent... dc) { - return new ContainerTag("dfn").with(dc); - } - - public static ContainerTag dfn(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("dfn"), shortAttr); - } - - public static ContainerTag dfn(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("dfn").withText(text), shortAttr); - } - - public static ContainerTag dfn(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("dfn").with(dc), shortAttr); - } - - public static ContainerTag dialog() { - return new ContainerTag("dialog"); - } - - public static ContainerTag dialog(String text) { - return new ContainerTag("dialog").withText(text); - } - - public static ContainerTag dialog(DomContent... dc) { - return new ContainerTag("dialog").with(dc); - } - - public static ContainerTag dialog(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("dialog"), shortAttr); - } - - public static ContainerTag dialog(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("dialog").withText(text), shortAttr); - } - - public static ContainerTag dialog(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("dialog").with(dc), shortAttr); - } - - public static ContainerTag div() { - return new ContainerTag("div"); - } - - public static ContainerTag div(String text) { - return new ContainerTag("div").withText(text); - } - - public static ContainerTag div(DomContent... dc) { - return new ContainerTag("div").with(dc); - } - - public static ContainerTag div(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("div"), shortAttr); - } - - public static ContainerTag div(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("div").withText(text), shortAttr); - } - - public static ContainerTag div(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("div").with(dc), shortAttr); - } - - public static ContainerTag dl() { - return new ContainerTag("dl"); - } - - public static ContainerTag dl(String text) { - return new ContainerTag("dl").withText(text); - } - - public static ContainerTag dl(DomContent... dc) { - return new ContainerTag("dl").with(dc); - } - - public static ContainerTag dl(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("dl"), shortAttr); - } - - public static ContainerTag dl(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("dl").withText(text), shortAttr); - } - - public static ContainerTag dl(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("dl").with(dc), shortAttr); - } - - public static ContainerTag dt() { - return new ContainerTag("dt"); - } - - public static ContainerTag dt(String text) { - return new ContainerTag("dt").withText(text); - } - - public static ContainerTag dt(DomContent... dc) { - return new ContainerTag("dt").with(dc); - } - - public static ContainerTag dt(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("dt"), shortAttr); - } - - public static ContainerTag dt(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("dt").withText(text), shortAttr); - } - - public static ContainerTag dt(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("dt").with(dc), shortAttr); - } - - public static ContainerTag em() { - return new ContainerTag("em"); - } - - public static ContainerTag em(String text) { - return new ContainerTag("em").withText(text); - } - - public static ContainerTag em(DomContent... dc) { - return new ContainerTag("em").with(dc); - } - - public static ContainerTag em(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("em"), shortAttr); - } - - public static ContainerTag em(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("em").withText(text), shortAttr); - } - - public static ContainerTag em(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("em").with(dc), shortAttr); - } - - public static ContainerTag fieldset() { - return new ContainerTag("fieldset"); - } - - public static ContainerTag fieldset(String text) { - return new ContainerTag("fieldset").withText(text); - } - - public static ContainerTag fieldset(DomContent... dc) { - return new ContainerTag("fieldset").with(dc); - } - - public static ContainerTag fieldset(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("fieldset"), shortAttr); - } - - public static ContainerTag fieldset(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("fieldset").withText(text), shortAttr); - } - - public static ContainerTag fieldset(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("fieldset").with(dc), shortAttr); - } - - public static ContainerTag figcaption() { - return new ContainerTag("figcaption"); - } - - public static ContainerTag figcaption(String text) { - return new ContainerTag("figcaption").withText(text); - } - - public static ContainerTag figcaption(DomContent... dc) { - return new ContainerTag("figcaption").with(dc); - } - - public static ContainerTag figcaption(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("figcaption"), shortAttr); - } - - public static ContainerTag figcaption(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("figcaption").withText(text), shortAttr); - } - - public static ContainerTag figcaption(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("figcaption").with(dc), shortAttr); - } - - public static ContainerTag figure() { - return new ContainerTag("figure"); - } - - public static ContainerTag figure(String text) { - return new ContainerTag("figure").withText(text); - } - - public static ContainerTag figure(DomContent... dc) { - return new ContainerTag("figure").with(dc); - } - - public static ContainerTag figure(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("figure"), shortAttr); - } - - public static ContainerTag figure(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("figure").withText(text), shortAttr); - } - - public static ContainerTag figure(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("figure").with(dc), shortAttr); - } - - public static ContainerTag footer() { - return new ContainerTag("footer"); - } - - public static ContainerTag footer(String text) { - return new ContainerTag("footer").withText(text); - } - - public static ContainerTag footer(DomContent... dc) { - return new ContainerTag("footer").with(dc); - } - - public static ContainerTag footer(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("footer"), shortAttr); - } - - public static ContainerTag footer(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("footer").withText(text), shortAttr); - } - - public static ContainerTag footer(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("footer").with(dc), shortAttr); - } - - public static ContainerTag form() { - return new ContainerTag("form"); - } - - public static ContainerTag form(String text) { - return new ContainerTag("form").withText(text); - } - - public static ContainerTag form(DomContent... dc) { - return new ContainerTag("form").with(dc); - } - - public static ContainerTag form(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("form"), shortAttr); - } - - public static ContainerTag form(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("form").withText(text), shortAttr); - } - - public static ContainerTag form(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("form").with(dc), shortAttr); - } - - public static ContainerTag h1() { - return new ContainerTag("h1"); - } - - public static ContainerTag h1(String text) { - return new ContainerTag("h1").withText(text); - } - - public static ContainerTag h1(DomContent... dc) { - return new ContainerTag("h1").with(dc); - } - - public static ContainerTag h1(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("h1"), shortAttr); - } - - public static ContainerTag h1(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("h1").withText(text), shortAttr); - } - - public static ContainerTag h1(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("h1").with(dc), shortAttr); - } - - public static ContainerTag h2() { - return new ContainerTag("h2"); - } - - public static ContainerTag h2(String text) { - return new ContainerTag("h2").withText(text); - } - - public static ContainerTag h2(DomContent... dc) { - return new ContainerTag("h2").with(dc); - } - - public static ContainerTag h2(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("h2"), shortAttr); - } - - public static ContainerTag h2(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("h2").withText(text), shortAttr); - } - - public static ContainerTag h2(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("h2").with(dc), shortAttr); - } - - public static ContainerTag h3() { - return new ContainerTag("h3"); - } - - public static ContainerTag h3(String text) { - return new ContainerTag("h3").withText(text); - } - - public static ContainerTag h3(DomContent... dc) { - return new ContainerTag("h3").with(dc); - } - - public static ContainerTag h3(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("h3"), shortAttr); - } - - public static ContainerTag h3(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("h3").withText(text), shortAttr); - } - - public static ContainerTag h3(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("h3").with(dc), shortAttr); - } - - public static ContainerTag h4() { - return new ContainerTag("h4"); - } - - public static ContainerTag h4(String text) { - return new ContainerTag("h4").withText(text); - } - - public static ContainerTag h4(DomContent... dc) { - return new ContainerTag("h4").with(dc); - } - - public static ContainerTag h4(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("h4"), shortAttr); - } - - public static ContainerTag h4(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("h4").withText(text), shortAttr); - } - - public static ContainerTag h4(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("h4").with(dc), shortAttr); - } - - public static ContainerTag h5() { - return new ContainerTag("h5"); - } - - public static ContainerTag h5(String text) { - return new ContainerTag("h5").withText(text); - } - - public static ContainerTag h5(DomContent... dc) { - return new ContainerTag("h5").with(dc); - } - - public static ContainerTag h5(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("h5"), shortAttr); - } - - public static ContainerTag h5(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("h5").withText(text), shortAttr); - } - - public static ContainerTag h5(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("h5").with(dc), shortAttr); - } - - public static ContainerTag h6() { - return new ContainerTag("h6"); - } - - public static ContainerTag h6(String text) { - return new ContainerTag("h6").withText(text); - } - - public static ContainerTag h6(DomContent... dc) { - return new ContainerTag("h6").with(dc); - } - - public static ContainerTag h6(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("h6"), shortAttr); - } - - public static ContainerTag h6(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("h6").withText(text), shortAttr); - } - - public static ContainerTag h6(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("h6").with(dc), shortAttr); - } - - public static HeadTag head() { - return new HeadTag(); - } - - public static HeadTag head(String text) { - return (HeadTag)new HeadTag().withText(text); - } - - public static HeadTag head(DomContent... dc) { - return (HeadTag)new HeadTag().with(dc); - } - - public static HeadTag head(Attr.ShortForm shortAttr) { - return (HeadTag)Attr.addTo(new HeadTag(), shortAttr); - } - - public static HeadTag head(Attr.ShortForm shortAttr, String text) { - return (HeadTag)Attr.addTo(new HeadTag().withText(text), shortAttr); - } - - public static HeadTag head(Attr.ShortForm shortAttr, DomContent... dc) { - return (HeadTag)Attr.addTo(new HeadTag().with(dc), shortAttr); - } - - public static ContainerTag header() { - return new ContainerTag("header"); - } - - public static ContainerTag header(String text) { - return new ContainerTag("header").withText(text); - } - - public static ContainerTag header(DomContent... dc) { - return new ContainerTag("header").with(dc); - } - - public static ContainerTag header(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("header"), shortAttr); - } - - public static ContainerTag header(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("header").withText(text), shortAttr); - } - - public static ContainerTag header(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("header").with(dc), shortAttr); - } - - public static HtmlTag html() { - return new HtmlTag(); - } - - public static HtmlTag html(Attr.ShortForm shortAttr) { - return Attr.addTo(new HtmlTag(), shortAttr); - } - - public static HtmlTag html(HeadTag head){ - return new HtmlTag(head); - } - - public static HtmlTag html(BodyTag body){ - return new HtmlTag(body); - } - - public static HtmlTag html(HeadTag head, BodyTag body){ - return new HtmlTag(head, body); - } - - public static HtmlTag html(Attr.ShortForm shortAttr, HeadTag head){ - return Attr.addTo(new HtmlTag(head), shortAttr); - } - - public static HtmlTag html(Attr.ShortForm shortAttr, BodyTag body){ - return Attr.addTo(new HtmlTag(body), shortAttr); - } - - public static HtmlTag html(Attr.ShortForm shortAttr, HeadTag head, BodyTag body){ - return Attr.addTo(new HtmlTag(head, body), shortAttr); - } - - public static ContainerTag i() { - return new ContainerTag("i"); - } - - public static ContainerTag i(String text) { - return new ContainerTag("i").withText(text); - } - - public static ContainerTag i(DomContent... dc) { - return new ContainerTag("i").with(dc); - } - - public static ContainerTag i(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("i"), shortAttr); - } - - public static ContainerTag i(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("i").withText(text), shortAttr); - } - - public static ContainerTag i(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("i").with(dc), shortAttr); - } - - public static ContainerTag iframe() { - return new ContainerTag("iframe"); - } - - public static ContainerTag iframe(String text) { - return new ContainerTag("iframe").withText(text); - } - - public static ContainerTag iframe(DomContent... dc) { - return new ContainerTag("iframe").with(dc); - } - - public static ContainerTag iframe(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("iframe"), shortAttr); - } - - public static ContainerTag iframe(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("iframe").withText(text), shortAttr); - } - - public static ContainerTag iframe(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("iframe").with(dc), shortAttr); - } - - public static ContainerTag ins() { - return new ContainerTag("ins"); - } - - public static ContainerTag ins(String text) { - return new ContainerTag("ins").withText(text); - } - - public static ContainerTag ins(DomContent... dc) { - return new ContainerTag("ins").with(dc); - } - - public static ContainerTag ins(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("ins"), shortAttr); - } - - public static ContainerTag ins(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("ins").withText(text), shortAttr); - } - - public static ContainerTag ins(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("ins").with(dc), shortAttr); - } - - public static ContainerTag kbd() { - return new ContainerTag("kbd"); - } - - public static ContainerTag kbd(String text) { - return new ContainerTag("kbd").withText(text); - } - - public static ContainerTag kbd(DomContent... dc) { - return new ContainerTag("kbd").with(dc); - } - - public static ContainerTag kbd(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("kbd"), shortAttr); - } - - public static ContainerTag kbd(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("kbd").withText(text), shortAttr); - } - - public static ContainerTag kbd(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("kbd").with(dc), shortAttr); - } - - public static ContainerTag label() { - return new ContainerTag("label"); - } - - public static ContainerTag label(String text) { - return new ContainerTag("label").withText(text); - } - - public static ContainerTag label(DomContent... dc) { - return new ContainerTag("label").with(dc); - } - - public static ContainerTag label(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("label"), shortAttr); - } - - public static ContainerTag label(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("label").withText(text), shortAttr); - } - - public static ContainerTag label(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("label").with(dc), shortAttr); - } - - public static ContainerTag legend() { - return new ContainerTag("legend"); - } - - public static ContainerTag legend(String text) { - return new ContainerTag("legend").withText(text); - } - - public static ContainerTag legend(DomContent... dc) { - return new ContainerTag("legend").with(dc); - } - - public static ContainerTag legend(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("legend"), shortAttr); - } - - public static ContainerTag legend(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("legend").withText(text), shortAttr); - } - - public static ContainerTag legend(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("legend").with(dc), shortAttr); - } - - public static ContainerTag li() { - return new ContainerTag("li"); - } - - public static ContainerTag li(String text) { - return new ContainerTag("li").withText(text); - } - - public static ContainerTag li(DomContent... dc) { - return new ContainerTag("li").with(dc); - } - - public static ContainerTag li(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("li"), shortAttr); - } - - public static ContainerTag li(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("li").withText(text), shortAttr); - } - - public static ContainerTag li(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("li").with(dc), shortAttr); - } - - public static ContainerTag main() { - return new ContainerTag("main"); - } - - public static ContainerTag main(String text) { - return new ContainerTag("main").withText(text); - } - - public static ContainerTag main(DomContent... dc) { - return new ContainerTag("main").with(dc); - } - - public static ContainerTag main(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("main"), shortAttr); - } - - public static ContainerTag main(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("main").withText(text), shortAttr); - } - - public static ContainerTag main(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("main").with(dc), shortAttr); - } - - public static ContainerTag map() { - return new ContainerTag("map"); - } - - public static ContainerTag map(String text) { - return new ContainerTag("map").withText(text); - } - - public static ContainerTag map(DomContent... dc) { - return new ContainerTag("map").with(dc); - } - - public static ContainerTag map(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("map"), shortAttr); - } - - public static ContainerTag map(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("map").withText(text), shortAttr); - } - - public static ContainerTag map(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("map").with(dc), shortAttr); - } - - public static ContainerTag mark() { - return new ContainerTag("mark"); - } - - public static ContainerTag mark(String text) { - return new ContainerTag("mark").withText(text); - } - - public static ContainerTag mark(DomContent... dc) { - return new ContainerTag("mark").with(dc); - } - - public static ContainerTag mark(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("mark"), shortAttr); - } - - public static ContainerTag mark(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("mark").withText(text), shortAttr); - } - - public static ContainerTag mark(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("mark").with(dc), shortAttr); - } - - public static ContainerTag menu() { - return new ContainerTag("menu"); - } - - public static ContainerTag menu(String text) { - return new ContainerTag("menu").withText(text); - } - - public static ContainerTag menu(DomContent... dc) { - return new ContainerTag("menu").with(dc); - } - - public static ContainerTag menu(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("menu"), shortAttr); - } - - public static ContainerTag menu(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("menu").withText(text), shortAttr); - } - - public static ContainerTag menu(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("menu").with(dc), shortAttr); - } - - public static ContainerTag menuitem() { - return new ContainerTag("menuitem"); - } - - public static ContainerTag menuitem(String text) { - return new ContainerTag("menuitem").withText(text); - } - - public static ContainerTag menuitem(DomContent... dc) { - return new ContainerTag("menuitem").with(dc); - } - - public static ContainerTag menuitem(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("menuitem"), shortAttr); - } - - public static ContainerTag menuitem(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("menuitem").withText(text), shortAttr); - } - - public static ContainerTag menuitem(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("menuitem").with(dc), shortAttr); - } - - public static ContainerTag meter() { - return new ContainerTag("meter"); - } - - public static ContainerTag meter(String text) { - return new ContainerTag("meter").withText(text); - } - - public static ContainerTag meter(DomContent... dc) { - return new ContainerTag("meter").with(dc); - } - - public static ContainerTag meter(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("meter"), shortAttr); - } - - public static ContainerTag meter(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("meter").withText(text), shortAttr); - } - - public static ContainerTag meter(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("meter").with(dc), shortAttr); - } - - public static ContainerTag nav() { - return new ContainerTag("nav"); - } - - public static ContainerTag nav(String text) { - return new ContainerTag("nav").withText(text); - } - - public static ContainerTag nav(DomContent... dc) { - return new ContainerTag("nav").with(dc); - } - - public static ContainerTag nav(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("nav"), shortAttr); - } - - public static ContainerTag nav(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("nav").withText(text), shortAttr); - } - - public static ContainerTag nav(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("nav").with(dc), shortAttr); - } - - public static ContainerTag noscript() { - return new ContainerTag("noscript"); - } - - public static ContainerTag noscript(String text) { - return new ContainerTag("noscript").withText(text); - } - - public static ContainerTag noscript(DomContent... dc) { - return new ContainerTag("noscript").with(dc); - } - - public static ContainerTag noscript(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("noscript"), shortAttr); - } - - public static ContainerTag noscript(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("noscript").withText(text), shortAttr); - } - - public static ContainerTag noscript(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("noscript").with(dc), shortAttr); - } - - public static ContainerTag object() { - return new ContainerTag("object"); - } - - public static ContainerTag object(String text) { - return new ContainerTag("object").withText(text); - } - - public static ContainerTag object(DomContent... dc) { - return new ContainerTag("object").with(dc); - } - - public static ContainerTag object(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("object"), shortAttr); - } - - public static ContainerTag object(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("object").withText(text), shortAttr); - } - - public static ContainerTag object(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("object").with(dc), shortAttr); - } - - public static ContainerTag ol() { - return new ContainerTag("ol"); - } - - public static ContainerTag ol(String text) { - return new ContainerTag("ol").withText(text); - } - - public static ContainerTag ol(DomContent... dc) { - return new ContainerTag("ol").with(dc); - } - - public static ContainerTag ol(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("ol"), shortAttr); - } - - public static ContainerTag ol(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("ol").withText(text), shortAttr); - } - - public static ContainerTag ol(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("ol").with(dc), shortAttr); - } - - public static ContainerTag optgroup() { - return new ContainerTag("optgroup"); - } - - public static ContainerTag optgroup(String text) { - return new ContainerTag("optgroup").withText(text); - } - - public static ContainerTag optgroup(DomContent... dc) { - return new ContainerTag("optgroup").with(dc); - } - - public static ContainerTag optgroup(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("optgroup"), shortAttr); - } - - public static ContainerTag optgroup(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("optgroup").withText(text), shortAttr); - } - - public static ContainerTag optgroup(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("optgroup").with(dc), shortAttr); - } - - public static ContainerTag option() { - return new ContainerTag("option"); - } - - public static ContainerTag option(String text) { - return new ContainerTag("option").withText(text); - } - - public static ContainerTag option(DomContent... dc) { - return new ContainerTag("option").with(dc); - } - - public static ContainerTag option(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("option"), shortAttr); - } - - public static ContainerTag option(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("option").withText(text), shortAttr); - } - - public static ContainerTag option(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("option").with(dc), shortAttr); - } - - public static ContainerTag output() { - return new ContainerTag("output"); - } - - public static ContainerTag output(String text) { - return new ContainerTag("output").withText(text); - } - - public static ContainerTag output(DomContent... dc) { - return new ContainerTag("output").with(dc); - } - - public static ContainerTag output(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("output"), shortAttr); - } - - public static ContainerTag output(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("output").withText(text), shortAttr); - } - - public static ContainerTag output(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("output").with(dc), shortAttr); - } - - public static ContainerTag p() { - return new ContainerTag("p"); - } - - public static ContainerTag p(String text) { - return new ContainerTag("p").withText(text); - } - - public static ContainerTag p(DomContent... dc) { - return new ContainerTag("p").with(dc); - } - - public static ContainerTag p(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("p"), shortAttr); - } - - public static ContainerTag p(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("p").withText(text), shortAttr); - } - - public static ContainerTag p(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("p").with(dc), shortAttr); - } - - public static ContainerTag pre() { - return new ContainerTag("pre"); - } - - public static ContainerTag pre(String text) { - return new ContainerTag("pre").withText(text); - } - - public static ContainerTag pre(DomContent... dc) { - return new ContainerTag("pre").with(dc); - } - - public static ContainerTag pre(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("pre"), shortAttr); - } - - public static ContainerTag pre(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("pre").withText(text), shortAttr); - } - - public static ContainerTag pre(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("pre").with(dc), shortAttr); - } - - public static ContainerTag progress() { - return new ContainerTag("progress"); - } - - public static ContainerTag progress(String text) { - return new ContainerTag("progress").withText(text); - } - - public static ContainerTag progress(DomContent... dc) { - return new ContainerTag("progress").with(dc); - } - - public static ContainerTag progress(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("progress"), shortAttr); - } - - public static ContainerTag progress(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("progress").withText(text), shortAttr); - } - - public static ContainerTag progress(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("progress").with(dc), shortAttr); - } - - public static ContainerTag q() { - return new ContainerTag("q"); - } - - public static ContainerTag q(String text) { - return new ContainerTag("q").withText(text); - } - - public static ContainerTag q(DomContent... dc) { - return new ContainerTag("q").with(dc); - } - - public static ContainerTag q(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("q"), shortAttr); - } - - public static ContainerTag q(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("q").withText(text), shortAttr); - } - - public static ContainerTag q(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("q").with(dc), shortAttr); - } - - public static ContainerTag rp() { - return new ContainerTag("rp"); - } - - public static ContainerTag rp(String text) { - return new ContainerTag("rp").withText(text); - } - - public static ContainerTag rp(DomContent... dc) { - return new ContainerTag("rp").with(dc); - } - - public static ContainerTag rp(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("rp"), shortAttr); - } - - public static ContainerTag rp(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("rp").withText(text), shortAttr); - } - - public static ContainerTag rp(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("rp").with(dc), shortAttr); - } - - public static ContainerTag rt() { - return new ContainerTag("rt"); - } - - public static ContainerTag rt(String text) { - return new ContainerTag("rt").withText(text); - } - - public static ContainerTag rt(DomContent... dc) { - return new ContainerTag("rt").with(dc); - } - - public static ContainerTag rt(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("rt"), shortAttr); - } - - public static ContainerTag rt(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("rt").withText(text), shortAttr); - } - - public static ContainerTag rt(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("rt").with(dc), shortAttr); - } - - public static ContainerTag ruby() { - return new ContainerTag("ruby"); - } - - public static ContainerTag ruby(String text) { - return new ContainerTag("ruby").withText(text); - } - - public static ContainerTag ruby(DomContent... dc) { - return new ContainerTag("ruby").with(dc); - } - - public static ContainerTag ruby(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("ruby"), shortAttr); - } - - public static ContainerTag ruby(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("ruby").withText(text), shortAttr); - } - - public static ContainerTag ruby(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("ruby").with(dc), shortAttr); - } - - public static ContainerTag s() { - return new ContainerTag("s"); - } - - public static ContainerTag s(String text) { - return new ContainerTag("s").withText(text); - } - - public static ContainerTag s(DomContent... dc) { - return new ContainerTag("s").with(dc); - } - - public static ContainerTag s(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("s"), shortAttr); - } - - public static ContainerTag s(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("s").withText(text), shortAttr); - } - - public static ContainerTag s(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("s").with(dc), shortAttr); - } - - public static ContainerTag samp() { - return new ContainerTag("samp"); - } - - public static ContainerTag samp(String text) { - return new ContainerTag("samp").withText(text); - } - - public static ContainerTag samp(DomContent... dc) { - return new ContainerTag("samp").with(dc); - } - - public static ContainerTag samp(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("samp"), shortAttr); - } - - public static ContainerTag samp(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("samp").withText(text), shortAttr); - } - - public static ContainerTag samp(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("samp").with(dc), shortAttr); - } - - public static ContainerTag script() { - return new ContainerTag("script"); - } - - public static ContainerTag script(String text) { - return new ContainerTag("script").withText(text); - } - - public static ContainerTag script(DomContent... dc) { - return new ContainerTag("script").with(dc); - } - - public static ContainerTag script(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("script"), shortAttr); - } - - public static ContainerTag script(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("script").withText(text), shortAttr); - } - - public static ContainerTag script(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("script").with(dc), shortAttr); - } - - public static ContainerTag section() { - return new ContainerTag("section"); - } - - public static ContainerTag section(String text) { - return new ContainerTag("section").withText(text); - } - - public static ContainerTag section(DomContent... dc) { - return new ContainerTag("section").with(dc); - } - - public static ContainerTag section(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("section"), shortAttr); - } - - public static ContainerTag section(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("section").withText(text), shortAttr); - } - - public static ContainerTag section(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("section").with(dc), shortAttr); - } - - public static ContainerTag select() { - return new ContainerTag("select"); - } - - public static ContainerTag select(String text) { - return new ContainerTag("select").withText(text); - } - - public static ContainerTag select(DomContent... dc) { - return new ContainerTag("select").with(dc); - } - - public static ContainerTag select(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("select"), shortAttr); - } - - public static ContainerTag select(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("select").withText(text), shortAttr); - } - - public static ContainerTag select(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("select").with(dc), shortAttr); - } - - public static ContainerTag small() { - return new ContainerTag("small"); - } - - public static ContainerTag small(String text) { - return new ContainerTag("small").withText(text); - } - - public static ContainerTag small(DomContent... dc) { - return new ContainerTag("small").with(dc); - } - - public static ContainerTag small(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("small"), shortAttr); - } - - public static ContainerTag small(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("small").withText(text), shortAttr); - } - - public static ContainerTag small(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("small").with(dc), shortAttr); - } - - public static ContainerTag span() { - return new ContainerTag("span"); - } - - public static ContainerTag span(String text) { - return new ContainerTag("span").withText(text); - } - - public static ContainerTag span(DomContent... dc) { - return new ContainerTag("span").with(dc); - } - - public static ContainerTag span(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("span"), shortAttr); - } - - public static ContainerTag span(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("span").withText(text), shortAttr); - } - - public static ContainerTag span(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("span").with(dc), shortAttr); - } - - public static ContainerTag strong() { - return new ContainerTag("strong"); - } - - public static ContainerTag strong(String text) { - return new ContainerTag("strong").withText(text); - } - - public static ContainerTag strong(DomContent... dc) { - return new ContainerTag("strong").with(dc); - } - - public static ContainerTag strong(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("strong"), shortAttr); - } - - public static ContainerTag strong(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("strong").withText(text), shortAttr); - } - - public static ContainerTag strong(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("strong").with(dc), shortAttr); - } - - public static ContainerTag style() { - return new ContainerTag("style"); - } - - public static ContainerTag style(String text) { - return new ContainerTag("style").withText(text); - } - - public static ContainerTag style(DomContent... dc) { - return new ContainerTag("style").with(dc); - } - - public static ContainerTag style(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("style"), shortAttr); - } - - public static ContainerTag style(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("style").withText(text), shortAttr); - } - - public static ContainerTag style(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("style").with(dc), shortAttr); - } - - public static ContainerTag sub() { - return new ContainerTag("sub"); - } - - public static ContainerTag sub(String text) { - return new ContainerTag("sub").withText(text); - } - - public static ContainerTag sub(DomContent... dc) { - return new ContainerTag("sub").with(dc); - } - - public static ContainerTag sub(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("sub"), shortAttr); - } - - public static ContainerTag sub(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("sub").withText(text), shortAttr); - } - - public static ContainerTag sub(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("sub").with(dc), shortAttr); - } - - public static ContainerTag summary() { - return new ContainerTag("summary"); - } - - public static ContainerTag summary(String text) { - return new ContainerTag("summary").withText(text); - } - - public static ContainerTag summary(DomContent... dc) { - return new ContainerTag("summary").with(dc); - } - - public static ContainerTag summary(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("summary"), shortAttr); - } - - public static ContainerTag summary(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("summary").withText(text), shortAttr); - } - - public static ContainerTag summary(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("summary").with(dc), shortAttr); - } - - public static ContainerTag sup() { - return new ContainerTag("sup"); - } - - public static ContainerTag sup(String text) { - return new ContainerTag("sup").withText(text); - } - - public static ContainerTag sup(DomContent... dc) { - return new ContainerTag("sup").with(dc); - } - - public static ContainerTag sup(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("sup"), shortAttr); - } - - public static ContainerTag sup(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("sup").withText(text), shortAttr); - } - - public static ContainerTag sup(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("sup").with(dc), shortAttr); - } - - public static ContainerTag table() { - return new ContainerTag("table"); - } - - public static ContainerTag table(String text) { - return new ContainerTag("table").withText(text); - } - - public static ContainerTag table(DomContent... dc) { - return new ContainerTag("table").with(dc); - } - - public static ContainerTag table(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("table"), shortAttr); - } - - public static ContainerTag table(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("table").withText(text), shortAttr); - } - - public static ContainerTag table(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("table").with(dc), shortAttr); - } - - public static ContainerTag tbody() { - return new ContainerTag("tbody"); - } - - public static ContainerTag tbody(String text) { - return new ContainerTag("tbody").withText(text); - } - - public static ContainerTag tbody(DomContent... dc) { - return new ContainerTag("tbody").with(dc); - } - - public static ContainerTag tbody(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("tbody"), shortAttr); - } - - public static ContainerTag tbody(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("tbody").withText(text), shortAttr); - } - - public static ContainerTag tbody(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("tbody").with(dc), shortAttr); - } - - public static ContainerTag td() { - return new ContainerTag("td"); - } - - public static ContainerTag td(String text) { - return new ContainerTag("td").withText(text); - } - - public static ContainerTag td(DomContent... dc) { - return new ContainerTag("td").with(dc); - } - - public static ContainerTag td(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("td"), shortAttr); - } - - public static ContainerTag td(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("td").withText(text), shortAttr); - } - - public static ContainerTag td(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("td").with(dc), shortAttr); - } - - public static ContainerTag textarea() { - return new ContainerTag("textarea"); - } - - public static ContainerTag textarea(String text) { - return new ContainerTag("textarea").withText(text); - } - - public static ContainerTag textarea(DomContent... dc) { - return new ContainerTag("textarea").with(dc); - } - - public static ContainerTag textarea(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("textarea"), shortAttr); - } - - public static ContainerTag textarea(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("textarea").withText(text), shortAttr); - } - - public static ContainerTag textarea(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("textarea").with(dc), shortAttr); - } - - public static ContainerTag tfoot() { - return new ContainerTag("tfoot"); - } - - public static ContainerTag tfoot(String text) { - return new ContainerTag("tfoot").withText(text); - } - - public static ContainerTag tfoot(DomContent... dc) { - return new ContainerTag("tfoot").with(dc); - } - - public static ContainerTag tfoot(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("tfoot"), shortAttr); - } - - public static ContainerTag tfoot(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("tfoot").withText(text), shortAttr); - } - - public static ContainerTag tfoot(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("tfoot").with(dc), shortAttr); - } - - public static ContainerTag th() { - return new ContainerTag("th"); - } - - public static ContainerTag th(String text) { - return new ContainerTag("th").withText(text); - } - - public static ContainerTag th(DomContent... dc) { - return new ContainerTag("th").with(dc); - } - - public static ContainerTag th(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("th"), shortAttr); - } - - public static ContainerTag th(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("th").withText(text), shortAttr); - } - - public static ContainerTag th(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("th").with(dc), shortAttr); - } - - public static ContainerTag thead() { - return new ContainerTag("thead"); - } - - public static ContainerTag thead(String text) { - return new ContainerTag("thead").withText(text); - } - - public static ContainerTag thead(DomContent... dc) { - return new ContainerTag("thead").with(dc); - } - - public static ContainerTag thead(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("thead"), shortAttr); - } - - public static ContainerTag thead(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("thead").withText(text), shortAttr); - } - - public static ContainerTag thead(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("thead").with(dc), shortAttr); - } - - public static ContainerTag time() { - return new ContainerTag("time"); - } - - public static ContainerTag time(String text) { - return new ContainerTag("time").withText(text); - } - - public static ContainerTag time(DomContent... dc) { - return new ContainerTag("time").with(dc); - } - - public static ContainerTag time(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("time"), shortAttr); - } - - public static ContainerTag time(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("time").withText(text), shortAttr); - } - - public static ContainerTag time(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("time").with(dc), shortAttr); - } - - public static ContainerTag title() { - return new ContainerTag("title"); - } - - public static ContainerTag title(String text) { - return new ContainerTag("title").withText(text); - } - - public static ContainerTag title(DomContent... dc) { - return new ContainerTag("title").with(dc); - } - - public static ContainerTag title(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("title"), shortAttr); - } - - public static ContainerTag title(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("title").withText(text), shortAttr); - } - - public static ContainerTag title(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("title").with(dc), shortAttr); - } - - public static ContainerTag tr() { - return new ContainerTag("tr"); - } - - public static ContainerTag tr(String text) { - return new ContainerTag("tr").withText(text); - } - - public static ContainerTag tr(DomContent... dc) { - return new ContainerTag("tr").with(dc); - } - - public static ContainerTag tr(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("tr"), shortAttr); - } - - public static ContainerTag tr(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("tr").withText(text), shortAttr); - } - - public static ContainerTag tr(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("tr").with(dc), shortAttr); - } - - public static ContainerTag u() { - return new ContainerTag("u"); - } - - public static ContainerTag u(String text) { - return new ContainerTag("u").withText(text); - } - - public static ContainerTag u(DomContent... dc) { - return new ContainerTag("u").with(dc); - } - - public static ContainerTag u(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("u"), shortAttr); - } - - public static ContainerTag u(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("u").withText(text), shortAttr); - } - - public static ContainerTag u(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("u").with(dc), shortAttr); - } - - public static ContainerTag ul() { - return new ContainerTag("ul"); - } - - public static ContainerTag ul(String text) { - return new ContainerTag("ul").withText(text); - } - - public static ContainerTag ul(DomContent... dc) { - return new ContainerTag("ul").with(dc); - } - - public static ContainerTag ul(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("ul"), shortAttr); - } - - public static ContainerTag ul(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("ul").withText(text), shortAttr); - } - - public static ContainerTag ul(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("ul").with(dc), shortAttr); - } - - public static ContainerTag var() { - return new ContainerTag("var"); - } - - public static ContainerTag var(String text) { - return new ContainerTag("var").withText(text); - } - - public static ContainerTag var(DomContent... dc) { - return new ContainerTag("var").with(dc); - } - - public static ContainerTag var(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("var"), shortAttr); - } - - public static ContainerTag var(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("var").withText(text), shortAttr); - } - - public static ContainerTag var(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("var").with(dc), shortAttr); - } - - public static ContainerTag video() { - return new ContainerTag("video"); - } - - public static ContainerTag video(String text) { - return new ContainerTag("video").withText(text); - } - - public static ContainerTag video(DomContent... dc) { - return new ContainerTag("video").with(dc); - } - - public static ContainerTag video(Attr.ShortForm shortAttr) { - return Attr.addTo(new ContainerTag("video"), shortAttr); - } - - public static ContainerTag video(Attr.ShortForm shortAttr, String text) { - return Attr.addTo(new ContainerTag("video").withText(text), shortAttr); - } - - public static ContainerTag video(Attr.ShortForm shortAttr, DomContent... dc) { - return Attr.addTo(new ContainerTag("video").with(dc), shortAttr); - } + public static TrackTag track () { return new TrackTag(); } + public static TrackTag track (Attr.ShortForm shortAttr) { return (TrackTag) Attr.addTo( new TrackTag(), shortAttr); } + + public static WbrTag wbr () { return new WbrTag(); } + public static WbrTag wbr (Attr.ShortForm shortAttr) { return (WbrTag) Attr.addTo( new WbrTag(), shortAttr); } + + // ContainerTags, generated in class j2html.tags.generators.TagCreatorCodeGenerator + public static ATag a () { return (ATag) new ATag(); } + public static ATag a (String text) { return (ATag) new ATag().withText(text); } + public static ATag a (DomContent... dc) { return (ATag) new ATag().with(dc); } + public static ATag a (Attr.ShortForm shortAttr) { return (ATag) Attr.addTo( new ATag(), shortAttr); } + public static ATag a (Attr.ShortForm shortAttr, String text) { return (ATag) Attr.addTo( new ATag().withText(text), shortAttr); } + public static ATag a (Attr.ShortForm shortAttr, DomContent... dc) { return (ATag) Attr.addTo( new ATag().with(dc), shortAttr); } + + public static AbbrTag abbr () { return (AbbrTag) new AbbrTag(); } + public static AbbrTag abbr (String text) { return (AbbrTag) new AbbrTag().withText(text); } + public static AbbrTag abbr (DomContent... dc) { return (AbbrTag) new AbbrTag().with(dc); } + public static AbbrTag abbr (Attr.ShortForm shortAttr) { return (AbbrTag) Attr.addTo( new AbbrTag(), shortAttr); } + public static AbbrTag abbr (Attr.ShortForm shortAttr, String text) { return (AbbrTag) Attr.addTo( new AbbrTag().withText(text), shortAttr); } + public static AbbrTag abbr (Attr.ShortForm shortAttr, DomContent... dc) { return (AbbrTag) Attr.addTo( new AbbrTag().with(dc), shortAttr); } + + public static AddressTag address () { return (AddressTag) new AddressTag(); } + public static AddressTag address (String text) { return (AddressTag) new AddressTag().withText(text); } + public static AddressTag address (DomContent... dc) { return (AddressTag) new AddressTag().with(dc); } + public static AddressTag address (Attr.ShortForm shortAttr) { return (AddressTag) Attr.addTo( new AddressTag(), shortAttr); } + public static AddressTag address (Attr.ShortForm shortAttr, String text) { return (AddressTag) Attr.addTo( new AddressTag().withText(text), shortAttr); } + public static AddressTag address (Attr.ShortForm shortAttr, DomContent... dc) { return (AddressTag) Attr.addTo( new AddressTag().with(dc), shortAttr); } + + public static ArticleTag article () { return (ArticleTag) new ArticleTag(); } + public static ArticleTag article (String text) { return (ArticleTag) new ArticleTag().withText(text); } + public static ArticleTag article (DomContent... dc) { return (ArticleTag) new ArticleTag().with(dc); } + public static ArticleTag article (Attr.ShortForm shortAttr) { return (ArticleTag) Attr.addTo( new ArticleTag(), shortAttr); } + public static ArticleTag article (Attr.ShortForm shortAttr, String text) { return (ArticleTag) Attr.addTo( new ArticleTag().withText(text), shortAttr); } + public static ArticleTag article (Attr.ShortForm shortAttr, DomContent... dc) { return (ArticleTag) Attr.addTo( new ArticleTag().with(dc), shortAttr); } + + public static AsideTag aside () { return (AsideTag) new AsideTag(); } + public static AsideTag aside (String text) { return (AsideTag) new AsideTag().withText(text); } + public static AsideTag aside (DomContent... dc) { return (AsideTag) new AsideTag().with(dc); } + public static AsideTag aside (Attr.ShortForm shortAttr) { return (AsideTag) Attr.addTo( new AsideTag(), shortAttr); } + public static AsideTag aside (Attr.ShortForm shortAttr, String text) { return (AsideTag) Attr.addTo( new AsideTag().withText(text), shortAttr); } + public static AsideTag aside (Attr.ShortForm shortAttr, DomContent... dc) { return (AsideTag) Attr.addTo( new AsideTag().with(dc), shortAttr); } + + public static AudioTag audio () { return (AudioTag) new AudioTag(); } + public static AudioTag audio (String text) { return (AudioTag) new AudioTag().withText(text); } + public static AudioTag audio (DomContent... dc) { return (AudioTag) new AudioTag().with(dc); } + public static AudioTag audio (Attr.ShortForm shortAttr) { return (AudioTag) Attr.addTo( new AudioTag(), shortAttr); } + public static AudioTag audio (Attr.ShortForm shortAttr, String text) { return (AudioTag) Attr.addTo( new AudioTag().withText(text), shortAttr); } + public static AudioTag audio (Attr.ShortForm shortAttr, DomContent... dc) { return (AudioTag) Attr.addTo( new AudioTag().with(dc), shortAttr); } + + public static BTag b () { return (BTag) new BTag(); } + public static BTag b (String text) { return (BTag) new BTag().withText(text); } + public static BTag b (DomContent... dc) { return (BTag) new BTag().with(dc); } + public static BTag b (Attr.ShortForm shortAttr) { return (BTag) Attr.addTo( new BTag(), shortAttr); } + public static BTag b (Attr.ShortForm shortAttr, String text) { return (BTag) Attr.addTo( new BTag().withText(text), shortAttr); } + public static BTag b (Attr.ShortForm shortAttr, DomContent... dc) { return (BTag) Attr.addTo( new BTag().with(dc), shortAttr); } + + public static BdiTag bdi () { return (BdiTag) new BdiTag(); } + public static BdiTag bdi (String text) { return (BdiTag) new BdiTag().withText(text); } + public static BdiTag bdi (DomContent... dc) { return (BdiTag) new BdiTag().with(dc); } + public static BdiTag bdi (Attr.ShortForm shortAttr) { return (BdiTag) Attr.addTo( new BdiTag(), shortAttr); } + public static BdiTag bdi (Attr.ShortForm shortAttr, String text) { return (BdiTag) Attr.addTo( new BdiTag().withText(text), shortAttr); } + public static BdiTag bdi (Attr.ShortForm shortAttr, DomContent... dc) { return (BdiTag) Attr.addTo( new BdiTag().with(dc), shortAttr); } + + public static BdoTag bdo () { return (BdoTag) new BdoTag(); } + public static BdoTag bdo (String text) { return (BdoTag) new BdoTag().withText(text); } + public static BdoTag bdo (DomContent... dc) { return (BdoTag) new BdoTag().with(dc); } + public static BdoTag bdo (Attr.ShortForm shortAttr) { return (BdoTag) Attr.addTo( new BdoTag(), shortAttr); } + public static BdoTag bdo (Attr.ShortForm shortAttr, String text) { return (BdoTag) Attr.addTo( new BdoTag().withText(text), shortAttr); } + public static BdoTag bdo (Attr.ShortForm shortAttr, DomContent... dc) { return (BdoTag) Attr.addTo( new BdoTag().with(dc), shortAttr); } + + public static BlockquoteTag blockquote () { return (BlockquoteTag) new BlockquoteTag(); } + public static BlockquoteTag blockquote (String text) { return (BlockquoteTag) new BlockquoteTag().withText(text); } + public static BlockquoteTag blockquote (DomContent... dc) { return (BlockquoteTag) new BlockquoteTag().with(dc); } + public static BlockquoteTag blockquote (Attr.ShortForm shortAttr) { return (BlockquoteTag) Attr.addTo( new BlockquoteTag(), shortAttr); } + public static BlockquoteTag blockquote (Attr.ShortForm shortAttr, String text) { return (BlockquoteTag) Attr.addTo( new BlockquoteTag().withText(text), shortAttr); } + public static BlockquoteTag blockquote (Attr.ShortForm shortAttr, DomContent... dc){ return (BlockquoteTag) Attr.addTo( new BlockquoteTag().with(dc), shortAttr); } + + public static ButtonTag button () { return (ButtonTag) new ButtonTag(); } + public static ButtonTag button (String text) { return (ButtonTag) new ButtonTag().withText(text); } + public static ButtonTag button (DomContent... dc) { return (ButtonTag) new ButtonTag().with(dc); } + public static ButtonTag button (Attr.ShortForm shortAttr) { return (ButtonTag) Attr.addTo( new ButtonTag(), shortAttr); } + public static ButtonTag button (Attr.ShortForm shortAttr, String text) { return (ButtonTag) Attr.addTo( new ButtonTag().withText(text), shortAttr); } + public static ButtonTag button (Attr.ShortForm shortAttr, DomContent... dc) { return (ButtonTag) Attr.addTo( new ButtonTag().with(dc), shortAttr); } + + public static CanvasTag canvas () { return (CanvasTag) new CanvasTag(); } + public static CanvasTag canvas (String text) { return (CanvasTag) new CanvasTag().withText(text); } + public static CanvasTag canvas (DomContent... dc) { return (CanvasTag) new CanvasTag().with(dc); } + public static CanvasTag canvas (Attr.ShortForm shortAttr) { return (CanvasTag) Attr.addTo( new CanvasTag(), shortAttr); } + public static CanvasTag canvas (Attr.ShortForm shortAttr, String text) { return (CanvasTag) Attr.addTo( new CanvasTag().withText(text), shortAttr); } + public static CanvasTag canvas (Attr.ShortForm shortAttr, DomContent... dc) { return (CanvasTag) Attr.addTo( new CanvasTag().with(dc), shortAttr); } + + public static CaptionTag caption () { return (CaptionTag) new CaptionTag(); } + public static CaptionTag caption (String text) { return (CaptionTag) new CaptionTag().withText(text); } + public static CaptionTag caption (DomContent... dc) { return (CaptionTag) new CaptionTag().with(dc); } + public static CaptionTag caption (Attr.ShortForm shortAttr) { return (CaptionTag) Attr.addTo( new CaptionTag(), shortAttr); } + public static CaptionTag caption (Attr.ShortForm shortAttr, String text) { return (CaptionTag) Attr.addTo( new CaptionTag().withText(text), shortAttr); } + public static CaptionTag caption (Attr.ShortForm shortAttr, DomContent... dc) { return (CaptionTag) Attr.addTo( new CaptionTag().with(dc), shortAttr); } + + public static CiteTag cite () { return (CiteTag) new CiteTag(); } + public static CiteTag cite (String text) { return (CiteTag) new CiteTag().withText(text); } + public static CiteTag cite (DomContent... dc) { return (CiteTag) new CiteTag().with(dc); } + public static CiteTag cite (Attr.ShortForm shortAttr) { return (CiteTag) Attr.addTo( new CiteTag(), shortAttr); } + public static CiteTag cite (Attr.ShortForm shortAttr, String text) { return (CiteTag) Attr.addTo( new CiteTag().withText(text), shortAttr); } + public static CiteTag cite (Attr.ShortForm shortAttr, DomContent... dc) { return (CiteTag) Attr.addTo( new CiteTag().with(dc), shortAttr); } + + public static CodeTag code () { return (CodeTag) new CodeTag(); } + public static CodeTag code (String text) { return (CodeTag) new CodeTag().withText(text); } + public static CodeTag code (DomContent... dc) { return (CodeTag) new CodeTag().with(dc); } + public static CodeTag code (Attr.ShortForm shortAttr) { return (CodeTag) Attr.addTo( new CodeTag(), shortAttr); } + public static CodeTag code (Attr.ShortForm shortAttr, String text) { return (CodeTag) Attr.addTo( new CodeTag().withText(text), shortAttr); } + public static CodeTag code (Attr.ShortForm shortAttr, DomContent... dc) { return (CodeTag) Attr.addTo( new CodeTag().with(dc), shortAttr); } + + public static ColgroupTag colgroup () { return (ColgroupTag) new ColgroupTag(); } + public static ColgroupTag colgroup (String text) { return (ColgroupTag) new ColgroupTag().withText(text); } + public static ColgroupTag colgroup (DomContent... dc) { return (ColgroupTag) new ColgroupTag().with(dc); } + public static ColgroupTag colgroup (Attr.ShortForm shortAttr) { return (ColgroupTag) Attr.addTo( new ColgroupTag(), shortAttr); } + public static ColgroupTag colgroup (Attr.ShortForm shortAttr, String text) { return (ColgroupTag) Attr.addTo( new ColgroupTag().withText(text), shortAttr); } + public static ColgroupTag colgroup (Attr.ShortForm shortAttr, DomContent... dc) { return (ColgroupTag) Attr.addTo( new ColgroupTag().with(dc), shortAttr); } + + public static DatalistTag datalist () { return (DatalistTag) new DatalistTag(); } + public static DatalistTag datalist (String text) { return (DatalistTag) new DatalistTag().withText(text); } + public static DatalistTag datalist (DomContent... dc) { return (DatalistTag) new DatalistTag().with(dc); } + public static DatalistTag datalist (Attr.ShortForm shortAttr) { return (DatalistTag) Attr.addTo( new DatalistTag(), shortAttr); } + public static DatalistTag datalist (Attr.ShortForm shortAttr, String text) { return (DatalistTag) Attr.addTo( new DatalistTag().withText(text), shortAttr); } + public static DatalistTag datalist (Attr.ShortForm shortAttr, DomContent... dc) { return (DatalistTag) Attr.addTo( new DatalistTag().with(dc), shortAttr); } + + public static DdTag dd () { return (DdTag) new DdTag(); } + public static DdTag dd (String text) { return (DdTag) new DdTag().withText(text); } + public static DdTag dd (DomContent... dc) { return (DdTag) new DdTag().with(dc); } + public static DdTag dd (Attr.ShortForm shortAttr) { return (DdTag) Attr.addTo( new DdTag(), shortAttr); } + public static DdTag dd (Attr.ShortForm shortAttr, String text) { return (DdTag) Attr.addTo( new DdTag().withText(text), shortAttr); } + public static DdTag dd (Attr.ShortForm shortAttr, DomContent... dc) { return (DdTag) Attr.addTo( new DdTag().with(dc), shortAttr); } + + public static DelTag del () { return (DelTag) new DelTag(); } + public static DelTag del (String text) { return (DelTag) new DelTag().withText(text); } + public static DelTag del (DomContent... dc) { return (DelTag) new DelTag().with(dc); } + public static DelTag del (Attr.ShortForm shortAttr) { return (DelTag) Attr.addTo( new DelTag(), shortAttr); } + public static DelTag del (Attr.ShortForm shortAttr, String text) { return (DelTag) Attr.addTo( new DelTag().withText(text), shortAttr); } + public static DelTag del (Attr.ShortForm shortAttr, DomContent... dc) { return (DelTag) Attr.addTo( new DelTag().with(dc), shortAttr); } + + public static DetailsTag details () { return (DetailsTag) new DetailsTag(); } + public static DetailsTag details (String text) { return (DetailsTag) new DetailsTag().withText(text); } + public static DetailsTag details (DomContent... dc) { return (DetailsTag) new DetailsTag().with(dc); } + public static DetailsTag details (Attr.ShortForm shortAttr) { return (DetailsTag) Attr.addTo( new DetailsTag(), shortAttr); } + public static DetailsTag details (Attr.ShortForm shortAttr, String text) { return (DetailsTag) Attr.addTo( new DetailsTag().withText(text), shortAttr); } + public static DetailsTag details (Attr.ShortForm shortAttr, DomContent... dc) { return (DetailsTag) Attr.addTo( new DetailsTag().with(dc), shortAttr); } + + public static DfnTag dfn () { return (DfnTag) new DfnTag(); } + public static DfnTag dfn (String text) { return (DfnTag) new DfnTag().withText(text); } + public static DfnTag dfn (DomContent... dc) { return (DfnTag) new DfnTag().with(dc); } + public static DfnTag dfn (Attr.ShortForm shortAttr) { return (DfnTag) Attr.addTo( new DfnTag(), shortAttr); } + public static DfnTag dfn (Attr.ShortForm shortAttr, String text) { return (DfnTag) Attr.addTo( new DfnTag().withText(text), shortAttr); } + public static DfnTag dfn (Attr.ShortForm shortAttr, DomContent... dc) { return (DfnTag) Attr.addTo( new DfnTag().with(dc), shortAttr); } + + public static DialogTag dialog () { return (DialogTag) new DialogTag(); } + public static DialogTag dialog (String text) { return (DialogTag) new DialogTag().withText(text); } + public static DialogTag dialog (DomContent... dc) { return (DialogTag) new DialogTag().with(dc); } + public static DialogTag dialog (Attr.ShortForm shortAttr) { return (DialogTag) Attr.addTo( new DialogTag(), shortAttr); } + public static DialogTag dialog (Attr.ShortForm shortAttr, String text) { return (DialogTag) Attr.addTo( new DialogTag().withText(text), shortAttr); } + public static DialogTag dialog (Attr.ShortForm shortAttr, DomContent... dc) { return (DialogTag) Attr.addTo( new DialogTag().with(dc), shortAttr); } + + public static DivTag div () { return (DivTag) new DivTag(); } + public static DivTag div (String text) { return (DivTag) new DivTag().withText(text); } + public static DivTag div (DomContent... dc) { return (DivTag) new DivTag().with(dc); } + public static DivTag div (Attr.ShortForm shortAttr) { return (DivTag) Attr.addTo( new DivTag(), shortAttr); } + public static DivTag div (Attr.ShortForm shortAttr, String text) { return (DivTag) Attr.addTo( new DivTag().withText(text), shortAttr); } + public static DivTag div (Attr.ShortForm shortAttr, DomContent... dc) { return (DivTag) Attr.addTo( new DivTag().with(dc), shortAttr); } + + public static DlTag dl () { return (DlTag) new DlTag(); } + public static DlTag dl (String text) { return (DlTag) new DlTag().withText(text); } + public static DlTag dl (DomContent... dc) { return (DlTag) new DlTag().with(dc); } + public static DlTag dl (Attr.ShortForm shortAttr) { return (DlTag) Attr.addTo( new DlTag(), shortAttr); } + public static DlTag dl (Attr.ShortForm shortAttr, String text) { return (DlTag) Attr.addTo( new DlTag().withText(text), shortAttr); } + public static DlTag dl (Attr.ShortForm shortAttr, DomContent... dc) { return (DlTag) Attr.addTo( new DlTag().with(dc), shortAttr); } + + public static DtTag dt () { return (DtTag) new DtTag(); } + public static DtTag dt (String text) { return (DtTag) new DtTag().withText(text); } + public static DtTag dt (DomContent... dc) { return (DtTag) new DtTag().with(dc); } + public static DtTag dt (Attr.ShortForm shortAttr) { return (DtTag) Attr.addTo( new DtTag(), shortAttr); } + public static DtTag dt (Attr.ShortForm shortAttr, String text) { return (DtTag) Attr.addTo( new DtTag().withText(text), shortAttr); } + public static DtTag dt (Attr.ShortForm shortAttr, DomContent... dc) { return (DtTag) Attr.addTo( new DtTag().with(dc), shortAttr); } + + public static EmTag em () { return (EmTag) new EmTag(); } + public static EmTag em (String text) { return (EmTag) new EmTag().withText(text); } + public static EmTag em (DomContent... dc) { return (EmTag) new EmTag().with(dc); } + public static EmTag em (Attr.ShortForm shortAttr) { return (EmTag) Attr.addTo( new EmTag(), shortAttr); } + public static EmTag em (Attr.ShortForm shortAttr, String text) { return (EmTag) Attr.addTo( new EmTag().withText(text), shortAttr); } + public static EmTag em (Attr.ShortForm shortAttr, DomContent... dc) { return (EmTag) Attr.addTo( new EmTag().with(dc), shortAttr); } + + public static FieldsetTag fieldset () { return (FieldsetTag) new FieldsetTag(); } + public static FieldsetTag fieldset (String text) { return (FieldsetTag) new FieldsetTag().withText(text); } + public static FieldsetTag fieldset (DomContent... dc) { return (FieldsetTag) new FieldsetTag().with(dc); } + public static FieldsetTag fieldset (Attr.ShortForm shortAttr) { return (FieldsetTag) Attr.addTo( new FieldsetTag(), shortAttr); } + public static FieldsetTag fieldset (Attr.ShortForm shortAttr, String text) { return (FieldsetTag) Attr.addTo( new FieldsetTag().withText(text), shortAttr); } + public static FieldsetTag fieldset (Attr.ShortForm shortAttr, DomContent... dc) { return (FieldsetTag) Attr.addTo( new FieldsetTag().with(dc), shortAttr); } + + public static FigcaptionTag figcaption () { return (FigcaptionTag) new FigcaptionTag(); } + public static FigcaptionTag figcaption (String text) { return (FigcaptionTag) new FigcaptionTag().withText(text); } + public static FigcaptionTag figcaption (DomContent... dc) { return (FigcaptionTag) new FigcaptionTag().with(dc); } + public static FigcaptionTag figcaption (Attr.ShortForm shortAttr) { return (FigcaptionTag) Attr.addTo( new FigcaptionTag(), shortAttr); } + public static FigcaptionTag figcaption (Attr.ShortForm shortAttr, String text) { return (FigcaptionTag) Attr.addTo( new FigcaptionTag().withText(text), shortAttr); } + public static FigcaptionTag figcaption (Attr.ShortForm shortAttr, DomContent... dc){ return (FigcaptionTag) Attr.addTo( new FigcaptionTag().with(dc), shortAttr); } + + public static FigureTag figure () { return (FigureTag) new FigureTag(); } + public static FigureTag figure (String text) { return (FigureTag) new FigureTag().withText(text); } + public static FigureTag figure (DomContent... dc) { return (FigureTag) new FigureTag().with(dc); } + public static FigureTag figure (Attr.ShortForm shortAttr) { return (FigureTag) Attr.addTo( new FigureTag(), shortAttr); } + public static FigureTag figure (Attr.ShortForm shortAttr, String text) { return (FigureTag) Attr.addTo( new FigureTag().withText(text), shortAttr); } + public static FigureTag figure (Attr.ShortForm shortAttr, DomContent... dc) { return (FigureTag) Attr.addTo( new FigureTag().with(dc), shortAttr); } + + public static FooterTag footer () { return (FooterTag) new FooterTag(); } + public static FooterTag footer (String text) { return (FooterTag) new FooterTag().withText(text); } + public static FooterTag footer (DomContent... dc) { return (FooterTag) new FooterTag().with(dc); } + public static FooterTag footer (Attr.ShortForm shortAttr) { return (FooterTag) Attr.addTo( new FooterTag(), shortAttr); } + public static FooterTag footer (Attr.ShortForm shortAttr, String text) { return (FooterTag) Attr.addTo( new FooterTag().withText(text), shortAttr); } + public static FooterTag footer (Attr.ShortForm shortAttr, DomContent... dc) { return (FooterTag) Attr.addTo( new FooterTag().with(dc), shortAttr); } + + public static FormTag form () { return (FormTag) new FormTag(); } + public static FormTag form (String text) { return (FormTag) new FormTag().withText(text); } + public static FormTag form (DomContent... dc) { return (FormTag) new FormTag().with(dc); } + public static FormTag form (Attr.ShortForm shortAttr) { return (FormTag) Attr.addTo( new FormTag(), shortAttr); } + public static FormTag form (Attr.ShortForm shortAttr, String text) { return (FormTag) Attr.addTo( new FormTag().withText(text), shortAttr); } + public static FormTag form (Attr.ShortForm shortAttr, DomContent... dc) { return (FormTag) Attr.addTo( new FormTag().with(dc), shortAttr); } + + public static H1Tag h1 () { return (H1Tag) new H1Tag(); } + public static H1Tag h1 (String text) { return (H1Tag) new H1Tag().withText(text); } + public static H1Tag h1 (DomContent... dc) { return (H1Tag) new H1Tag().with(dc); } + public static H1Tag h1 (Attr.ShortForm shortAttr) { return (H1Tag) Attr.addTo( new H1Tag(), shortAttr); } + public static H1Tag h1 (Attr.ShortForm shortAttr, String text) { return (H1Tag) Attr.addTo( new H1Tag().withText(text), shortAttr); } + public static H1Tag h1 (Attr.ShortForm shortAttr, DomContent... dc) { return (H1Tag) Attr.addTo( new H1Tag().with(dc), shortAttr); } + + public static H2Tag h2 () { return (H2Tag) new H2Tag(); } + public static H2Tag h2 (String text) { return (H2Tag) new H2Tag().withText(text); } + public static H2Tag h2 (DomContent... dc) { return (H2Tag) new H2Tag().with(dc); } + public static H2Tag h2 (Attr.ShortForm shortAttr) { return (H2Tag) Attr.addTo( new H2Tag(), shortAttr); } + public static H2Tag h2 (Attr.ShortForm shortAttr, String text) { return (H2Tag) Attr.addTo( new H2Tag().withText(text), shortAttr); } + public static H2Tag h2 (Attr.ShortForm shortAttr, DomContent... dc) { return (H2Tag) Attr.addTo( new H2Tag().with(dc), shortAttr); } + + public static H3Tag h3 () { return (H3Tag) new H3Tag(); } + public static H3Tag h3 (String text) { return (H3Tag) new H3Tag().withText(text); } + public static H3Tag h3 (DomContent... dc) { return (H3Tag) new H3Tag().with(dc); } + public static H3Tag h3 (Attr.ShortForm shortAttr) { return (H3Tag) Attr.addTo( new H3Tag(), shortAttr); } + public static H3Tag h3 (Attr.ShortForm shortAttr, String text) { return (H3Tag) Attr.addTo( new H3Tag().withText(text), shortAttr); } + public static H3Tag h3 (Attr.ShortForm shortAttr, DomContent... dc) { return (H3Tag) Attr.addTo( new H3Tag().with(dc), shortAttr); } + + public static H4Tag h4 () { return (H4Tag) new H4Tag(); } + public static H4Tag h4 (String text) { return (H4Tag) new H4Tag().withText(text); } + public static H4Tag h4 (DomContent... dc) { return (H4Tag) new H4Tag().with(dc); } + public static H4Tag h4 (Attr.ShortForm shortAttr) { return (H4Tag) Attr.addTo( new H4Tag(), shortAttr); } + public static H4Tag h4 (Attr.ShortForm shortAttr, String text) { return (H4Tag) Attr.addTo( new H4Tag().withText(text), shortAttr); } + public static H4Tag h4 (Attr.ShortForm shortAttr, DomContent... dc) { return (H4Tag) Attr.addTo( new H4Tag().with(dc), shortAttr); } + + public static H5Tag h5 () { return (H5Tag) new H5Tag(); } + public static H5Tag h5 (String text) { return (H5Tag) new H5Tag().withText(text); } + public static H5Tag h5 (DomContent... dc) { return (H5Tag) new H5Tag().with(dc); } + public static H5Tag h5 (Attr.ShortForm shortAttr) { return (H5Tag) Attr.addTo( new H5Tag(), shortAttr); } + public static H5Tag h5 (Attr.ShortForm shortAttr, String text) { return (H5Tag) Attr.addTo( new H5Tag().withText(text), shortAttr); } + public static H5Tag h5 (Attr.ShortForm shortAttr, DomContent... dc) { return (H5Tag) Attr.addTo( new H5Tag().with(dc), shortAttr); } + + public static H6Tag h6 () { return (H6Tag) new H6Tag(); } + public static H6Tag h6 (String text) { return (H6Tag) new H6Tag().withText(text); } + public static H6Tag h6 (DomContent... dc) { return (H6Tag) new H6Tag().with(dc); } + public static H6Tag h6 (Attr.ShortForm shortAttr) { return (H6Tag) Attr.addTo( new H6Tag(), shortAttr); } + public static H6Tag h6 (Attr.ShortForm shortAttr, String text) { return (H6Tag) Attr.addTo( new H6Tag().withText(text), shortAttr); } + public static H6Tag h6 (Attr.ShortForm shortAttr, DomContent... dc) { return (H6Tag) Attr.addTo( new H6Tag().with(dc), shortAttr); } + + public static HeaderTag header () { return (HeaderTag) new HeaderTag(); } + public static HeaderTag header (String text) { return (HeaderTag) new HeaderTag().withText(text); } + public static HeaderTag header (DomContent... dc) { return (HeaderTag) new HeaderTag().with(dc); } + public static HeaderTag header (Attr.ShortForm shortAttr) { return (HeaderTag) Attr.addTo( new HeaderTag(), shortAttr); } + public static HeaderTag header (Attr.ShortForm shortAttr, String text) { return (HeaderTag) Attr.addTo( new HeaderTag().withText(text), shortAttr); } + public static HeaderTag header (Attr.ShortForm shortAttr, DomContent... dc) { return (HeaderTag) Attr.addTo( new HeaderTag().with(dc), shortAttr); } + + public static ITag i () { return (ITag) new ITag(); } + public static ITag i (String text) { return (ITag) new ITag().withText(text); } + public static ITag i (DomContent... dc) { return (ITag) new ITag().with(dc); } + public static ITag i (Attr.ShortForm shortAttr) { return (ITag) Attr.addTo( new ITag(), shortAttr); } + public static ITag i (Attr.ShortForm shortAttr, String text) { return (ITag) Attr.addTo( new ITag().withText(text), shortAttr); } + public static ITag i (Attr.ShortForm shortAttr, DomContent... dc) { return (ITag) Attr.addTo( new ITag().with(dc), shortAttr); } + + public static IframeTag iframe () { return (IframeTag) new IframeTag(); } + public static IframeTag iframe (String text) { return (IframeTag) new IframeTag().withText(text); } + public static IframeTag iframe (DomContent... dc) { return (IframeTag) new IframeTag().with(dc); } + public static IframeTag iframe (Attr.ShortForm shortAttr) { return (IframeTag) Attr.addTo( new IframeTag(), shortAttr); } + public static IframeTag iframe (Attr.ShortForm shortAttr, String text) { return (IframeTag) Attr.addTo( new IframeTag().withText(text), shortAttr); } + public static IframeTag iframe (Attr.ShortForm shortAttr, DomContent... dc) { return (IframeTag) Attr.addTo( new IframeTag().with(dc), shortAttr); } + + public static InsTag ins () { return (InsTag) new InsTag(); } + public static InsTag ins (String text) { return (InsTag) new InsTag().withText(text); } + public static InsTag ins (DomContent... dc) { return (InsTag) new InsTag().with(dc); } + public static InsTag ins (Attr.ShortForm shortAttr) { return (InsTag) Attr.addTo( new InsTag(), shortAttr); } + public static InsTag ins (Attr.ShortForm shortAttr, String text) { return (InsTag) Attr.addTo( new InsTag().withText(text), shortAttr); } + public static InsTag ins (Attr.ShortForm shortAttr, DomContent... dc) { return (InsTag) Attr.addTo( new InsTag().with(dc), shortAttr); } + + public static KbdTag kbd () { return (KbdTag) new KbdTag(); } + public static KbdTag kbd (String text) { return (KbdTag) new KbdTag().withText(text); } + public static KbdTag kbd (DomContent... dc) { return (KbdTag) new KbdTag().with(dc); } + public static KbdTag kbd (Attr.ShortForm shortAttr) { return (KbdTag) Attr.addTo( new KbdTag(), shortAttr); } + public static KbdTag kbd (Attr.ShortForm shortAttr, String text) { return (KbdTag) Attr.addTo( new KbdTag().withText(text), shortAttr); } + public static KbdTag kbd (Attr.ShortForm shortAttr, DomContent... dc) { return (KbdTag) Attr.addTo( new KbdTag().with(dc), shortAttr); } + + public static LabelTag label () { return (LabelTag) new LabelTag(); } + public static LabelTag label (String text) { return (LabelTag) new LabelTag().withText(text); } + public static LabelTag label (DomContent... dc) { return (LabelTag) new LabelTag().with(dc); } + public static LabelTag label (Attr.ShortForm shortAttr) { return (LabelTag) Attr.addTo( new LabelTag(), shortAttr); } + public static LabelTag label (Attr.ShortForm shortAttr, String text) { return (LabelTag) Attr.addTo( new LabelTag().withText(text), shortAttr); } + public static LabelTag label (Attr.ShortForm shortAttr, DomContent... dc) { return (LabelTag) Attr.addTo( new LabelTag().with(dc), shortAttr); } + + public static LegendTag legend () { return (LegendTag) new LegendTag(); } + public static LegendTag legend (String text) { return (LegendTag) new LegendTag().withText(text); } + public static LegendTag legend (DomContent... dc) { return (LegendTag) new LegendTag().with(dc); } + public static LegendTag legend (Attr.ShortForm shortAttr) { return (LegendTag) Attr.addTo( new LegendTag(), shortAttr); } + public static LegendTag legend (Attr.ShortForm shortAttr, String text) { return (LegendTag) Attr.addTo( new LegendTag().withText(text), shortAttr); } + public static LegendTag legend (Attr.ShortForm shortAttr, DomContent... dc) { return (LegendTag) Attr.addTo( new LegendTag().with(dc), shortAttr); } + + public static LiTag li () { return (LiTag) new LiTag(); } + public static LiTag li (String text) { return (LiTag) new LiTag().withText(text); } + public static LiTag li (DomContent... dc) { return (LiTag) new LiTag().with(dc); } + public static LiTag li (Attr.ShortForm shortAttr) { return (LiTag) Attr.addTo( new LiTag(), shortAttr); } + public static LiTag li (Attr.ShortForm shortAttr, String text) { return (LiTag) Attr.addTo( new LiTag().withText(text), shortAttr); } + public static LiTag li (Attr.ShortForm shortAttr, DomContent... dc) { return (LiTag) Attr.addTo( new LiTag().with(dc), shortAttr); } + + public static MainTag main () { return (MainTag) new MainTag(); } + public static MainTag main (String text) { return (MainTag) new MainTag().withText(text); } + public static MainTag main (DomContent... dc) { return (MainTag) new MainTag().with(dc); } + public static MainTag main (Attr.ShortForm shortAttr) { return (MainTag) Attr.addTo( new MainTag(), shortAttr); } + public static MainTag main (Attr.ShortForm shortAttr, String text) { return (MainTag) Attr.addTo( new MainTag().withText(text), shortAttr); } + public static MainTag main (Attr.ShortForm shortAttr, DomContent... dc) { return (MainTag) Attr.addTo( new MainTag().with(dc), shortAttr); } + + public static MapTag map () { return (MapTag) new MapTag(); } + public static MapTag map (String text) { return (MapTag) new MapTag().withText(text); } + public static MapTag map (DomContent... dc) { return (MapTag) new MapTag().with(dc); } + public static MapTag map (Attr.ShortForm shortAttr) { return (MapTag) Attr.addTo( new MapTag(), shortAttr); } + public static MapTag map (Attr.ShortForm shortAttr, String text) { return (MapTag) Attr.addTo( new MapTag().withText(text), shortAttr); } + public static MapTag map (Attr.ShortForm shortAttr, DomContent... dc) { return (MapTag) Attr.addTo( new MapTag().with(dc), shortAttr); } + + public static MarkTag mark () { return (MarkTag) new MarkTag(); } + public static MarkTag mark (String text) { return (MarkTag) new MarkTag().withText(text); } + public static MarkTag mark (DomContent... dc) { return (MarkTag) new MarkTag().with(dc); } + public static MarkTag mark (Attr.ShortForm shortAttr) { return (MarkTag) Attr.addTo( new MarkTag(), shortAttr); } + public static MarkTag mark (Attr.ShortForm shortAttr, String text) { return (MarkTag) Attr.addTo( new MarkTag().withText(text), shortAttr); } + public static MarkTag mark (Attr.ShortForm shortAttr, DomContent... dc) { return (MarkTag) Attr.addTo( new MarkTag().with(dc), shortAttr); } + + public static MenuTag menu () { return (MenuTag) new MenuTag(); } + public static MenuTag menu (String text) { return (MenuTag) new MenuTag().withText(text); } + public static MenuTag menu (DomContent... dc) { return (MenuTag) new MenuTag().with(dc); } + public static MenuTag menu (Attr.ShortForm shortAttr) { return (MenuTag) Attr.addTo( new MenuTag(), shortAttr); } + public static MenuTag menu (Attr.ShortForm shortAttr, String text) { return (MenuTag) Attr.addTo( new MenuTag().withText(text), shortAttr); } + public static MenuTag menu (Attr.ShortForm shortAttr, DomContent... dc) { return (MenuTag) Attr.addTo( new MenuTag().with(dc), shortAttr); } + + public static MenuitemTag menuitem () { return (MenuitemTag) new MenuitemTag(); } + public static MenuitemTag menuitem (String text) { return (MenuitemTag) new MenuitemTag().withText(text); } + public static MenuitemTag menuitem (DomContent... dc) { return (MenuitemTag) new MenuitemTag().with(dc); } + public static MenuitemTag menuitem (Attr.ShortForm shortAttr) { return (MenuitemTag) Attr.addTo( new MenuitemTag(), shortAttr); } + public static MenuitemTag menuitem (Attr.ShortForm shortAttr, String text) { return (MenuitemTag) Attr.addTo( new MenuitemTag().withText(text), shortAttr); } + public static MenuitemTag menuitem (Attr.ShortForm shortAttr, DomContent... dc) { return (MenuitemTag) Attr.addTo( new MenuitemTag().with(dc), shortAttr); } + + public static MeterTag meter () { return (MeterTag) new MeterTag(); } + public static MeterTag meter (String text) { return (MeterTag) new MeterTag().withText(text); } + public static MeterTag meter (DomContent... dc) { return (MeterTag) new MeterTag().with(dc); } + public static MeterTag meter (Attr.ShortForm shortAttr) { return (MeterTag) Attr.addTo( new MeterTag(), shortAttr); } + public static MeterTag meter (Attr.ShortForm shortAttr, String text) { return (MeterTag) Attr.addTo( new MeterTag().withText(text), shortAttr); } + public static MeterTag meter (Attr.ShortForm shortAttr, DomContent... dc) { return (MeterTag) Attr.addTo( new MeterTag().with(dc), shortAttr); } + + public static NavTag nav () { return (NavTag) new NavTag(); } + public static NavTag nav (String text) { return (NavTag) new NavTag().withText(text); } + public static NavTag nav (DomContent... dc) { return (NavTag) new NavTag().with(dc); } + public static NavTag nav (Attr.ShortForm shortAttr) { return (NavTag) Attr.addTo( new NavTag(), shortAttr); } + public static NavTag nav (Attr.ShortForm shortAttr, String text) { return (NavTag) Attr.addTo( new NavTag().withText(text), shortAttr); } + public static NavTag nav (Attr.ShortForm shortAttr, DomContent... dc) { return (NavTag) Attr.addTo( new NavTag().with(dc), shortAttr); } + + public static NoscriptTag noscript () { return (NoscriptTag) new NoscriptTag(); } + public static NoscriptTag noscript (String text) { return (NoscriptTag) new NoscriptTag().withText(text); } + public static NoscriptTag noscript (DomContent... dc) { return (NoscriptTag) new NoscriptTag().with(dc); } + public static NoscriptTag noscript (Attr.ShortForm shortAttr) { return (NoscriptTag) Attr.addTo( new NoscriptTag(), shortAttr); } + public static NoscriptTag noscript (Attr.ShortForm shortAttr, String text) { return (NoscriptTag) Attr.addTo( new NoscriptTag().withText(text), shortAttr); } + public static NoscriptTag noscript (Attr.ShortForm shortAttr, DomContent... dc) { return (NoscriptTag) Attr.addTo( new NoscriptTag().with(dc), shortAttr); } + + public static ObjectTag object () { return (ObjectTag) new ObjectTag(); } + public static ObjectTag object (String text) { return (ObjectTag) new ObjectTag().withText(text); } + public static ObjectTag object (DomContent... dc) { return (ObjectTag) new ObjectTag().with(dc); } + public static ObjectTag object (Attr.ShortForm shortAttr) { return (ObjectTag) Attr.addTo( new ObjectTag(), shortAttr); } + public static ObjectTag object (Attr.ShortForm shortAttr, String text) { return (ObjectTag) Attr.addTo( new ObjectTag().withText(text), shortAttr); } + public static ObjectTag object (Attr.ShortForm shortAttr, DomContent... dc) { return (ObjectTag) Attr.addTo( new ObjectTag().with(dc), shortAttr); } + + public static OlTag ol () { return (OlTag) new OlTag(); } + public static OlTag ol (String text) { return (OlTag) new OlTag().withText(text); } + public static OlTag ol (DomContent... dc) { return (OlTag) new OlTag().with(dc); } + public static OlTag ol (Attr.ShortForm shortAttr) { return (OlTag) Attr.addTo( new OlTag(), shortAttr); } + public static OlTag ol (Attr.ShortForm shortAttr, String text) { return (OlTag) Attr.addTo( new OlTag().withText(text), shortAttr); } + public static OlTag ol (Attr.ShortForm shortAttr, DomContent... dc) { return (OlTag) Attr.addTo( new OlTag().with(dc), shortAttr); } + + public static OptgroupTag optgroup () { return (OptgroupTag) new OptgroupTag(); } + public static OptgroupTag optgroup (String text) { return (OptgroupTag) new OptgroupTag().withText(text); } + public static OptgroupTag optgroup (DomContent... dc) { return (OptgroupTag) new OptgroupTag().with(dc); } + public static OptgroupTag optgroup (Attr.ShortForm shortAttr) { return (OptgroupTag) Attr.addTo( new OptgroupTag(), shortAttr); } + public static OptgroupTag optgroup (Attr.ShortForm shortAttr, String text) { return (OptgroupTag) Attr.addTo( new OptgroupTag().withText(text), shortAttr); } + public static OptgroupTag optgroup (Attr.ShortForm shortAttr, DomContent... dc) { return (OptgroupTag) Attr.addTo( new OptgroupTag().with(dc), shortAttr); } + + public static OptionTag option () { return (OptionTag) new OptionTag(); } + public static OptionTag option (String text) { return (OptionTag) new OptionTag().withText(text); } + public static OptionTag option (DomContent... dc) { return (OptionTag) new OptionTag().with(dc); } + public static OptionTag option (Attr.ShortForm shortAttr) { return (OptionTag) Attr.addTo( new OptionTag(), shortAttr); } + public static OptionTag option (Attr.ShortForm shortAttr, String text) { return (OptionTag) Attr.addTo( new OptionTag().withText(text), shortAttr); } + public static OptionTag option (Attr.ShortForm shortAttr, DomContent... dc) { return (OptionTag) Attr.addTo( new OptionTag().with(dc), shortAttr); } + + public static OutputTag output () { return (OutputTag) new OutputTag(); } + public static OutputTag output (String text) { return (OutputTag) new OutputTag().withText(text); } + public static OutputTag output (DomContent... dc) { return (OutputTag) new OutputTag().with(dc); } + public static OutputTag output (Attr.ShortForm shortAttr) { return (OutputTag) Attr.addTo( new OutputTag(), shortAttr); } + public static OutputTag output (Attr.ShortForm shortAttr, String text) { return (OutputTag) Attr.addTo( new OutputTag().withText(text), shortAttr); } + public static OutputTag output (Attr.ShortForm shortAttr, DomContent... dc) { return (OutputTag) Attr.addTo( new OutputTag().with(dc), shortAttr); } + + public static PTag p () { return (PTag) new PTag(); } + public static PTag p (String text) { return (PTag) new PTag().withText(text); } + public static PTag p (DomContent... dc) { return (PTag) new PTag().with(dc); } + public static PTag p (Attr.ShortForm shortAttr) { return (PTag) Attr.addTo( new PTag(), shortAttr); } + public static PTag p (Attr.ShortForm shortAttr, String text) { return (PTag) Attr.addTo( new PTag().withText(text), shortAttr); } + public static PTag p (Attr.ShortForm shortAttr, DomContent... dc) { return (PTag) Attr.addTo( new PTag().with(dc), shortAttr); } + + public static PreTag pre () { return (PreTag) new PreTag(); } + public static PreTag pre (String text) { return (PreTag) new PreTag().withText(text); } + public static PreTag pre (DomContent... dc) { return (PreTag) new PreTag().with(dc); } + public static PreTag pre (Attr.ShortForm shortAttr) { return (PreTag) Attr.addTo( new PreTag(), shortAttr); } + public static PreTag pre (Attr.ShortForm shortAttr, String text) { return (PreTag) Attr.addTo( new PreTag().withText(text), shortAttr); } + public static PreTag pre (Attr.ShortForm shortAttr, DomContent... dc) { return (PreTag) Attr.addTo( new PreTag().with(dc), shortAttr); } + + public static ProgressTag progress () { return (ProgressTag) new ProgressTag(); } + public static ProgressTag progress (String text) { return (ProgressTag) new ProgressTag().withText(text); } + public static ProgressTag progress (DomContent... dc) { return (ProgressTag) new ProgressTag().with(dc); } + public static ProgressTag progress (Attr.ShortForm shortAttr) { return (ProgressTag) Attr.addTo( new ProgressTag(), shortAttr); } + public static ProgressTag progress (Attr.ShortForm shortAttr, String text) { return (ProgressTag) Attr.addTo( new ProgressTag().withText(text), shortAttr); } + public static ProgressTag progress (Attr.ShortForm shortAttr, DomContent... dc) { return (ProgressTag) Attr.addTo( new ProgressTag().with(dc), shortAttr); } + + public static QTag q () { return (QTag) new QTag(); } + public static QTag q (String text) { return (QTag) new QTag().withText(text); } + public static QTag q (DomContent... dc) { return (QTag) new QTag().with(dc); } + public static QTag q (Attr.ShortForm shortAttr) { return (QTag) Attr.addTo( new QTag(), shortAttr); } + public static QTag q (Attr.ShortForm shortAttr, String text) { return (QTag) Attr.addTo( new QTag().withText(text), shortAttr); } + public static QTag q (Attr.ShortForm shortAttr, DomContent... dc) { return (QTag) Attr.addTo( new QTag().with(dc), shortAttr); } + + public static RpTag rp () { return (RpTag) new RpTag(); } + public static RpTag rp (String text) { return (RpTag) new RpTag().withText(text); } + public static RpTag rp (DomContent... dc) { return (RpTag) new RpTag().with(dc); } + public static RpTag rp (Attr.ShortForm shortAttr) { return (RpTag) Attr.addTo( new RpTag(), shortAttr); } + public static RpTag rp (Attr.ShortForm shortAttr, String text) { return (RpTag) Attr.addTo( new RpTag().withText(text), shortAttr); } + public static RpTag rp (Attr.ShortForm shortAttr, DomContent... dc) { return (RpTag) Attr.addTo( new RpTag().with(dc), shortAttr); } + + public static RtTag rt () { return (RtTag) new RtTag(); } + public static RtTag rt (String text) { return (RtTag) new RtTag().withText(text); } + public static RtTag rt (DomContent... dc) { return (RtTag) new RtTag().with(dc); } + public static RtTag rt (Attr.ShortForm shortAttr) { return (RtTag) Attr.addTo( new RtTag(), shortAttr); } + public static RtTag rt (Attr.ShortForm shortAttr, String text) { return (RtTag) Attr.addTo( new RtTag().withText(text), shortAttr); } + public static RtTag rt (Attr.ShortForm shortAttr, DomContent... dc) { return (RtTag) Attr.addTo( new RtTag().with(dc), shortAttr); } + + public static RubyTag ruby () { return (RubyTag) new RubyTag(); } + public static RubyTag ruby (String text) { return (RubyTag) new RubyTag().withText(text); } + public static RubyTag ruby (DomContent... dc) { return (RubyTag) new RubyTag().with(dc); } + public static RubyTag ruby (Attr.ShortForm shortAttr) { return (RubyTag) Attr.addTo( new RubyTag(), shortAttr); } + public static RubyTag ruby (Attr.ShortForm shortAttr, String text) { return (RubyTag) Attr.addTo( new RubyTag().withText(text), shortAttr); } + public static RubyTag ruby (Attr.ShortForm shortAttr, DomContent... dc) { return (RubyTag) Attr.addTo( new RubyTag().with(dc), shortAttr); } + + public static STag s () { return (STag) new STag(); } + public static STag s (String text) { return (STag) new STag().withText(text); } + public static STag s (DomContent... dc) { return (STag) new STag().with(dc); } + public static STag s (Attr.ShortForm shortAttr) { return (STag) Attr.addTo( new STag(), shortAttr); } + public static STag s (Attr.ShortForm shortAttr, String text) { return (STag) Attr.addTo( new STag().withText(text), shortAttr); } + public static STag s (Attr.ShortForm shortAttr, DomContent... dc) { return (STag) Attr.addTo( new STag().with(dc), shortAttr); } + + public static SampTag samp () { return (SampTag) new SampTag(); } + public static SampTag samp (String text) { return (SampTag) new SampTag().withText(text); } + public static SampTag samp (DomContent... dc) { return (SampTag) new SampTag().with(dc); } + public static SampTag samp (Attr.ShortForm shortAttr) { return (SampTag) Attr.addTo( new SampTag(), shortAttr); } + public static SampTag samp (Attr.ShortForm shortAttr, String text) { return (SampTag) Attr.addTo( new SampTag().withText(text), shortAttr); } + public static SampTag samp (Attr.ShortForm shortAttr, DomContent... dc) { return (SampTag) Attr.addTo( new SampTag().with(dc), shortAttr); } + + public static ScriptTag script () { return (ScriptTag) new ScriptTag(); } + public static ScriptTag script (String text) { return (ScriptTag) new ScriptTag().withText(text); } + public static ScriptTag script (DomContent... dc) { return (ScriptTag) new ScriptTag().with(dc); } + public static ScriptTag script (Attr.ShortForm shortAttr) { return (ScriptTag) Attr.addTo( new ScriptTag(), shortAttr); } + public static ScriptTag script (Attr.ShortForm shortAttr, String text) { return (ScriptTag) Attr.addTo( new ScriptTag().withText(text), shortAttr); } + public static ScriptTag script (Attr.ShortForm shortAttr, DomContent... dc) { return (ScriptTag) Attr.addTo( new ScriptTag().with(dc), shortAttr); } + + public static SectionTag section () { return (SectionTag) new SectionTag(); } + public static SectionTag section (String text) { return (SectionTag) new SectionTag().withText(text); } + public static SectionTag section (DomContent... dc) { return (SectionTag) new SectionTag().with(dc); } + public static SectionTag section (Attr.ShortForm shortAttr) { return (SectionTag) Attr.addTo( new SectionTag(), shortAttr); } + public static SectionTag section (Attr.ShortForm shortAttr, String text) { return (SectionTag) Attr.addTo( new SectionTag().withText(text), shortAttr); } + public static SectionTag section (Attr.ShortForm shortAttr, DomContent... dc) { return (SectionTag) Attr.addTo( new SectionTag().with(dc), shortAttr); } + + public static SelectTag select () { return (SelectTag) new SelectTag(); } + public static SelectTag select (String text) { return (SelectTag) new SelectTag().withText(text); } + public static SelectTag select (DomContent... dc) { return (SelectTag) new SelectTag().with(dc); } + public static SelectTag select (Attr.ShortForm shortAttr) { return (SelectTag) Attr.addTo( new SelectTag(), shortAttr); } + public static SelectTag select (Attr.ShortForm shortAttr, String text) { return (SelectTag) Attr.addTo( new SelectTag().withText(text), shortAttr); } + public static SelectTag select (Attr.ShortForm shortAttr, DomContent... dc) { return (SelectTag) Attr.addTo( new SelectTag().with(dc), shortAttr); } + + public static SmallTag small () { return (SmallTag) new SmallTag(); } + public static SmallTag small (String text) { return (SmallTag) new SmallTag().withText(text); } + public static SmallTag small (DomContent... dc) { return (SmallTag) new SmallTag().with(dc); } + public static SmallTag small (Attr.ShortForm shortAttr) { return (SmallTag) Attr.addTo( new SmallTag(), shortAttr); } + public static SmallTag small (Attr.ShortForm shortAttr, String text) { return (SmallTag) Attr.addTo( new SmallTag().withText(text), shortAttr); } + public static SmallTag small (Attr.ShortForm shortAttr, DomContent... dc) { return (SmallTag) Attr.addTo( new SmallTag().with(dc), shortAttr); } + + public static SpanTag span () { return (SpanTag) new SpanTag(); } + public static SpanTag span (String text) { return (SpanTag) new SpanTag().withText(text); } + public static SpanTag span (DomContent... dc) { return (SpanTag) new SpanTag().with(dc); } + public static SpanTag span (Attr.ShortForm shortAttr) { return (SpanTag) Attr.addTo( new SpanTag(), shortAttr); } + public static SpanTag span (Attr.ShortForm shortAttr, String text) { return (SpanTag) Attr.addTo( new SpanTag().withText(text), shortAttr); } + public static SpanTag span (Attr.ShortForm shortAttr, DomContent... dc) { return (SpanTag) Attr.addTo( new SpanTag().with(dc), shortAttr); } + + public static StrongTag strong () { return (StrongTag) new StrongTag(); } + public static StrongTag strong (String text) { return (StrongTag) new StrongTag().withText(text); } + public static StrongTag strong (DomContent... dc) { return (StrongTag) new StrongTag().with(dc); } + public static StrongTag strong (Attr.ShortForm shortAttr) { return (StrongTag) Attr.addTo( new StrongTag(), shortAttr); } + public static StrongTag strong (Attr.ShortForm shortAttr, String text) { return (StrongTag) Attr.addTo( new StrongTag().withText(text), shortAttr); } + public static StrongTag strong (Attr.ShortForm shortAttr, DomContent... dc) { return (StrongTag) Attr.addTo( new StrongTag().with(dc), shortAttr); } + + public static StyleTag style () { return (StyleTag) new StyleTag(); } + public static StyleTag style (String text) { return (StyleTag) new StyleTag().withText(text); } + public static StyleTag style (DomContent... dc) { return (StyleTag) new StyleTag().with(dc); } + public static StyleTag style (Attr.ShortForm shortAttr) { return (StyleTag) Attr.addTo( new StyleTag(), shortAttr); } + public static StyleTag style (Attr.ShortForm shortAttr, String text) { return (StyleTag) Attr.addTo( new StyleTag().withText(text), shortAttr); } + public static StyleTag style (Attr.ShortForm shortAttr, DomContent... dc) { return (StyleTag) Attr.addTo( new StyleTag().with(dc), shortAttr); } + + public static SubTag sub () { return (SubTag) new SubTag(); } + public static SubTag sub (String text) { return (SubTag) new SubTag().withText(text); } + public static SubTag sub (DomContent... dc) { return (SubTag) new SubTag().with(dc); } + public static SubTag sub (Attr.ShortForm shortAttr) { return (SubTag) Attr.addTo( new SubTag(), shortAttr); } + public static SubTag sub (Attr.ShortForm shortAttr, String text) { return (SubTag) Attr.addTo( new SubTag().withText(text), shortAttr); } + public static SubTag sub (Attr.ShortForm shortAttr, DomContent... dc) { return (SubTag) Attr.addTo( new SubTag().with(dc), shortAttr); } + + public static SummaryTag summary () { return (SummaryTag) new SummaryTag(); } + public static SummaryTag summary (String text) { return (SummaryTag) new SummaryTag().withText(text); } + public static SummaryTag summary (DomContent... dc) { return (SummaryTag) new SummaryTag().with(dc); } + public static SummaryTag summary (Attr.ShortForm shortAttr) { return (SummaryTag) Attr.addTo( new SummaryTag(), shortAttr); } + public static SummaryTag summary (Attr.ShortForm shortAttr, String text) { return (SummaryTag) Attr.addTo( new SummaryTag().withText(text), shortAttr); } + public static SummaryTag summary (Attr.ShortForm shortAttr, DomContent... dc) { return (SummaryTag) Attr.addTo( new SummaryTag().with(dc), shortAttr); } + + public static SupTag sup () { return (SupTag) new SupTag(); } + public static SupTag sup (String text) { return (SupTag) new SupTag().withText(text); } + public static SupTag sup (DomContent... dc) { return (SupTag) new SupTag().with(dc); } + public static SupTag sup (Attr.ShortForm shortAttr) { return (SupTag) Attr.addTo( new SupTag(), shortAttr); } + public static SupTag sup (Attr.ShortForm shortAttr, String text) { return (SupTag) Attr.addTo( new SupTag().withText(text), shortAttr); } + public static SupTag sup (Attr.ShortForm shortAttr, DomContent... dc) { return (SupTag) Attr.addTo( new SupTag().with(dc), shortAttr); } + + public static TableTag table () { return (TableTag) new TableTag(); } + public static TableTag table (String text) { return (TableTag) new TableTag().withText(text); } + public static TableTag table (DomContent... dc) { return (TableTag) new TableTag().with(dc); } + public static TableTag table (Attr.ShortForm shortAttr) { return (TableTag) Attr.addTo( new TableTag(), shortAttr); } + public static TableTag table (Attr.ShortForm shortAttr, String text) { return (TableTag) Attr.addTo( new TableTag().withText(text), shortAttr); } + public static TableTag table (Attr.ShortForm shortAttr, DomContent... dc) { return (TableTag) Attr.addTo( new TableTag().with(dc), shortAttr); } + + public static TbodyTag tbody () { return (TbodyTag) new TbodyTag(); } + public static TbodyTag tbody (String text) { return (TbodyTag) new TbodyTag().withText(text); } + public static TbodyTag tbody (DomContent... dc) { return (TbodyTag) new TbodyTag().with(dc); } + public static TbodyTag tbody (Attr.ShortForm shortAttr) { return (TbodyTag) Attr.addTo( new TbodyTag(), shortAttr); } + public static TbodyTag tbody (Attr.ShortForm shortAttr, String text) { return (TbodyTag) Attr.addTo( new TbodyTag().withText(text), shortAttr); } + public static TbodyTag tbody (Attr.ShortForm shortAttr, DomContent... dc) { return (TbodyTag) Attr.addTo( new TbodyTag().with(dc), shortAttr); } + + public static TdTag td () { return (TdTag) new TdTag(); } + public static TdTag td (String text) { return (TdTag) new TdTag().withText(text); } + public static TdTag td (DomContent... dc) { return (TdTag) new TdTag().with(dc); } + public static TdTag td (Attr.ShortForm shortAttr) { return (TdTag) Attr.addTo( new TdTag(), shortAttr); } + public static TdTag td (Attr.ShortForm shortAttr, String text) { return (TdTag) Attr.addTo( new TdTag().withText(text), shortAttr); } + public static TdTag td (Attr.ShortForm shortAttr, DomContent... dc) { return (TdTag) Attr.addTo( new TdTag().with(dc), shortAttr); } + + public static TextareaTag textarea () { return (TextareaTag) new TextareaTag(); } + public static TextareaTag textarea (String text) { return (TextareaTag) new TextareaTag().withText(text); } + public static TextareaTag textarea (DomContent... dc) { return (TextareaTag) new TextareaTag().with(dc); } + public static TextareaTag textarea (Attr.ShortForm shortAttr) { return (TextareaTag) Attr.addTo( new TextareaTag(), shortAttr); } + public static TextareaTag textarea (Attr.ShortForm shortAttr, String text) { return (TextareaTag) Attr.addTo( new TextareaTag().withText(text), shortAttr); } + public static TextareaTag textarea (Attr.ShortForm shortAttr, DomContent... dc) { return (TextareaTag) Attr.addTo( new TextareaTag().with(dc), shortAttr); } + + public static TfootTag tfoot () { return (TfootTag) new TfootTag(); } + public static TfootTag tfoot (String text) { return (TfootTag) new TfootTag().withText(text); } + public static TfootTag tfoot (DomContent... dc) { return (TfootTag) new TfootTag().with(dc); } + public static TfootTag tfoot (Attr.ShortForm shortAttr) { return (TfootTag) Attr.addTo( new TfootTag(), shortAttr); } + public static TfootTag tfoot (Attr.ShortForm shortAttr, String text) { return (TfootTag) Attr.addTo( new TfootTag().withText(text), shortAttr); } + public static TfootTag tfoot (Attr.ShortForm shortAttr, DomContent... dc) { return (TfootTag) Attr.addTo( new TfootTag().with(dc), shortAttr); } + + public static ThTag th () { return (ThTag) new ThTag(); } + public static ThTag th (String text) { return (ThTag) new ThTag().withText(text); } + public static ThTag th (DomContent... dc) { return (ThTag) new ThTag().with(dc); } + public static ThTag th (Attr.ShortForm shortAttr) { return (ThTag) Attr.addTo( new ThTag(), shortAttr); } + public static ThTag th (Attr.ShortForm shortAttr, String text) { return (ThTag) Attr.addTo( new ThTag().withText(text), shortAttr); } + public static ThTag th (Attr.ShortForm shortAttr, DomContent... dc) { return (ThTag) Attr.addTo( new ThTag().with(dc), shortAttr); } + + public static TheadTag thead () { return (TheadTag) new TheadTag(); } + public static TheadTag thead (String text) { return (TheadTag) new TheadTag().withText(text); } + public static TheadTag thead (DomContent... dc) { return (TheadTag) new TheadTag().with(dc); } + public static TheadTag thead (Attr.ShortForm shortAttr) { return (TheadTag) Attr.addTo( new TheadTag(), shortAttr); } + public static TheadTag thead (Attr.ShortForm shortAttr, String text) { return (TheadTag) Attr.addTo( new TheadTag().withText(text), shortAttr); } + public static TheadTag thead (Attr.ShortForm shortAttr, DomContent... dc) { return (TheadTag) Attr.addTo( new TheadTag().with(dc), shortAttr); } + + public static TimeTag time () { return (TimeTag) new TimeTag(); } + public static TimeTag time (String text) { return (TimeTag) new TimeTag().withText(text); } + public static TimeTag time (DomContent... dc) { return (TimeTag) new TimeTag().with(dc); } + public static TimeTag time (Attr.ShortForm shortAttr) { return (TimeTag) Attr.addTo( new TimeTag(), shortAttr); } + public static TimeTag time (Attr.ShortForm shortAttr, String text) { return (TimeTag) Attr.addTo( new TimeTag().withText(text), shortAttr); } + public static TimeTag time (Attr.ShortForm shortAttr, DomContent... dc) { return (TimeTag) Attr.addTo( new TimeTag().with(dc), shortAttr); } + + public static TitleTag title () { return (TitleTag) new TitleTag(); } + public static TitleTag title (String text) { return (TitleTag) new TitleTag().withText(text); } + public static TitleTag title (DomContent... dc) { return (TitleTag) new TitleTag().with(dc); } + public static TitleTag title (Attr.ShortForm shortAttr) { return (TitleTag) Attr.addTo( new TitleTag(), shortAttr); } + public static TitleTag title (Attr.ShortForm shortAttr, String text) { return (TitleTag) Attr.addTo( new TitleTag().withText(text), shortAttr); } + public static TitleTag title (Attr.ShortForm shortAttr, DomContent... dc) { return (TitleTag) Attr.addTo( new TitleTag().with(dc), shortAttr); } + + public static TrTag tr () { return (TrTag) new TrTag(); } + public static TrTag tr (String text) { return (TrTag) new TrTag().withText(text); } + public static TrTag tr (DomContent... dc) { return (TrTag) new TrTag().with(dc); } + public static TrTag tr (Attr.ShortForm shortAttr) { return (TrTag) Attr.addTo( new TrTag(), shortAttr); } + public static TrTag tr (Attr.ShortForm shortAttr, String text) { return (TrTag) Attr.addTo( new TrTag().withText(text), shortAttr); } + public static TrTag tr (Attr.ShortForm shortAttr, DomContent... dc) { return (TrTag) Attr.addTo( new TrTag().with(dc), shortAttr); } + + public static UTag u () { return (UTag) new UTag(); } + public static UTag u (String text) { return (UTag) new UTag().withText(text); } + public static UTag u (DomContent... dc) { return (UTag) new UTag().with(dc); } + public static UTag u (Attr.ShortForm shortAttr) { return (UTag) Attr.addTo( new UTag(), shortAttr); } + public static UTag u (Attr.ShortForm shortAttr, String text) { return (UTag) Attr.addTo( new UTag().withText(text), shortAttr); } + public static UTag u (Attr.ShortForm shortAttr, DomContent... dc) { return (UTag) Attr.addTo( new UTag().with(dc), shortAttr); } + + public static UlTag ul () { return (UlTag) new UlTag(); } + public static UlTag ul (String text) { return (UlTag) new UlTag().withText(text); } + public static UlTag ul (DomContent... dc) { return (UlTag) new UlTag().with(dc); } + public static UlTag ul (Attr.ShortForm shortAttr) { return (UlTag) Attr.addTo( new UlTag(), shortAttr); } + public static UlTag ul (Attr.ShortForm shortAttr, String text) { return (UlTag) Attr.addTo( new UlTag().withText(text), shortAttr); } + public static UlTag ul (Attr.ShortForm shortAttr, DomContent... dc) { return (UlTag) Attr.addTo( new UlTag().with(dc), shortAttr); } + + public static VarTag var () { return (VarTag) new VarTag(); } + public static VarTag var (String text) { return (VarTag) new VarTag().withText(text); } + public static VarTag var (DomContent... dc) { return (VarTag) new VarTag().with(dc); } + public static VarTag var (Attr.ShortForm shortAttr) { return (VarTag) Attr.addTo( new VarTag(), shortAttr); } + public static VarTag var (Attr.ShortForm shortAttr, String text) { return (VarTag) Attr.addTo( new VarTag().withText(text), shortAttr); } + public static VarTag var (Attr.ShortForm shortAttr, DomContent... dc) { return (VarTag) Attr.addTo( new VarTag().with(dc), shortAttr); } + + public static VideoTag video () { return (VideoTag) new VideoTag(); } + public static VideoTag video (String text) { return (VideoTag) new VideoTag().withText(text); } + public static VideoTag video (DomContent... dc) { return (VideoTag) new VideoTag().with(dc); } + public static VideoTag video (Attr.ShortForm shortAttr) { return (VideoTag) Attr.addTo( new VideoTag(), shortAttr); } + public static VideoTag video (Attr.ShortForm shortAttr, String text) { return (VideoTag) Attr.addTo( new VideoTag().withText(text), shortAttr); } + public static VideoTag video (Attr.ShortForm shortAttr, DomContent... dc) { return (VideoTag) Attr.addTo( new VideoTag().with(dc), shortAttr); } } diff --git a/src/main/java/j2html/attributes/Attr.java b/src/main/java/j2html/attributes/Attr.java index 5e5b95b5..c049b2c9 100644 --- a/src/main/java/j2html/attributes/Attr.java +++ b/src/main/java/j2html/attributes/Attr.java @@ -114,6 +114,7 @@ public abstract class Attr { public static final String VALUE = "value"; public static final String WIDTH = "width"; public static final String WRAP = "wrap"; + public static final String TRANSLATE = "translate"; public static ShortForm shortFormFromAttrsString(String attrs) { if (!attrs.contains(".") && !attrs.contains(("#"))) { diff --git a/src/main/java/j2html/tags/ContainerTag.java b/src/main/java/j2html/tags/ContainerTag.java index fd8956c8..055cf07d 100644 --- a/src/main/java/j2html/tags/ContainerTag.java +++ b/src/main/java/j2html/tags/ContainerTag.java @@ -6,7 +6,8 @@ import java.util.List; import java.util.stream.Stream; -public class ContainerTag extends Tag { +public class ContainerTag> extends Tag { +//public class ContainerTag extends Tag { private List children; @@ -22,15 +23,15 @@ public ContainerTag(String tagName) { * @param child DomContent-object to be appended * @return itself for easy chaining */ - public ContainerTag with(DomContent child) { + public T with(DomContent child) { if (this == child) { throw new RuntimeException("Cannot append a tag to itself."); } if (child == null) { - return this; // in some cases, like when using iff(), we ignore null children + return (T)this; // in some cases, like when using iff(), we ignore null children } children.add(child); - return this; + return (T)this; } @@ -42,8 +43,8 @@ public ContainerTag with(DomContent child) { * @param child DomContent-object to be appended if condition met * @return itself for easy chaining */ - public ContainerTag condWith(boolean condition, DomContent child) { - return condition ? this.with(child) : this; + public T condWith(boolean condition, DomContent child) { + return condition ? this.with(child) : (T)this; } @@ -53,13 +54,13 @@ public ContainerTag condWith(boolean condition, DomContent child) { * @param children DomContent-objects to be appended * @return itself for easy chaining */ - public ContainerTag with(Iterable children) { + public T with(Iterable children) { if (children != null) { for (DomContent child : children) { this.with(child); } } - return this; + return (T)this; } @@ -71,8 +72,8 @@ public ContainerTag with(Iterable children) { * @param children DomContent-objects to be appended if condition met * @return itself for easy chaining */ - public ContainerTag condWith(boolean condition, Iterable children) { - return condition ? this.with(children) : this; + public T condWith(boolean condition, Iterable children) { + return condition ? this.with(children) : (T)this; } @@ -82,11 +83,11 @@ public ContainerTag condWith(boolean condition, Iterable c * @param children DomContent-objects to be appended * @return itself for easy chaining */ - public ContainerTag with(DomContent... children) { + public T with(DomContent... children) { for (DomContent child : children) { with(child); } - return this; + return (T)this; } @@ -96,9 +97,9 @@ public ContainerTag with(DomContent... children) { * @param children Stream of DomContent-objects to be appended * @return itself for easy chaining */ - public ContainerTag with(Stream children) { + public T with(Stream children) { children.forEach(this::with); - return this; + return (T)this; } @@ -110,8 +111,8 @@ public ContainerTag with(Stream children) { * @param children DomContent-objects to be appended if condition met * @return itself for easy chaining */ - public ContainerTag condWith(boolean condition, DomContent... children) { - return condition ? this.with(children) : this; + public T condWith(boolean condition, DomContent... children) { + return condition ? this.with(children) : (T)this; } @@ -121,7 +122,7 @@ public ContainerTag condWith(boolean condition, DomContent... children) { * @param text the text to be appended * @return itself for easy chaining */ - public ContainerTag withText(String text) { + public T withText(String text) { return with(new Text(text)); } diff --git a/src/main/java/j2html/tags/EmptyTag.java b/src/main/java/j2html/tags/EmptyTag.java index 7dd63f49..88a42e0b 100644 --- a/src/main/java/j2html/tags/EmptyTag.java +++ b/src/main/java/j2html/tags/EmptyTag.java @@ -4,7 +4,8 @@ import j2html.attributes.Attribute; import java.io.IOException; -public class EmptyTag extends Tag { +public class EmptyTag> extends Tag { +//public class EmptyTag extends Tag { public EmptyTag(String tagName) { super(tagName); diff --git a/src/main/java/j2html/tags/Tag.java b/src/main/java/j2html/tags/Tag.java index 13e87a09..dce75358 100644 --- a/src/main/java/j2html/tags/Tag.java +++ b/src/main/java/j2html/tags/Tag.java @@ -157,203 +157,82 @@ public T withClasses(String... classes) { return attr(Attr.CLASS, sb.toString().trim()); } - public T isAutoComplete() { - return attr(Attr.AUTOCOMPLETE, null); - } - - public T isAutoFocus() { - return attr(Attr.AUTOFOCUS, null); - } - - public T isHidden() { - return attr(Attr.HIDDEN, null); - } - - public T isRequired() { - return attr(Attr.REQUIRED, null); - } - - public T withAlt(String alt) { - return attr(Attr.ALT, alt); - } - - public T withAction(String action) { - return attr(Attr.ACTION, action); - } - - public T withCharset(String charset) { - return attr(Attr.CHARSET, charset); - } - - public T withClass(String className) { - return attr(Attr.CLASS, className); - } - - public T withContent(String content) { - return attr(Attr.CONTENT, content); - } - - public T withDir(String dir) { - return attr(Attr.DIR, dir); - } - - public T withHref(String href) { - return attr(Attr.HREF, href); - } - - public T withId(String id) { - return attr(Attr.ID, id); - } - - public T withData(String dataAttr, String value) { - return attr(Attr.DATA + "-" + dataAttr, value); - } - - public T withLang(String lang) { - return attr(Attr.LANG, lang); - } - - public T withMethod(String method) { - return attr(Attr.METHOD, method); - } - - public T withName(String name) { - return attr(Attr.NAME, name); - } - - public T withPlaceholder(String placeholder) { - return attr(Attr.PLACEHOLDER, placeholder); - } - - public T withTarget(String target) { - return attr(Attr.TARGET, target); - } - - public T withTitle(String title) { - return attr(Attr.TITLE, title); - } - - public T withType(String type) { - return attr(Attr.TYPE, type); - } - - public T withRel(String rel) { - return attr(Attr.REL, rel); - } - - public T withRole(String role) { - return attr(Attr.ROLE, role); - } + /* + Tag.java contains all Global Attributes, Attributes which are + valid on all HTML Tags. Reference: + https://www.w3schools.com/tags/ref_standardattributes.asp + Attributes: + + accesskey + class + contenteditable + data-* + dir + draggable + hidden + id + lang + spellcheck + style + tabindex + title + translate + */ - public T withSrc(String src) { - return attr(Attr.SRC, src); - } + public T withAccesskey(String accesskey){ return attr(Attr.ACCESSKEY, accesskey); } - public T withStyle(String style) { - return attr(Attr.STYLE, style); - } + public T withClass(String className) { return attr(Attr.CLASS, className); } - public T withStep(String step) { - return attr(Attr.STEP, step); - } + public T isContenteditable(){ return attr(Attr.CONTENTEDITABLE, "true"); } - public T withValue(String value) { - return attr(Attr.VALUE, value); - } + public T withData(String dataAttr, String value) { return attr(Attr.DATA + "-" + dataAttr, value); } - public T withCondAutoComplete(boolean condition) { - return condAttr(condition, Attr.AUTOCOMPLETE, null); - } + public T withDir(String dir) { return attr(Attr.DIR, dir); } - public T withCondAutoFocus(boolean condition) { - return condAttr(condition, Attr.AUTOFOCUS, null); - } + public T isDraggable(){ return attr(Attr.DRAGGABLE, "true"); } - public T withCondHidden(boolean condition) { - return condAttr(condition, Attr.HIDDEN, null); - } + public T isHidden() { return attr(Attr.HIDDEN, null); } - public T withCondRequired(boolean condition) { - return condAttr(condition, Attr.REQUIRED, null); - } + public T withId(String id) { return attr(Attr.ID, id); } - public T withCondAlt(boolean condition, String alt) { - return condAttr(condition, Attr.ALT, alt); - } + public T withLang(String lang) { return attr(Attr.LANG, lang); } - public T withCondAction(boolean condition, String action) { - return condAttr(condition, Attr.ACTION, action); - } + public T isSpellcheck(){ return attr(Attr.SPELLCHECK, "true"); } - public T withCharset(boolean condition, String charset) { - return condAttr(condition, Attr.CHARSET, charset); - } + public T withStyle(String style) { return attr(Attr.STYLE, style); } - public T withCondClass(boolean condition, String className) { - return condAttr(condition, Attr.CLASS, className); - } + public T withTabindex(int index){ return attr(Attr.TABINDEX, index); } - public T withCondContent(boolean condition, String content) { - return condAttr(condition, Attr.CONTENT, content); - } + public T withTitle(String title) { return attr(Attr.TITLE, title); } - public T withCondDir(boolean condition, String dir) { - return condAttr(condition, Attr.DIR, dir); - } + public T isTranslate(){ return attr(Attr.TRANSLATE, "yes"); } - public T withCondHref(boolean condition, String href) { - return condAttr(condition, Attr.HREF, href); - } + // ----- start of withCond$ATTR variants ----- + public T withCondAccessKey(boolean condition, String accesskey){ return condAttr(condition, Attr.ACCESSKEY, accesskey); } - public T withCondId(boolean condition, String id) { - return condAttr(condition, Attr.ID, id); - } + public T withCondClass(boolean condition, String className) { return condAttr(condition, Attr.CLASS, className); } - public T withCondData(boolean condition, String dataAttr, String value) { - return condAttr(condition, Attr.DATA + "-" + dataAttr, value); - } + public T withCondContenteditable(boolean condition){ return attr(Attr.CONTENTEDITABLE, (condition)?"true":"false");} - public T withCondLang(boolean condition, String lang) { - return condAttr(condition, Attr.LANG, lang); - } + public T withCondData(boolean condition, String dataAttr, String value) { return condAttr(condition, Attr.DATA + "-" + dataAttr, value); } - public T withCondMethod(boolean condition, String method) { - return condAttr(condition, Attr.METHOD, method); - } + public T withCondDir(boolean condition, String dir) { return condAttr(condition, Attr.DIR, dir); } - public T withCondName(boolean condition, String name) { - return condAttr(condition, Attr.NAME, name); - } + public T withCondDraggable(boolean condition){ return attr(Attr.DRAGGABLE, (condition)?"true":"false"); } - public T withCondPlaceholder(boolean condition, String placeholder) { - return condAttr(condition, Attr.PLACEHOLDER, placeholder); - } + public T withCondHidden(boolean condition) { return condAttr(condition, Attr.HIDDEN, null); } - public T withCondTarget(boolean condition, String target) { - return condAttr(condition, Attr.TARGET, target); - } + public T withCondId(boolean condition, String id) { return condAttr(condition, Attr.ID, id); } - public T withCondTitle(boolean condition, String title) { - return condAttr(condition, Attr.TITLE, title); - } + public T withCondLang(boolean condition, String lang) { return condAttr(condition, Attr.LANG, lang); } - public T withCondType(boolean condition, String type) { - return condAttr(condition, Attr.TYPE, type); - } + public T withCondSpellcheck(boolean condition){ return attr(Attr.SPELLCHECK, (condition)?"true":"false"); } - public T withCondRel(boolean condition, String rel) { - return condAttr(condition, Attr.REL, rel); - } + public T withCondStyle(boolean condition, String style) { return condAttr(condition, Attr.STYLE, style); } - public T withCondSrc(boolean condition, String src) { - return condAttr(condition, Attr.SRC, src); - } + public T withCondTabindex(boolean condition, int index){ return condAttr(condition, Attr.TABINDEX, index+""); } - public T withCondStyle(boolean condition, String style) { - return condAttr(condition, Attr.STYLE, style); - } + public T withCondTitle(boolean condition, String title) { return condAttr(condition, Attr.TITLE, title); } - public T withCondValue(boolean condition, String value) { - return condAttr(condition, Attr.VALUE, value); - } + public T withCondTranslate(boolean condition){ return attr(Attr.TRANSLATE, (condition)?"yes":"no"); } } diff --git a/src/main/java/j2html/tags/attributes/IAccept.java b/src/main/java/j2html/tags/attributes/IAccept.java new file mode 100644 index 00000000..6c8f645e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAccept.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAccept extends IInstance { + default T withAccept(final String accept_) { + get().attr("accept", accept_); + return get(); + } + + default T withCondAccept(final boolean enable, final String accept_) { + if (enable) { + get().attr("accept", accept_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IAction.java b/src/main/java/j2html/tags/attributes/IAction.java new file mode 100644 index 00000000..43c45d2a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAction.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAction extends IInstance { + default T withAction(final String action_) { + get().attr("action", action_); + return get(); + } + + default T withCondAction(final boolean enable, final String action_) { + if (enable) { + get().attr("action", action_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IAlt.java b/src/main/java/j2html/tags/attributes/IAlt.java new file mode 100644 index 00000000..a3ef8c33 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAlt.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAlt extends IInstance { + default T withAlt(final String alt_) { + get().attr("alt", alt_); + return get(); + } + + default T withCondAlt(final boolean enable, final String alt_) { + if (enable) { + get().attr("alt", alt_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IAsync.java b/src/main/java/j2html/tags/attributes/IAsync.java new file mode 100644 index 00000000..f6125267 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAsync.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAsync extends IInstance { + default T isAsync() { + get().attr("async"); + return get(); + } + + default T withCondAsync(final boolean enable) { + if (enable) { + get().attr("async"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IAutocomplete.java b/src/main/java/j2html/tags/attributes/IAutocomplete.java new file mode 100644 index 00000000..ae3709f2 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAutocomplete.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAutocomplete extends IInstance { + default T isAutocomplete() { + get().attr("autocomplete", "on"); + return get(); + } + + default T withCondAutocomplete(final boolean enable) { + if (enable) { + get().attr("autocomplete", "on"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IAutofocus.java b/src/main/java/j2html/tags/attributes/IAutofocus.java new file mode 100644 index 00000000..a0dee978 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAutofocus.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAutofocus extends IInstance { + default T isAutofocus() { + get().attr("autofocus"); + return get(); + } + + default T withCondAutofocus(final boolean enable) { + if (enable) { + get().attr("autofocus"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IAutoplay.java b/src/main/java/j2html/tags/attributes/IAutoplay.java new file mode 100644 index 00000000..f200f047 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IAutoplay.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IAutoplay extends IInstance { + default T isAutoplay() { + get().attr("autoplay"); + return get(); + } + + default T withCondAutoplay(final boolean enable) { + if (enable) { + get().attr("autoplay"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ICharset.java b/src/main/java/j2html/tags/attributes/ICharset.java new file mode 100644 index 00000000..a7817eca --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ICharset.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ICharset extends IInstance { + default T withCharset(final String charset_) { + get().attr("charset", charset_); + return get(); + } + + default T withCondCharset(final boolean enable, final String charset_) { + if (enable) { + get().attr("charset", charset_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IChecked.java b/src/main/java/j2html/tags/attributes/IChecked.java new file mode 100644 index 00000000..c2a4d13d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IChecked.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IChecked extends IInstance { + default T isChecked() { + get().attr("checked"); + return get(); + } + + default T withCondChecked(final boolean enable) { + if (enable) { + get().attr("checked"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ICite.java b/src/main/java/j2html/tags/attributes/ICite.java new file mode 100644 index 00000000..cba8f8db --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ICite.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ICite extends IInstance { + default T withCite(final String cite_) { + get().attr("cite", cite_); + return get(); + } + + default T withCondCite(final boolean enable, final String cite_) { + if (enable) { + get().attr("cite", cite_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ICols.java b/src/main/java/j2html/tags/attributes/ICols.java new file mode 100644 index 00000000..da167239 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ICols.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ICols extends IInstance { + default T withCols(final String cols_) { + get().attr("cols", cols_); + return get(); + } + + default T withCondCols(final boolean enable, final String cols_) { + if (enable) { + get().attr("cols", cols_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IColspan.java b/src/main/java/j2html/tags/attributes/IColspan.java new file mode 100644 index 00000000..b7411e7d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IColspan.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IColspan extends IInstance { + default T withColspan(final String colspan_) { + get().attr("colspan", colspan_); + return get(); + } + + default T withCondColspan(final boolean enable, final String colspan_) { + if (enable) { + get().attr("colspan", colspan_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IContent.java b/src/main/java/j2html/tags/attributes/IContent.java new file mode 100644 index 00000000..9b1eb945 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IContent.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IContent extends IInstance { + default T withContent(final String content_) { + get().attr("content", content_); + return get(); + } + + default T withCondContent(final boolean enable, final String content_) { + if (enable) { + get().attr("content", content_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IControls.java b/src/main/java/j2html/tags/attributes/IControls.java new file mode 100644 index 00000000..920a870f --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IControls.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IControls extends IInstance { + default T isControls() { + get().attr("controls"); + return get(); + } + + default T withCondControls(final boolean enable) { + if (enable) { + get().attr("controls"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ICoords.java b/src/main/java/j2html/tags/attributes/ICoords.java new file mode 100644 index 00000000..f37ea43a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ICoords.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ICoords extends IInstance { + default T withCoords(final String coords_) { + get().attr("coords", coords_); + return get(); + } + + default T withCondCoords(final boolean enable, final String coords_) { + if (enable) { + get().attr("coords", coords_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IData.java b/src/main/java/j2html/tags/attributes/IData.java new file mode 100644 index 00000000..c01ad755 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IData.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IData extends IInstance { + default T withData(final String data_) { + get().attr("data", data_); + return get(); + } + + default T withCondData(final boolean enable, final String data_) { + if (enable) { + get().attr("data", data_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IDatetime.java b/src/main/java/j2html/tags/attributes/IDatetime.java new file mode 100644 index 00000000..fa4e3e6a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IDatetime.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IDatetime extends IInstance { + default T withDatetime(final String datetime_) { + get().attr("datetime", datetime_); + return get(); + } + + default T withCondDatetime(final boolean enable, final String datetime_) { + if (enable) { + get().attr("datetime", datetime_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IDefault.java b/src/main/java/j2html/tags/attributes/IDefault.java new file mode 100644 index 00000000..38b3cfb8 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IDefault.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IDefault extends IInstance { + default T isDefault() { + get().attr("default"); + return get(); + } + + default T withCondDefault(final boolean enable) { + if (enable) { + get().attr("default"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IDefer.java b/src/main/java/j2html/tags/attributes/IDefer.java new file mode 100644 index 00000000..1c015c6a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IDefer.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IDefer extends IInstance { + default T isDefer() { + get().attr("defer"); + return get(); + } + + default T withCondDefer(final boolean enable) { + if (enable) { + get().attr("defer"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IDirname.java b/src/main/java/j2html/tags/attributes/IDirname.java new file mode 100644 index 00000000..b3f8c9f9 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IDirname.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IDirname extends IInstance { + default T withDirname(final String dirname_) { + get().attr("dirname", dirname_); + return get(); + } + + default T withCondDirname(final boolean enable, final String dirname_) { + if (enable) { + get().attr("dirname", dirname_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IDisabled.java b/src/main/java/j2html/tags/attributes/IDisabled.java new file mode 100644 index 00000000..be278c07 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IDisabled.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IDisabled extends IInstance { + default T isDisabled() { + get().attr("disabled"); + return get(); + } + + default T withCondDisabled(final boolean enable) { + if (enable) { + get().attr("disabled"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IDownload.java b/src/main/java/j2html/tags/attributes/IDownload.java new file mode 100644 index 00000000..5dac1ef3 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IDownload.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IDownload extends IInstance { + default T isDownload() { + get().attr("download"); + return get(); + } + + default T withCondDownload(final boolean enable) { + if (enable) { + get().attr("download"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IEnctype.java b/src/main/java/j2html/tags/attributes/IEnctype.java new file mode 100644 index 00000000..f65b1f33 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IEnctype.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IEnctype extends IInstance { + default T withEnctype(final String enctype_) { + get().attr("enctype", enctype_); + return get(); + } + + default T withCondEnctype(final boolean enable, final String enctype_) { + if (enable) { + get().attr("enctype", enctype_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IFor.java b/src/main/java/j2html/tags/attributes/IFor.java new file mode 100644 index 00000000..a596699a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IFor.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IFor extends IInstance { + default T withFor(final String for_) { + get().attr("for", for_); + return get(); + } + + default T withCondFor(final boolean enable, final String for_) { + if (enable) { + get().attr("for", for_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IForm.java b/src/main/java/j2html/tags/attributes/IForm.java new file mode 100644 index 00000000..723330de --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IForm.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IForm extends IInstance { + default T withForm(final String form_) { + get().attr("form", form_); + return get(); + } + + default T withCondForm(final boolean enable, final String form_) { + if (enable) { + get().attr("form", form_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IFormAction.java b/src/main/java/j2html/tags/attributes/IFormAction.java new file mode 100644 index 00000000..78678d08 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IFormAction.java @@ -0,0 +1,12 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + + +public interface IFormAction extends IInstance { + + default T withFormAction(String formAction) { + get().attr("formaction", formAction); + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IFormaction.java b/src/main/java/j2html/tags/attributes/IFormaction.java new file mode 100644 index 00000000..2016db2d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IFormaction.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IFormaction extends IInstance { + default T withFormaction(final String formaction_) { + get().attr("formaction", formaction_); + return get(); + } + + default T withCondFormaction(final boolean enable, final String formaction_) { + if (enable) { + get().attr("formaction", formaction_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IHeaders.java b/src/main/java/j2html/tags/attributes/IHeaders.java new file mode 100644 index 00000000..7e4702cc --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IHeaders.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IHeaders extends IInstance { + default T withHeaders(final String headers_) { + get().attr("headers", headers_); + return get(); + } + + default T withCondHeaders(final boolean enable, final String headers_) { + if (enable) { + get().attr("headers", headers_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IHeight.java b/src/main/java/j2html/tags/attributes/IHeight.java new file mode 100644 index 00000000..40e90e41 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IHeight.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IHeight extends IInstance { + default T withHeight(final String height_) { + get().attr("height", height_); + return get(); + } + + default T withCondHeight(final boolean enable, final String height_) { + if (enable) { + get().attr("height", height_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IHigh.java b/src/main/java/j2html/tags/attributes/IHigh.java new file mode 100644 index 00000000..389da6f3 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IHigh.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IHigh extends IInstance { + default T withHigh(final String high_) { + get().attr("high", high_); + return get(); + } + + default T withCondHigh(final boolean enable, final String high_) { + if (enable) { + get().attr("high", high_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IHref.java b/src/main/java/j2html/tags/attributes/IHref.java new file mode 100644 index 00000000..1b1fe8ac --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IHref.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IHref extends IInstance { + default T withHref(final String href_) { + get().attr("href", href_); + return get(); + } + + default T withCondHref(final boolean enable, final String href_) { + if (enable) { + get().attr("href", href_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IHreflang.java b/src/main/java/j2html/tags/attributes/IHreflang.java new file mode 100644 index 00000000..509a49fd --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IHreflang.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IHreflang extends IInstance { + default T withHreflang(final String hreflang_) { + get().attr("hreflang", hreflang_); + return get(); + } + + default T withCondHreflang(final boolean enable, final String hreflang_) { + if (enable) { + get().attr("hreflang", hreflang_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IInstance.java b/src/main/java/j2html/tags/attributes/IInstance.java new file mode 100644 index 00000000..255e7027 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IInstance.java @@ -0,0 +1,19 @@ +package j2html.tags.attributes; + +public interface IInstance { + + //to get the actual instance + // (every implementing class would have to implement: { return this; } + // public T get(); + + // this method shows up in autocomplete. + // this is really undesireable as it does not do anything. + default T get() { + //we know that the implementing class will supply + //its own type as the type argument. + //therefore every instance of IInstance can assume it + //is also of type T + + return (T) this; + } +} diff --git a/src/main/java/j2html/tags/attributes/IIsmap.java b/src/main/java/j2html/tags/attributes/IIsmap.java new file mode 100644 index 00000000..519eca3c --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IIsmap.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IIsmap extends IInstance { + default T isIsmap() { + get().attr("ismap"); + return get(); + } + + default T withCondIsmap(final boolean enable) { + if (enable) { + get().attr("ismap"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IKind.java b/src/main/java/j2html/tags/attributes/IKind.java new file mode 100644 index 00000000..df28a605 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IKind.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IKind extends IInstance { + default T withKind(final String kind_) { + get().attr("kind", kind_); + return get(); + } + + default T withCondKind(final boolean enable, final String kind_) { + if (enable) { + get().attr("kind", kind_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ILabel.java b/src/main/java/j2html/tags/attributes/ILabel.java new file mode 100644 index 00000000..14747c95 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ILabel.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ILabel extends IInstance { + default T withLabel(final String label_) { + get().attr("label", label_); + return get(); + } + + default T withCondLabel(final boolean enable, final String label_) { + if (enable) { + get().attr("label", label_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IList.java b/src/main/java/j2html/tags/attributes/IList.java new file mode 100644 index 00000000..846ea7b5 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IList.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IList extends IInstance { + default T withList(final String list_) { + get().attr("list", list_); + return get(); + } + + default T withCondList(final boolean enable, final String list_) { + if (enable) { + get().attr("list", list_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ILoop.java b/src/main/java/j2html/tags/attributes/ILoop.java new file mode 100644 index 00000000..8df11d46 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ILoop.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ILoop extends IInstance { + default T isLoop() { + get().attr("loop"); + return get(); + } + + default T withCondLoop(final boolean enable) { + if (enable) { + get().attr("loop"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ILow.java b/src/main/java/j2html/tags/attributes/ILow.java new file mode 100644 index 00000000..017372ad --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ILow.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ILow extends IInstance { + default T withLow(final String low_) { + get().attr("low", low_); + return get(); + } + + default T withCondLow(final boolean enable, final String low_) { + if (enable) { + get().attr("low", low_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMax.java b/src/main/java/j2html/tags/attributes/IMax.java new file mode 100644 index 00000000..29a030b4 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMax.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMax extends IInstance { + default T withMax(final String max_) { + get().attr("max", max_); + return get(); + } + + default T withCondMax(final boolean enable, final String max_) { + if (enable) { + get().attr("max", max_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMaxlength.java b/src/main/java/j2html/tags/attributes/IMaxlength.java new file mode 100644 index 00000000..bc337474 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMaxlength.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMaxlength extends IInstance { + default T withMaxlength(final String maxlength_) { + get().attr("maxlength", maxlength_); + return get(); + } + + default T withCondMaxlength(final boolean enable, final String maxlength_) { + if (enable) { + get().attr("maxlength", maxlength_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMedia.java b/src/main/java/j2html/tags/attributes/IMedia.java new file mode 100644 index 00000000..45bdd7a2 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMedia.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMedia extends IInstance { + default T withMedia(final String media_) { + get().attr("media", media_); + return get(); + } + + default T withCondMedia(final boolean enable, final String media_) { + if (enable) { + get().attr("media", media_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMethod.java b/src/main/java/j2html/tags/attributes/IMethod.java new file mode 100644 index 00000000..823e133b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMethod.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMethod extends IInstance { + default T withMethod(final String method_) { + get().attr("method", method_); + return get(); + } + + default T withCondMethod(final boolean enable, final String method_) { + if (enable) { + get().attr("method", method_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMin.java b/src/main/java/j2html/tags/attributes/IMin.java new file mode 100644 index 00000000..95e826f4 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMin.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMin extends IInstance { + default T withMin(final String min_) { + get().attr("min", min_); + return get(); + } + + default T withCondMin(final boolean enable, final String min_) { + if (enable) { + get().attr("min", min_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMultiple.java b/src/main/java/j2html/tags/attributes/IMultiple.java new file mode 100644 index 00000000..821e2b90 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMultiple.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMultiple extends IInstance { + default T isMultiple() { + get().attr("multiple"); + return get(); + } + + default T withCondMultiple(final boolean enable) { + if (enable) { + get().attr("multiple"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IMuted.java b/src/main/java/j2html/tags/attributes/IMuted.java new file mode 100644 index 00000000..adeac8c7 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IMuted.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IMuted extends IInstance { + default T isMuted() { + get().attr("muted"); + return get(); + } + + default T withCondMuted(final boolean enable) { + if (enable) { + get().attr("muted"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IName.java b/src/main/java/j2html/tags/attributes/IName.java new file mode 100644 index 00000000..ac615d7a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IName.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IName extends IInstance { + default T withName(final String name_) { + get().attr("name", name_); + return get(); + } + + default T withCondName(final boolean enable, final String name_) { + if (enable) { + get().attr("name", name_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/INovalidate.java b/src/main/java/j2html/tags/attributes/INovalidate.java new file mode 100644 index 00000000..0dd31452 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/INovalidate.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface INovalidate extends IInstance { + default T isNovalidate() { + get().attr("novalidate"); + return get(); + } + + default T withCondNovalidate(final boolean enable) { + if (enable) { + get().attr("novalidate"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnabort.java b/src/main/java/j2html/tags/attributes/IOnabort.java new file mode 100644 index 00000000..be633222 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnabort.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnabort extends IInstance { + default T withOnabort(final String onabort_) { + get().attr("onabort", onabort_); + return get(); + } + + default T withCondOnabort(final boolean enable, final String onabort_) { + if (enable) { + get().attr("onabort", onabort_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnafterprint.java b/src/main/java/j2html/tags/attributes/IOnafterprint.java new file mode 100644 index 00000000..6d97565e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnafterprint.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnafterprint extends IInstance { + default T withOnafterprint(final String onafterprint_) { + get().attr("onafterprint", onafterprint_); + return get(); + } + + default T withCondOnafterprint(final boolean enable, final String onafterprint_) { + if (enable) { + get().attr("onafterprint", onafterprint_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnbeforeprint.java b/src/main/java/j2html/tags/attributes/IOnbeforeprint.java new file mode 100644 index 00000000..5fd70252 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnbeforeprint.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnbeforeprint extends IInstance { + default T withOnbeforeprint(final String onbeforeprint_) { + get().attr("onbeforeprint", onbeforeprint_); + return get(); + } + + default T withCondOnbeforeprint(final boolean enable, final String onbeforeprint_) { + if (enable) { + get().attr("onbeforeprint", onbeforeprint_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnbeforeunload.java b/src/main/java/j2html/tags/attributes/IOnbeforeunload.java new file mode 100644 index 00000000..08d8ec9e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnbeforeunload.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnbeforeunload extends IInstance { + default T withOnbeforeunload(final String onbeforeunload_) { + get().attr("onbeforeunload", onbeforeunload_); + return get(); + } + + default T withCondOnbeforeunload(final boolean enable, final String onbeforeunload_) { + if (enable) { + get().attr("onbeforeunload", onbeforeunload_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnblur.java b/src/main/java/j2html/tags/attributes/IOnblur.java new file mode 100644 index 00000000..ed3e2dfd --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnblur.java @@ -0,0 +1,10 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnblur extends IInstance { + default T withOnblur(final String onblur_) { + get().attr("onblur", onblur_); + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOncanplay.java b/src/main/java/j2html/tags/attributes/IOncanplay.java new file mode 100644 index 00000000..bb05b461 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOncanplay.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOncanplay extends IInstance { + default T withOncanplay(final String oncanplay_) { + get().attr("oncanplay", oncanplay_); + return get(); + } + + default T withCondOncanplay(final boolean enable, final String oncanplay_) { + if (enable) { + get().attr("oncanplay", oncanplay_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOncanplaythrough.java b/src/main/java/j2html/tags/attributes/IOncanplaythrough.java new file mode 100644 index 00000000..30c905a5 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOncanplaythrough.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOncanplaythrough extends IInstance { + default T withOncanplaythrough(final String oncanplaythrough_) { + get().attr("oncanplaythrough", oncanplaythrough_); + return get(); + } + + default T withCondOncanplaythrough(final boolean enable, final String oncanplaythrough_) { + if (enable) { + get().attr("oncanplaythrough", oncanplaythrough_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOncuechange.java b/src/main/java/j2html/tags/attributes/IOncuechange.java new file mode 100644 index 00000000..5953e88b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOncuechange.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOncuechange extends IInstance { + default T withOncuechange(final String oncuechange_) { + get().attr("oncuechange", oncuechange_); + return get(); + } + + default T withCondOncuechange(final boolean enable, final String oncuechange_) { + if (enable) { + get().attr("oncuechange", oncuechange_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOndurationchange.java b/src/main/java/j2html/tags/attributes/IOndurationchange.java new file mode 100644 index 00000000..07a79cb6 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOndurationchange.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOndurationchange extends IInstance { + default T withOndurationchange(final String ondurationchange_) { + get().attr("ondurationchange", ondurationchange_); + return get(); + } + + default T withCondOndurationchange(final boolean enable, final String ondurationchange_) { + if (enable) { + get().attr("ondurationchange", ondurationchange_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnemptied.java b/src/main/java/j2html/tags/attributes/IOnemptied.java new file mode 100644 index 00000000..f89ab788 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnemptied.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnemptied extends IInstance { + default T withOnemptied(final String onemptied_) { + get().attr("onemptied", onemptied_); + return get(); + } + + default T withCondOnemptied(final boolean enable, final String onemptied_) { + if (enable) { + get().attr("onemptied", onemptied_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnended.java b/src/main/java/j2html/tags/attributes/IOnended.java new file mode 100644 index 00000000..0e143fc3 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnended.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnended extends IInstance { + default T withOnended(final String onended_) { + get().attr("onended", onended_); + return get(); + } + + default T withCondOnended(final boolean enable, final String onended_) { + if (enable) { + get().attr("onended", onended_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnerror.java b/src/main/java/j2html/tags/attributes/IOnerror.java new file mode 100644 index 00000000..737587c1 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnerror.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnerror extends IInstance { + default T withOnerror(final String onerror_) { + get().attr("onerror", onerror_); + return get(); + } + + default T withCondOnerror(final boolean enable, final String onerror_) { + if (enable) { + get().attr("onerror", onerror_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnhashchange.java b/src/main/java/j2html/tags/attributes/IOnhashchange.java new file mode 100644 index 00000000..23f4e767 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnhashchange.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnhashchange extends IInstance { + default T withOnhashchange(final String onhashchange_) { + get().attr("onhashchange", onhashchange_); + return get(); + } + + default T withCondOnhashchange(final boolean enable, final String onhashchange_) { + if (enable) { + get().attr("onhashchange", onhashchange_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnload.java b/src/main/java/j2html/tags/attributes/IOnload.java new file mode 100644 index 00000000..3d9f18b8 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnload.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnload extends IInstance { + default T withOnload(final String onload_) { + get().attr("onload", onload_); + return get(); + } + + default T withCondOnload(final boolean enable, final String onload_) { + if (enable) { + get().attr("onload", onload_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnloadeddata.java b/src/main/java/j2html/tags/attributes/IOnloadeddata.java new file mode 100644 index 00000000..b50f41fc --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnloadeddata.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnloadeddata extends IInstance { + default T withOnloadeddata(final String onloadeddata_) { + get().attr("onloadeddata", onloadeddata_); + return get(); + } + + default T withCondOnloadeddata(final boolean enable, final String onloadeddata_) { + if (enable) { + get().attr("onloadeddata", onloadeddata_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnloadedmetadata.java b/src/main/java/j2html/tags/attributes/IOnloadedmetadata.java new file mode 100644 index 00000000..386e1de6 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnloadedmetadata.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnloadedmetadata extends IInstance { + default T withOnloadedmetadata(final String onloadedmetadata_) { + get().attr("onloadedmetadata", onloadedmetadata_); + return get(); + } + + default T withCondOnloadedmetadata(final boolean enable, final String onloadedmetadata_) { + if (enable) { + get().attr("onloadedmetadata", onloadedmetadata_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnloadstart.java b/src/main/java/j2html/tags/attributes/IOnloadstart.java new file mode 100644 index 00000000..1a151398 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnloadstart.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnloadstart extends IInstance { + default T withOnloadstart(final String onloadstart_) { + get().attr("onloadstart", onloadstart_); + return get(); + } + + default T withCondOnloadstart(final boolean enable, final String onloadstart_) { + if (enable) { + get().attr("onloadstart", onloadstart_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnoffline.java b/src/main/java/j2html/tags/attributes/IOnoffline.java new file mode 100644 index 00000000..0f0b437d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnoffline.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnoffline extends IInstance { + default T withOnoffline(final String onoffline_) { + get().attr("onoffline", onoffline_); + return get(); + } + + default T withCondOnoffline(final boolean enable, final String onoffline_) { + if (enable) { + get().attr("onoffline", onoffline_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnonline.java b/src/main/java/j2html/tags/attributes/IOnonline.java new file mode 100644 index 00000000..c634b60a --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnonline.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnonline extends IInstance { + default T withOnonline(final String ononline_) { + get().attr("ononline", ononline_); + return get(); + } + + default T withCondOnonline(final boolean enable, final String ononline_) { + if (enable) { + get().attr("ononline", ononline_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnpagehide.java b/src/main/java/j2html/tags/attributes/IOnpagehide.java new file mode 100644 index 00000000..1437875b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnpagehide.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnpagehide extends IInstance { + default T withOnpagehide(final String onpagehide_) { + get().attr("onpagehide", onpagehide_); + return get(); + } + + default T withCondOnpagehide(final boolean enable, final String onpagehide_) { + if (enable) { + get().attr("onpagehide", onpagehide_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnpageshow.java b/src/main/java/j2html/tags/attributes/IOnpageshow.java new file mode 100644 index 00000000..5e76af20 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnpageshow.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnpageshow extends IInstance { + default T withOnpageshow(final String onpageshow_) { + get().attr("onpageshow", onpageshow_); + return get(); + } + + default T withCondOnpageshow(final boolean enable, final String onpageshow_) { + if (enable) { + get().attr("onpageshow", onpageshow_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnpause.java b/src/main/java/j2html/tags/attributes/IOnpause.java new file mode 100644 index 00000000..a4edf3a6 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnpause.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnpause extends IInstance { + default T withOnpause(final String onpause_) { + get().attr("onpause", onpause_); + return get(); + } + + default T withCondOnpause(final boolean enable, final String onpause_) { + if (enable) { + get().attr("onpause", onpause_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnplay.java b/src/main/java/j2html/tags/attributes/IOnplay.java new file mode 100644 index 00000000..5a0ba60b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnplay.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnplay extends IInstance { + default T withOnplay(final String onplay_) { + get().attr("onplay", onplay_); + return get(); + } + + default T withCondOnplay(final boolean enable, final String onplay_) { + if (enable) { + get().attr("onplay", onplay_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnplaying.java b/src/main/java/j2html/tags/attributes/IOnplaying.java new file mode 100644 index 00000000..22e4281b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnplaying.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnplaying extends IInstance { + default T withOnplaying(final String onplaying_) { + get().attr("onplaying", onplaying_); + return get(); + } + + default T withCondOnplaying(final boolean enable, final String onplaying_) { + if (enable) { + get().attr("onplaying", onplaying_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnpopstate.java b/src/main/java/j2html/tags/attributes/IOnpopstate.java new file mode 100644 index 00000000..73d45e1f --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnpopstate.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnpopstate extends IInstance { + default T withOnpopstate(final String onpopstate_) { + get().attr("onpopstate", onpopstate_); + return get(); + } + + default T withCondOnpopstate(final boolean enable, final String onpopstate_) { + if (enable) { + get().attr("onpopstate", onpopstate_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnprogress.java b/src/main/java/j2html/tags/attributes/IOnprogress.java new file mode 100644 index 00000000..5d427fdd --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnprogress.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnprogress extends IInstance { + default T withOnprogress(final String onprogress_) { + get().attr("onprogress", onprogress_); + return get(); + } + + default T withCondOnprogress(final boolean enable, final String onprogress_) { + if (enable) { + get().attr("onprogress", onprogress_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnratechange.java b/src/main/java/j2html/tags/attributes/IOnratechange.java new file mode 100644 index 00000000..1bc4876e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnratechange.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnratechange extends IInstance { + default T withOnratechange(final String onratechange_) { + get().attr("onratechange", onratechange_); + return get(); + } + + default T withCondOnratechange(final boolean enable, final String onratechange_) { + if (enable) { + get().attr("onratechange", onratechange_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnreset.java b/src/main/java/j2html/tags/attributes/IOnreset.java new file mode 100644 index 00000000..99508fdf --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnreset.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnreset extends IInstance { + default T withOnreset(final String onreset_) { + get().attr("onreset", onreset_); + return get(); + } + + default T withCondOnreset(final boolean enable, final String onreset_) { + if (enable) { + get().attr("onreset", onreset_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnresize.java b/src/main/java/j2html/tags/attributes/IOnresize.java new file mode 100644 index 00000000..e5e4986b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnresize.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnresize extends IInstance { + default T withOnresize(final String onresize_) { + get().attr("onresize", onresize_); + return get(); + } + + default T withCondOnresize(final boolean enable, final String onresize_) { + if (enable) { + get().attr("onresize", onresize_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnscroll.java b/src/main/java/j2html/tags/attributes/IOnscroll.java new file mode 100644 index 00000000..9b5e70ba --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnscroll.java @@ -0,0 +1,10 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnscroll extends IInstance { + default T withOnscroll(final String onscroll_) { + get().attr("onscroll", onscroll_); + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnsearch.java b/src/main/java/j2html/tags/attributes/IOnsearch.java new file mode 100644 index 00000000..236e9538 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnsearch.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnsearch extends IInstance { + default T withOnsearch(final String onsearch_) { + get().attr("onsearch", onsearch_); + return get(); + } + + default T withCondOnsearch(final boolean enable, final String onsearch_) { + if (enable) { + get().attr("onsearch", onsearch_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnseeked.java b/src/main/java/j2html/tags/attributes/IOnseeked.java new file mode 100644 index 00000000..8c06ee3c --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnseeked.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnseeked extends IInstance { + default T withOnseeked(final String onseeked_) { + get().attr("onseeked", onseeked_); + return get(); + } + + default T withCondOnseeked(final boolean enable, final String onseeked_) { + if (enable) { + get().attr("onseeked", onseeked_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnseeking.java b/src/main/java/j2html/tags/attributes/IOnseeking.java new file mode 100644 index 00000000..80039d3b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnseeking.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnseeking extends IInstance { + default T withOnseeking(final String onseeking_) { + get().attr("onseeking", onseeking_); + return get(); + } + + default T withCondOnseeking(final boolean enable, final String onseeking_) { + if (enable) { + get().attr("onseeking", onseeking_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnselect.java b/src/main/java/j2html/tags/attributes/IOnselect.java new file mode 100644 index 00000000..9a4ea380 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnselect.java @@ -0,0 +1,10 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnselect extends IInstance { + default T withOnselect(final String onselect_) { + get().attr("onselect", onselect_); + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnstalled.java b/src/main/java/j2html/tags/attributes/IOnstalled.java new file mode 100644 index 00000000..53b6124e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnstalled.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnstalled extends IInstance { + default T withOnstalled(final String onstalled_) { + get().attr("onstalled", onstalled_); + return get(); + } + + default T withCondOnstalled(final boolean enable, final String onstalled_) { + if (enable) { + get().attr("onstalled", onstalled_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnstorage.java b/src/main/java/j2html/tags/attributes/IOnstorage.java new file mode 100644 index 00000000..70be0a15 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnstorage.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnstorage extends IInstance { + default T withOnstorage(final String onstorage_) { + get().attr("onstorage", onstorage_); + return get(); + } + + default T withCondOnstorage(final boolean enable, final String onstorage_) { + if (enable) { + get().attr("onstorage", onstorage_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnsubmit.java b/src/main/java/j2html/tags/attributes/IOnsubmit.java new file mode 100644 index 00000000..c9cb03be --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnsubmit.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnsubmit extends IInstance { + default T withOnsubmit(final String onsubmit_) { + get().attr("onsubmit", onsubmit_); + return get(); + } + + default T withCondOnsubmit(final boolean enable, final String onsubmit_) { + if (enable) { + get().attr("onsubmit", onsubmit_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnsuspend.java b/src/main/java/j2html/tags/attributes/IOnsuspend.java new file mode 100644 index 00000000..ba008c03 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnsuspend.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnsuspend extends IInstance { + default T withOnsuspend(final String onsuspend_) { + get().attr("onsuspend", onsuspend_); + return get(); + } + + default T withCondOnsuspend(final boolean enable, final String onsuspend_) { + if (enable) { + get().attr("onsuspend", onsuspend_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOntimeupdate.java b/src/main/java/j2html/tags/attributes/IOntimeupdate.java new file mode 100644 index 00000000..ac5b67ec --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOntimeupdate.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOntimeupdate extends IInstance { + default T withOntimeupdate(final String ontimeupdate_) { + get().attr("ontimeupdate", ontimeupdate_); + return get(); + } + + default T withCondOntimeupdate(final boolean enable, final String ontimeupdate_) { + if (enable) { + get().attr("ontimeupdate", ontimeupdate_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOntoggle.java b/src/main/java/j2html/tags/attributes/IOntoggle.java new file mode 100644 index 00000000..91aeea36 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOntoggle.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOntoggle extends IInstance { + default T withOntoggle(final String ontoggle_) { + get().attr("ontoggle", ontoggle_); + return get(); + } + + default T withCondOntoggle(final boolean enable, final String ontoggle_) { + if (enable) { + get().attr("ontoggle", ontoggle_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnunload.java b/src/main/java/j2html/tags/attributes/IOnunload.java new file mode 100644 index 00000000..1a87fdea --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnunload.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnunload extends IInstance { + default T withOnunload(final String onunload_) { + get().attr("onunload", onunload_); + return get(); + } + + default T withCondOnunload(final boolean enable, final String onunload_) { + if (enable) { + get().attr("onunload", onunload_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnvolumechanged.java b/src/main/java/j2html/tags/attributes/IOnvolumechanged.java new file mode 100644 index 00000000..16115a86 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnvolumechanged.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnvolumechanged extends IInstance { + default T withOnvolumechanged(final String onvolumechanged_) { + get().attr("onvolumechanged", onvolumechanged_); + return get(); + } + + default T withCondOnvolumechanged(final boolean enable, final String onvolumechanged_) { + if (enable) { + get().attr("onvolumechanged", onvolumechanged_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnwaiting.java b/src/main/java/j2html/tags/attributes/IOnwaiting.java new file mode 100644 index 00000000..84cf74f8 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnwaiting.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnwaiting extends IInstance { + default T withOnwaiting(final String onwaiting_) { + get().attr("onwaiting", onwaiting_); + return get(); + } + + default T withCondOnwaiting(final boolean enable, final String onwaiting_) { + if (enable) { + get().attr("onwaiting", onwaiting_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOnwheel.java b/src/main/java/j2html/tags/attributes/IOnwheel.java new file mode 100644 index 00000000..9172dacc --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOnwheel.java @@ -0,0 +1,10 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOnwheel extends IInstance { + default T withOnwheel(final String onwheel_) { + get().attr("onwheel", onwheel_); + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOpen.java b/src/main/java/j2html/tags/attributes/IOpen.java new file mode 100644 index 00000000..37a2add7 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOpen.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOpen extends IInstance { + default T isOpen() { + get().attr("open"); + return get(); + } + + default T withCondOpen(final boolean enable) { + if (enable) { + get().attr("open"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IOptimum.java b/src/main/java/j2html/tags/attributes/IOptimum.java new file mode 100644 index 00000000..b538fcd4 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IOptimum.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IOptimum extends IInstance { + default T withOptimum(final String optimum_) { + get().attr("optimum", optimum_); + return get(); + } + + default T withCondOptimum(final boolean enable, final String optimum_) { + if (enable) { + get().attr("optimum", optimum_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IPattern.java b/src/main/java/j2html/tags/attributes/IPattern.java new file mode 100644 index 00000000..dbcda5fe --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IPattern.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IPattern extends IInstance { + default T withPattern(final String pattern_) { + get().attr("pattern", pattern_); + return get(); + } + + default T withCondPattern(final boolean enable, final String pattern_) { + if (enable) { + get().attr("pattern", pattern_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IPlaceholder.java b/src/main/java/j2html/tags/attributes/IPlaceholder.java new file mode 100644 index 00000000..a6f34ee9 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IPlaceholder.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IPlaceholder extends IInstance { + default T withPlaceholder(final String placeholder_) { + get().attr("placeholder", placeholder_); + return get(); + } + + default T withCondPlaceholder(final boolean enable, final String placeholder_) { + if (enable) { + get().attr("placeholder", placeholder_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IPoster.java b/src/main/java/j2html/tags/attributes/IPoster.java new file mode 100644 index 00000000..65d8eea0 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IPoster.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IPoster extends IInstance { + default T withPoster(final String poster_) { + get().attr("poster", poster_); + return get(); + } + + default T withCondPoster(final boolean enable, final String poster_) { + if (enable) { + get().attr("poster", poster_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IPreload.java b/src/main/java/j2html/tags/attributes/IPreload.java new file mode 100644 index 00000000..2545c20f --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IPreload.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IPreload extends IInstance { + default T withPreload(final String preload_) { + get().attr("preload", preload_); + return get(); + } + + default T withCondPreload(final boolean enable, final String preload_) { + if (enable) { + get().attr("preload", preload_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IReadonly.java b/src/main/java/j2html/tags/attributes/IReadonly.java new file mode 100644 index 00000000..80f4bf38 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IReadonly.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IReadonly extends IInstance { + default T isReadonly() { + get().attr("readonly"); + return get(); + } + + default T withCondReadonly(final boolean enable) { + if (enable) { + get().attr("readonly"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IRel.java b/src/main/java/j2html/tags/attributes/IRel.java new file mode 100644 index 00000000..38c0e135 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IRel.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IRel extends IInstance { + default T withRel(final String rel_) { + get().attr("rel", rel_); + return get(); + } + + default T withCondRel(final boolean enable, final String rel_) { + if (enable) { + get().attr("rel", rel_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IRequired.java b/src/main/java/j2html/tags/attributes/IRequired.java new file mode 100644 index 00000000..e78d065d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IRequired.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IRequired extends IInstance { + default T isRequired() { + get().attr("required"); + return get(); + } + + default T withCondRequired(final boolean enable) { + if (enable) { + get().attr("required"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IReversed.java b/src/main/java/j2html/tags/attributes/IReversed.java new file mode 100644 index 00000000..cba817dc --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IReversed.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IReversed extends IInstance { + default T isReversed() { + get().attr("reversed"); + return get(); + } + + default T withCondReversed(final boolean enable) { + if (enable) { + get().attr("reversed"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IRows.java b/src/main/java/j2html/tags/attributes/IRows.java new file mode 100644 index 00000000..55ae367b --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IRows.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IRows extends IInstance { + default T withRows(final String rows_) { + get().attr("rows", rows_); + return get(); + } + + default T withCondRows(final boolean enable, final String rows_) { + if (enable) { + get().attr("rows", rows_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IRowspan.java b/src/main/java/j2html/tags/attributes/IRowspan.java new file mode 100644 index 00000000..2c9829aa --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IRowspan.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IRowspan extends IInstance { + default T withRowspan(final String rowspan_) { + get().attr("rowspan", rowspan_); + return get(); + } + + default T withCondRowspan(final boolean enable, final String rowspan_) { + if (enable) { + get().attr("rowspan", rowspan_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISandbox.java b/src/main/java/j2html/tags/attributes/ISandbox.java new file mode 100644 index 00000000..eb07bb6d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISandbox.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISandbox extends IInstance { + default T isSandbox() { + get().attr("sandbox"); + return get(); + } + + default T withCondSandbox(final boolean enable) { + if (enable) { + get().attr("sandbox"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IScope.java b/src/main/java/j2html/tags/attributes/IScope.java new file mode 100644 index 00000000..a3dc225c --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IScope.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IScope extends IInstance { + default T withScope(final String scope_) { + get().attr("scope", scope_); + return get(); + } + + default T withCondScope(final boolean enable, final String scope_) { + if (enable) { + get().attr("scope", scope_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISelected.java b/src/main/java/j2html/tags/attributes/ISelected.java new file mode 100644 index 00000000..6dbf8871 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISelected.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISelected extends IInstance { + default T isSelected() { + get().attr("selected"); + return get(); + } + + default T withCondSelected(final boolean enable) { + if (enable) { + get().attr("selected"); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IShape.java b/src/main/java/j2html/tags/attributes/IShape.java new file mode 100644 index 00000000..cbfcc303 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IShape.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IShape extends IInstance { + default T withShape(final String shape_) { + get().attr("shape", shape_); + return get(); + } + + default T withCondShape(final boolean enable, final String shape_) { + if (enable) { + get().attr("shape", shape_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISize.java b/src/main/java/j2html/tags/attributes/ISize.java new file mode 100644 index 00000000..4798131e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISize.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISize extends IInstance { + default T withSize(final String size_) { + get().attr("size", size_); + return get(); + } + + default T withCondSize(final boolean enable, final String size_) { + if (enable) { + get().attr("size", size_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISizes.java b/src/main/java/j2html/tags/attributes/ISizes.java new file mode 100644 index 00000000..a50070cf --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISizes.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISizes extends IInstance { + default T withSizes(final String sizes_) { + get().attr("sizes", sizes_); + return get(); + } + + default T withCondSizes(final boolean enable, final String sizes_) { + if (enable) { + get().attr("sizes", sizes_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISpan.java b/src/main/java/j2html/tags/attributes/ISpan.java new file mode 100644 index 00000000..a4b715a9 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISpan.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISpan extends IInstance { + default T withSpan(final String span_) { + get().attr("span", span_); + return get(); + } + + default T withCondSpan(final boolean enable, final String span_) { + if (enable) { + get().attr("span", span_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISrc.java b/src/main/java/j2html/tags/attributes/ISrc.java new file mode 100644 index 00000000..f12c30b9 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISrc.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISrc extends IInstance { + default T withSrc(final String src_) { + get().attr("src", src_); + return get(); + } + + default T withCondSrc(final boolean enable, final String src_) { + if (enable) { + get().attr("src", src_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISrcdoc.java b/src/main/java/j2html/tags/attributes/ISrcdoc.java new file mode 100644 index 00000000..9976c77d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISrcdoc.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISrcdoc extends IInstance { + default T withSrcdoc(final String srcdoc_) { + get().attr("srcdoc", srcdoc_); + return get(); + } + + default T withCondSrcdoc(final boolean enable, final String srcdoc_) { + if (enable) { + get().attr("srcdoc", srcdoc_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISrclang.java b/src/main/java/j2html/tags/attributes/ISrclang.java new file mode 100644 index 00000000..0399017d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISrclang.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISrclang extends IInstance { + default T withSrclang(final String srclang_) { + get().attr("srclang", srclang_); + return get(); + } + + default T withCondSrclang(final boolean enable, final String srclang_) { + if (enable) { + get().attr("srclang", srclang_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ISrcset.java b/src/main/java/j2html/tags/attributes/ISrcset.java new file mode 100644 index 00000000..b32af208 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ISrcset.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ISrcset extends IInstance { + default T withSrcset(final String srcset_) { + get().attr("srcset", srcset_); + return get(); + } + + default T withCondSrcset(final boolean enable, final String srcset_) { + if (enable) { + get().attr("srcset", srcset_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IStart.java b/src/main/java/j2html/tags/attributes/IStart.java new file mode 100644 index 00000000..d46a1ddd --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IStart.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IStart extends IInstance { + default T withStart(final String start_) { + get().attr("start", start_); + return get(); + } + + default T withCondStart(final boolean enable, final String start_) { + if (enable) { + get().attr("start", start_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IStep.java b/src/main/java/j2html/tags/attributes/IStep.java new file mode 100644 index 00000000..5f474d18 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IStep.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IStep extends IInstance { + default T withStep(final String step_) { + get().attr("step", step_); + return get(); + } + + default T withCondStep(final boolean enable, final String step_) { + if (enable) { + get().attr("step", step_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/ITarget.java b/src/main/java/j2html/tags/attributes/ITarget.java new file mode 100644 index 00000000..d5ff1a75 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/ITarget.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface ITarget extends IInstance { + default T withTarget(final String target_) { + get().attr("target", target_); + return get(); + } + + default T withCondTarget(final boolean enable, final String target_) { + if (enable) { + get().attr("target", target_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IType.java b/src/main/java/j2html/tags/attributes/IType.java new file mode 100644 index 00000000..dd09ec8d --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IType.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IType extends IInstance { + default T withType(final String type_) { + get().attr("type", type_); + return get(); + } + + default T withCondType(final boolean enable, final String type_) { + if (enable) { + get().attr("type", type_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IUsemap.java b/src/main/java/j2html/tags/attributes/IUsemap.java new file mode 100644 index 00000000..038f52b5 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IUsemap.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IUsemap extends IInstance { + default T withUsemap(final String usemap_) { + get().attr("usemap", usemap_); + return get(); + } + + default T withCondUsemap(final boolean enable, final String usemap_) { + if (enable) { + get().attr("usemap", usemap_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IValue.java b/src/main/java/j2html/tags/attributes/IValue.java new file mode 100644 index 00000000..d66357ca --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IValue.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IValue extends IInstance { + default T withValue(final String value_) { + get().attr("value", value_); + return get(); + } + + default T withCondValue(final boolean enable, final String value_) { + if (enable) { + get().attr("value", value_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IWidth.java b/src/main/java/j2html/tags/attributes/IWidth.java new file mode 100644 index 00000000..06a2afb0 --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IWidth.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IWidth extends IInstance { + default T withWidth(final String width_) { + get().attr("width", width_); + return get(); + } + + default T withCondWidth(final boolean enable, final String width_) { + if (enable) { + get().attr("width", width_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/attributes/IWrap.java b/src/main/java/j2html/tags/attributes/IWrap.java new file mode 100644 index 00000000..50b07e5e --- /dev/null +++ b/src/main/java/j2html/tags/attributes/IWrap.java @@ -0,0 +1,17 @@ +package j2html.tags.attributes; + +import j2html.tags.Tag; + +public interface IWrap extends IInstance { + default T withWrap(final String wrap_) { + get().attr("wrap", wrap_); + return get(); + } + + default T withCondWrap(final boolean enable, final String wrap_) { + if (enable) { + get().attr("wrap", wrap_); + } + return get(); + } +} diff --git a/src/main/java/j2html/tags/generators/AttrD.java b/src/main/java/j2html/tags/generators/AttrD.java new file mode 100644 index 00000000..612edf0c --- /dev/null +++ b/src/main/java/j2html/tags/generators/AttrD.java @@ -0,0 +1,24 @@ +package j2html.tags.generators; + +final class AttrD { + //attribute descriptor + + public final String attr; + + public final boolean hasArgument; + + //the html tags that this attribute can be used on + public final String[] tags; + + public AttrD(final String attr, boolean hasArgument){ + this.attr = attr; + this.hasArgument = hasArgument; + this.tags = new String[]{}; + } + + public AttrD(final String attr, boolean hasArgument, final String... tags) { + this.attr = attr; + this.hasArgument = hasArgument; + this.tags = tags; + } +} diff --git a/src/main/java/j2html/tags/generators/AttributeInterfaceCodeGenerator.java b/src/main/java/j2html/tags/generators/AttributeInterfaceCodeGenerator.java new file mode 100644 index 00000000..396405fa --- /dev/null +++ b/src/main/java/j2html/tags/generators/AttributeInterfaceCodeGenerator.java @@ -0,0 +1,186 @@ +package j2html.tags.generators; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +public final class AttributeInterfaceCodeGenerator { + + public static void main(String[] args){ + try { + final boolean delete = false; + + for (final AttrD attr : AttributesList.attributesDescriptive()) { + final Path path = makePath(attr.attr); + final String interfaceName = interfaceNameFromAttribute(attr.attr)+""; + + /* + IFormAction extends IInstance + + default T withFormAction(String formAction){ + get().attr("formaction", formAction); + return get(); + } + */ + + final String interfaceStr = getInterfaceTemplate( + interfaceName, + Optional.of("IInstance"), + Arrays.asList("j2html.tags.Tag"), + interfaceNameFromAttribute(attr.attr).substring(1), + attr + ); + + if (delete) { + Files.delete(path); + }else{ + Files.write(path, interfaceStr.getBytes()); + } + } + }catch (Exception ignored){} + } + + private static String getPackage(){ + return "package j2html.tags.attributes;\n"; + } + + private static String makeReturnTypeAndMethodName(final String name){ + return "default "+ "T "+name; + } + + private static String getInterfaceTemplate( + final String interfaceName, + final Optional optExtends, + final List imports, + final String interfaceNameSimple, + final AttrD attrD + ){ + + final StringBuilder sb = new StringBuilder(); + + sb.append(getPackage()); + sb.append("\n"); + + for(String importName : imports){ + sb.append("import ").append(importName).append(";\n"); + } + sb.append("\n"); + sb.append("public interface ") + .append(interfaceName); + + if(optExtends.isPresent()) { + sb.append(" extends ").append(optExtends.get()) + .append(" "); + } + + sb.append(" {\n"); + + //interface contents + /* + IFormAction extends IInstance + + default T withFormAction(String formAction){ + get().attr("formaction", formAction); + return get(); + } + */ + //IMPORTANT: '_' added as suffix to mitigate problems + //where attributes are java keywords. Just to make it consistent and avoid special cases. + final String attrName = interfaceNameSimple.toLowerCase(); + final String paramName = attrName+"_"; + + //depending on if the attribute has an argument or not, + //generate methods according to the convention in Tag.java + // arg -> with$ATTR(arg), withCond$ATTR(condition, arg) + // no arg -> is$ATTR(), withCond$ATTR(condition) + + //append the 'with$ATTR' method + writeAttributeMethod(interfaceNameSimple, attrD, sb, attrName, paramName); + writeAttributeMethodCond(interfaceNameSimple, attrD, sb, attrName, paramName); + + sb.append("}\n"); + + return sb.toString(); + } + + private static void addAttributeNoArg(final StringBuilder sb, final String attrName){ + //generate the code to add an attribute without an argument + + //there are some special attributes + //which do take an argument, but where the argument + //is boolean (meaning on/off, yes/no and the like) + sb.append("get().attr(\""); + if(attrName.equals("autocomplete")){ + sb.append(attrName).append("\",\"on\""); + }else { + + sb.append(attrName).append("\""); + } + sb.append(");\n"); + } + + private static void writeAttributeMethodCond(String interfaceNameSimple, AttrD attrD, StringBuilder sb, String attrName, String paramName) { + + sb.append(makeReturnTypeAndMethodName("withCond"+interfaceNameSimple)); + + if(attrD.hasArgument){ + //add a variant where you can specify the argument + + sb.append("(final boolean enable, final String ").append(paramName).append(") {"); + + sb.append("if (enable){\n"); + sb.append("get().attr(\"").append(attrName).append("\", "+ paramName +");\n"); + sb.append("}\n"); + + sb.append("return get();\n"); + }else{ + //add a variant where you can toggle the attribute + + sb.append("(final boolean enable) {"); + sb.append("if (enable){\n"); + addAttributeNoArg(sb, attrName); + sb.append("}\n"); + sb.append("return get();\n"); + } + sb.append("}\n"); + } + + private static void writeAttributeMethod(String interfaceNameSimple, AttrD attrD, StringBuilder sb, String attrName, String paramName) { + + sb.append(makeReturnTypeAndMethodName( + ((attrD.hasArgument)?"with":"is")+interfaceNameSimple) + ); + + if(attrD.hasArgument){ + //add a variant where you can specify the argument + + sb.append("(final String ").append(paramName).append(") {") + + .append("get().attr(\"").append(attrName).append("\", "+ paramName +");\n") + .append("return get();\n"); + }else{ + //add a variant where you can toggle the attribute + + sb.append("() {"); + + addAttributeNoArg(sb, attrName); + + sb.append("return get();\n"); + } + sb.append("}\n"); + } + + public static String interfaceNameFromAttribute(String attribute){ + String res = attribute.substring(0,1).toUpperCase()+attribute.substring(1); + return "I" + res; + } + + private static Path makePath(String tagLowerCase){ + final String filename = interfaceNameFromAttribute(tagLowerCase)+".java"; + return Paths.get("src/main/java/j2html/tags/attributes/"+filename); + } + +} diff --git a/src/main/java/j2html/tags/generators/AttributesList.java b/src/main/java/j2html/tags/generators/AttributesList.java new file mode 100644 index 00000000..be133ae9 --- /dev/null +++ b/src/main/java/j2html/tags/generators/AttributesList.java @@ -0,0 +1,183 @@ +package j2html.tags.generators; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +public final class AttributesList { + + //https://www.w3schools.com/tags/ref_attributes.asp + + static List getCustomAttributesForHtmlTag(final String tagLowercase){ + + final List attrs = new ArrayList<>(); + for(AttrD attrD : attributesDescriptive()){ + if( + Arrays.asList(attrD.tags).contains(tagLowercase) + ){ + attrs.add(attrD.attr); + } + } + return attrs; + } + + static List attributesDescriptive() { + return Arrays.asList( + new AttrD("accept", true, "input"), + //new AttrD("accept-charset","form"), //contains dashes, TODO + //new AttrD("accesskey"), //global attribute + new AttrD("action", true, "form"), + //"align", not supported in HTML5 + new AttrD("alt", true, "area","img","input"), + new AttrD("async", false, "script"), + new AttrD("autocomplete", false, "form","input"), + new AttrD("autofocus", false, "button","input","select","textarea"), + new AttrD("autoplay", false, "audio","video"), + //"bgcolor", not supported in HTMTL5 + //"border", not supported in HTML5 + new AttrD("charset", true, "meta","script"), + new AttrD("checked", false, "input"), + new AttrD("cite", true, "blockquote","del","ins","q"), + //"class" already implemented in Tag.java // global attribute + new AttrD("cols", true, "textarea"), + new AttrD("colspan", true, "td","th"), + new AttrD("content", true, "meta"), + //"contenteditable" global attribute, should be in Tag.java + new AttrD("controls", false, "audio","video"), + new AttrD("coords", true, "area"), + new AttrD("data", true, "object"), + new AttrD("datetime", true, "del","ins","time"), + new AttrD("default", false, "track"), + new AttrD("defer", false, "script"), + //new AttrD("dir"), //global attribute + new AttrD("dirname", true, "input","textarea"), + new AttrD("disabled",false, "button","fieldset","input","optgroup","option","select","textarea"), + new AttrD("download",false, "a","area"), + //new AttrD("draggable") global attribute, should be in Tag.java + new AttrD("enctype", true, "form"), + new AttrD("for", true, "label","output"), + new AttrD("form", true, "button","fieldset","input","label","meter","object","output","select","textarea"), + new AttrD("formaction", true, "button","input"), + new AttrD("headers", true, "td","th"), + new AttrD("height", true, "canvas","embed","iframe","img","input","object","video"), + //new AttrD("hidden"), global attribute + new AttrD("high", true, "meter"), + new AttrD("href", true, "a","area","base","link"), + new AttrD("hreflang", true, "a","area","link"), + //"http-equiv", //TODO: '-' is problematic in code generation + //"id" global attribute, should be in Tag.java + new AttrD("ismap", false, "img"), + new AttrD("kind", true, "track"), + new AttrD("label", true, "track","option","optgroup"), + //"lang" global attribute, should be in Tag.java + new AttrD("list", true, "input"), + new AttrD("loop", false, "audio","video"), + new AttrD("low", true, "meter"), + new AttrD("max", true, "input","meter","progress"), + new AttrD("maxlength", true, "input","textarea"), + new AttrD("media", true, "a","area","link","source","style"), + new AttrD("method", true, "form"), + new AttrD("min", true, "input","meter"), + new AttrD("multiple", false, "input","select"), + new AttrD("muted", false, "video","audio"), + new AttrD("name", true, "button","fieldset","form","iframe","input","map","meta","object","output","param","select","textarea"), + new AttrD("novalidate", false, "form"), + new AttrD("onabort", true, "audio","embed","img","object","video"), + new AttrD("onafterprint", true, "body"), + new AttrD("onbeforeprint", true, "body"), + new AttrD("onbeforeunload", true, "body"), + //new AttrD("onblur"), global attribute + new AttrD("oncanplay", true, "audio","embed","object","video"), + new AttrD("oncanplaythrough", true, "audio","video"), + /* a bunch of event attributes that are on all visible elements (so should be in Tag.java) + "onchange", + "onclick", + "oncontextmenu", + "oncopy", + */ + new AttrD("oncuechange", true, "track"), + /* + "oncut", + ... + "ondrop", + */ + new AttrD("ondurationchange", true, "audio","video"), + new AttrD("onemptied", true, "audio","video"), + new AttrD("onended", true, "audio","video"), + new AttrD("onerror", true, "audio","body","embed","img","object","script","style","video"), + //new AttrD("onfocus"),// global attribute + new AttrD("onhashchange", true, "body"), + // ... a bunch of event attributes visible on all elements + new AttrD("onload", true, "body","iframe","img","input","link","script","style"), + new AttrD("onloadeddata", true, "audio","video"), + new AttrD("onloadedmetadata", true, "audio","video"), + new AttrD("onloadstart", true, "audio","video"), + // ... a bunch of event attributes visible on all elements + new AttrD("onoffline", true, "body"), + new AttrD("ononline", true, "body"), + new AttrD("onpagehide", true, "body"), + new AttrD("onpageshow", true, "body"), + //new AttrD("onpaste"),// global attribute + new AttrD("onpause", true, "audio","video"), + new AttrD("onplay", true, "audio","video"), + new AttrD("onplaying", true, "audio","video"), + new AttrD("onpopstate", true, "body"), + new AttrD("onprogress", true, "audio","video"), + new AttrD("onratechange", true, "audio","video"), + new AttrD("onreset", true, "form"), + new AttrD("onresize", true, "body"), + //new AttrD("onscroll"), //global attribute + new AttrD("onsearch", true, "input"), + new AttrD("onseeked", true, "audio","video"), + new AttrD("onseeking", true, "audio","video"), + //new AttrD("onselect"), //global attribute + new AttrD("onstalled", true, "audio","video"), + new AttrD("onstorage", true, "body"), + new AttrD("onsubmit", true, "form"), + new AttrD("onsuspend", true, "audio","video"), + new AttrD("ontimeupdate", true, "audio","video"), + new AttrD("ontoggle", true, "details"), + new AttrD("onunload", true, "body"), + new AttrD("onvolumechanged", true, "audio","video"), + new AttrD("onwaiting", true, "audio","video"), + //new AttrD("onwheel"), //global attribute + new AttrD("open", false, "details"), + new AttrD("optimum", true, "meter"), + new AttrD("pattern", true, "input"), + new AttrD("placeholder", true, "input","textarea"), + new AttrD("poster", true, "video"), + new AttrD("preload", true, "audio","video"), + new AttrD("readonly", false, "input","textarea"), + new AttrD("rel", true, "a","area","form","link"), + new AttrD("required", false, "input","select","textarea"), + new AttrD("reversed", false, "ol"), + new AttrD("rows", true, "textarea"), + new AttrD("rowspan", true, "td","th"), + new AttrD("sandbox", false, "iframe"), + new AttrD("scope", true, "th"), + new AttrD("selected", false, "option"), + new AttrD("shape", true, "area"), + new AttrD("size", true, "input","select"), + new AttrD("sizes", true, "img","link","source"), + new AttrD("span", true, "col","colgroup"), + //new AttrD("spellcheck"), //global attribute + new AttrD("src", true, "audio","embed","iframe","img","input","script","source","track","video"), + new AttrD("srcdoc", true, "iframe"), + new AttrD("srclang", true, "track"), + new AttrD("srcset", true, "img","source"), + new AttrD("start", true, "ol"), + new AttrD("step", true, "input"), + //new AttrD("style"), //global attribute + //new AttrD("tabindex"), //global attribute + new AttrD("target", true, "a","area","base","form"), + //new AttrD("title"), //global attribute + //new AttrD("translate"),// global attribute + new AttrD("type", true, "a","button","embed","input","link","menu","object","script","source","style"), + new AttrD("usemap", true, "img","object"), + new AttrD("value", true, "button","input","li","option","meter","progress","param"), + new AttrD("width", true, "canvas","embed","iframe","img","input","object","video"), + new AttrD("wrap", true, "textarea") + ); + } +} diff --git a/src/main/java/j2html/tags/generators/SpecializedTagClassCodeGenerator.java b/src/main/java/j2html/tags/generators/SpecializedTagClassCodeGenerator.java new file mode 100644 index 00000000..30b79a66 --- /dev/null +++ b/src/main/java/j2html/tags/generators/SpecializedTagClassCodeGenerator.java @@ -0,0 +1,161 @@ +package j2html.tags.generators; + + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import static j2html.tags.generators.TagCreatorCodeGenerator.containerTags; +import static j2html.tags.generators.TagCreatorCodeGenerator.emptyTags; + +class SpecializedTagClassCodeGenerator { + + public static void main(String[] args) { + try{ + //the delete argument serves to give the possibility + //to delete the classes that were written before + mainInner(false); + }catch (Exception ignored){} + } + public static String classNameFromTag(String tageNameLowerCase){ + String res = tageNameLowerCase.substring(0,1).toUpperCase()+tageNameLowerCase.substring(1); + return res + "Tag"; + } + + private static Path makePath(String tagLowerCase){ + final String filename = classNameFromTag(tagLowerCase)+".java"; + return Paths.get("src/main/java/j2html/tags/specialized/"+filename); + } + + private static String getPackage(){ + return "package j2html.tags.specialized;\n"; + } + + private static String getClassTemplate( + final String className, + final Optional optExtends, + final List imports, + final String tag, + final List interfaces + ){ + + final StringBuilder sb = new StringBuilder(); + + sb.append(getPackage()); + sb.append("\n"); + + for(String importName : imports){ + sb.append("import ").append(importName).append(";\n"); + } + sb.append("\n"); + sb.append("public final class ") + .append(className) + .append(" "); + + if(optExtends.isPresent()) { + sb.append("extends ").append(optExtends.get()) + .append(" "); + } + + //add the 'implements' clause + if(!interfaces.isEmpty()) { + sb.append("\n"); + sb.append("implements "); + + final List genericInterfaceNames + = interfaces.stream().map(iName -> iName+"<"+className+">") + .collect(Collectors.toList()); + sb.append( + String.join(",", genericInterfaceNames) + ); + } + + sb.append(" {\n"); + + //class contents + sb.append("public ") + .append(className) + .append("() {") + .append("super(\"").append(tag).append("\");") + .append("}\n"); + + sb.append("}\n"); + + return sb.toString(); + } + + private static List getInterfaceNamesForTag(final String tagNameLowercase){ + return AttributesList.getCustomAttributesForHtmlTag(tagNameLowercase) + .stream() + .map( + AttributeInterfaceCodeGenerator::interfaceNameFromAttribute + ).collect(Collectors.toList()); + } + + public static void mainInner(final boolean delete) throws IOException { + System.out.println("// EmptyTags, generated in " + SpecializedTagClassCodeGenerator.class); + + for (final String tag : emptyTags()) { + final String className = classNameFromTag(tag); + final Path path = makePath(tag); + + final List interfaceNames = getInterfaceNamesForTag(tag); + + final String classString = + getClassTemplate( + className, + Optional.of("EmptyTag<"+className+">"), + Arrays.asList( + "j2html.tags.EmptyTag", + "j2html.tags.attributes.*" + ), + tag, + interfaceNames + ); + + /* + public InputTag() { + super("input"); + } + */ + + if(delete){ + Files.delete(path); + }else { + Files.write(path, classString.getBytes()); + } + } + + System.out.println("// ContainerTags, generated in " + SpecializedTagClassCodeGenerator.class); + + for (final String tag : containerTags()) { + final Path path = makePath(tag); + final String className = classNameFromTag(tag); + + final List interfaceNames = getInterfaceNamesForTag(tag); + + final String classString = + getClassTemplate( + className, + Optional.of("ContainerTag<"+className+">"), + Arrays.asList( + "j2html.tags.ContainerTag", + "j2html.tags.attributes.*" + ), + tag, + interfaceNames + ); + + if(delete){ + Files.delete(path); + }else { + Files.write(path, classString.getBytes()); + } + } + } +} diff --git a/src/main/java/j2html/tags/TagCreatorCodeGenerator.java b/src/main/java/j2html/tags/generators/TagCreatorCodeGenerator.java similarity index 61% rename from src/main/java/j2html/tags/TagCreatorCodeGenerator.java rename to src/main/java/j2html/tags/generators/TagCreatorCodeGenerator.java index 3f7415fe..59b6b058 100644 --- a/src/main/java/j2html/tags/TagCreatorCodeGenerator.java +++ b/src/main/java/j2html/tags/generators/TagCreatorCodeGenerator.java @@ -1,4 +1,4 @@ -package j2html.tags; +package j2html.tags.generators; import java.util.Arrays; import java.util.List; @@ -6,33 +6,51 @@ class TagCreatorCodeGenerator { public static void main(String[] args) { + System.out.println("// EmptyTags, generated in " + TagCreatorCodeGenerator.class); + for (String tag : emptyTags()) { - String emptyA1 = "public static EmptyTag " + tag + "()"; - String emptyA2 = "{ return new EmptyTag(\"" + tag + "\"); }"; + final String className = SpecializedTagClassCodeGenerator.classNameFromTag(tag); + final String publicstaticTypeMethod = "public static "+className+" "+tag+" "; + final String castReturn = " return ("+className+") "; + final String construct = " new "+className+"()"; + + String emptyA1 = publicstaticTypeMethod + "()"; + String emptyA2 = "{ return "+construct+"; }"; // Attr shorthands - String emptyB1 = "public static EmptyTag " + tag + "(Attr.ShortForm shortAttr)"; - String emptyB2 = "{ return Attr.addTo(new EmptyTag(\"" + tag + "\"), shortAttr); }"; + String emptyB1 = publicstaticTypeMethod + "(Attr.ShortForm shortAttr)"; + String emptyB2 = "{ "+castReturn+" Attr.addTo("+construct+", shortAttr); }"; // Print System.out.println(String.format("%-80s%1s", emptyA1, emptyA2)); System.out.println(String.format("%-80s%1s", emptyB1, emptyB2)); System.out.println(""); } + System.out.println("// ContainerTags, generated in " + TagCreatorCodeGenerator.class); + for (String tag : containerTags()) { - String containerA1 = "public static ContainerTag " + tag + "()"; - String containerA2 = "{ return new ContainerTag(\"" + tag + "\"); }"; - String containerB1 = "public static ContainerTag " + tag + "(String text)"; - String containerB2 = "{ return new ContainerTag(\"" + tag + "\").withText(text); }"; - String containerC1 = "public static ContainerTag " + tag + "(DomContent... dc)"; - String containerC2 = "{ return new ContainerTag(\"" + tag + "\").with(dc); }"; + final String className = SpecializedTagClassCodeGenerator.classNameFromTag(tag); + final String publicstaticTypeMethod = "public static "+className+" "+tag+" "; + final String castReturn = " return ("+className+") "; + final String construct = " new "+className+"()"; + + String containerA1 = publicstaticTypeMethod+ "()"; + String containerA2 = "{ "+castReturn + construct + "; }"; + + String containerB1 = publicstaticTypeMethod + "(String text)"; + String containerB2 = "{ "+castReturn + construct + ".withText(text); }"; + + String containerC1 = publicstaticTypeMethod + "(DomContent... dc)"; + String containerC2 = "{ "+castReturn + construct+".with(dc); }"; // Attr shorthands - String containerD1 = "public static ContainerTag " + tag + "(Attr.ShortForm shortAttr)"; - String containerD2 = "{ return Attr.addTo(new ContainerTag(\"" + tag + "\"), shortAttr); }"; - String containerE1 = "public static ContainerTag " + tag + "(Attr.ShortForm shortAttr, String text)"; - String containerE2 = "{ return Attr.addTo(new ContainerTag(\"" + tag + "\").withText(text), shortAttr); }"; - String containerF1 = "public static ContainerTag " + tag + "(Attr.ShortForm shortAttr, DomContent... dc)"; - String containerF2 = "{ return Attr.addTo(new ContainerTag(\"" + tag + "\").with(dc), shortAttr); }"; + String containerD1 = publicstaticTypeMethod + "(Attr.ShortForm shortAttr)"; + String containerD2 = "{ "+castReturn+" Attr.addTo("+construct+", shortAttr); }"; + + String containerE1 = publicstaticTypeMethod + "(Attr.ShortForm shortAttr, String text)"; + String containerE2 = "{ "+castReturn+" Attr.addTo("+construct+".withText(text), shortAttr); }"; + + String containerF1 = publicstaticTypeMethod + "(Attr.ShortForm shortAttr, DomContent... dc)"; + String containerF2 = "{ "+castReturn+" Attr.addTo("+construct+".with(dc), shortAttr); }"; // Print System.out.println(String.format("%-80s%1s", containerA1, containerA2)); System.out.println(String.format("%-80s%1s", containerB1, containerB2)); @@ -45,7 +63,7 @@ public static void main(String[] args) { } // This is a method that contains all ContainerTags, there is nothing below it - private static List emptyTags() { + static List emptyTags() { return Arrays.asList( "area", "base", @@ -66,7 +84,7 @@ private static List emptyTags() { ); } - private static List containerTags() { + static List containerTags() { return Arrays.asList( "a", "abbr", @@ -78,6 +96,7 @@ private static List containerTags() { "bdi", "bdo", "blockquote", + //"body" BodyTag is managed manually, "button", "canvas", "caption", @@ -105,7 +124,9 @@ private static List containerTags() { "h4", "h5", "h6", + //"head", HeadTag is managed manually "header", + //"html" HtmlTag is managed manually "i", "iframe", "ins", diff --git a/src/main/java/j2html/tags/specialized/ATag.java b/src/main/java/j2html/tags/specialized/ATag.java new file mode 100644 index 00000000..d3d91e5b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ATag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class ATag extends ContainerTag + implements IDownload, IHref, IHreflang, IMedia, IRel, ITarget, IType { + public ATag() { + super("a"); + } +} diff --git a/src/main/java/j2html/tags/specialized/AbbrTag.java b/src/main/java/j2html/tags/specialized/AbbrTag.java new file mode 100644 index 00000000..218ca301 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/AbbrTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class AbbrTag extends ContainerTag { + public AbbrTag() { + super("abbr"); + } +} diff --git a/src/main/java/j2html/tags/specialized/AddressTag.java b/src/main/java/j2html/tags/specialized/AddressTag.java new file mode 100644 index 00000000..20179d96 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/AddressTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class AddressTag extends ContainerTag { + public AddressTag() { + super("address"); + } +} diff --git a/src/main/java/j2html/tags/specialized/AreaTag.java b/src/main/java/j2html/tags/specialized/AreaTag.java new file mode 100644 index 00000000..7e0e166e --- /dev/null +++ b/src/main/java/j2html/tags/specialized/AreaTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class AreaTag extends EmptyTag + implements IAlt, ICoords, IDownload, IHref, IHreflang, IMedia, IRel, IShape, ITarget { + public AreaTag() { + super("area"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ArticleTag.java b/src/main/java/j2html/tags/specialized/ArticleTag.java new file mode 100644 index 00000000..b5abf71b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ArticleTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class ArticleTag extends ContainerTag { + public ArticleTag() { + super("article"); + } +} diff --git a/src/main/java/j2html/tags/specialized/AsideTag.java b/src/main/java/j2html/tags/specialized/AsideTag.java new file mode 100644 index 00000000..08326cda --- /dev/null +++ b/src/main/java/j2html/tags/specialized/AsideTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class AsideTag extends ContainerTag { + public AsideTag() { + super("aside"); + } +} diff --git a/src/main/java/j2html/tags/specialized/AudioTag.java b/src/main/java/j2html/tags/specialized/AudioTag.java new file mode 100644 index 00000000..4e35283a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/AudioTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class AudioTag extends ContainerTag + implements IAutoplay, IControls, ILoop, IMuted, IOnabort, IOncanplay, IOncanplaythrough, IOndurationchange, IOnemptied, IOnended, IOnerror, IOnloadeddata, IOnloadedmetadata, IOnloadstart, IOnpause, IOnplay, IOnplaying, IOnprogress, IOnratechange, IOnseeked, IOnseeking, IOnstalled, IOnsuspend, IOntimeupdate, IOnvolumechanged, IOnwaiting, IPreload, ISrc { + public AudioTag() { + super("audio"); + } +} diff --git a/src/main/java/j2html/tags/specialized/BTag.java b/src/main/java/j2html/tags/specialized/BTag.java new file mode 100644 index 00000000..3dd3977e --- /dev/null +++ b/src/main/java/j2html/tags/specialized/BTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class BTag extends ContainerTag { + public BTag() { + super("b"); + } +} diff --git a/src/main/java/j2html/tags/specialized/BaseTag.java b/src/main/java/j2html/tags/specialized/BaseTag.java new file mode 100644 index 00000000..c157ae4c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/BaseTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.IHref; +import j2html.tags.attributes.ITarget; + +public final class BaseTag extends EmptyTag + implements IHref, ITarget { + public BaseTag() { + super("base"); + } +} diff --git a/src/main/java/j2html/tags/specialized/BdiTag.java b/src/main/java/j2html/tags/specialized/BdiTag.java new file mode 100644 index 00000000..cf947e57 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/BdiTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class BdiTag extends ContainerTag { + public BdiTag() { + super("bdi"); + } +} diff --git a/src/main/java/j2html/tags/specialized/BdoTag.java b/src/main/java/j2html/tags/specialized/BdoTag.java new file mode 100644 index 00000000..e352bea5 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/BdoTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class BdoTag extends ContainerTag { + public BdoTag() { + super("bdo"); + } +} diff --git a/src/main/java/j2html/tags/specialized/BlockquoteTag.java b/src/main/java/j2html/tags/specialized/BlockquoteTag.java new file mode 100644 index 00000000..d1f0d0f6 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/BlockquoteTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.ICite; + +public final class BlockquoteTag extends ContainerTag + implements ICite { + public BlockquoteTag() { + super("blockquote"); + } +} diff --git a/src/main/java/j2html/tags/specialized/BodyTag.java b/src/main/java/j2html/tags/specialized/BodyTag.java index 321683b5..7fde307a 100644 --- a/src/main/java/j2html/tags/specialized/BodyTag.java +++ b/src/main/java/j2html/tags/specialized/BodyTag.java @@ -2,9 +2,9 @@ import j2html.tags.ContainerTag; -public final class BodyTag extends ContainerTag { +public final class BodyTag extends ContainerTag { - public BodyTag(){ + public BodyTag() { super("body"); } } diff --git a/src/main/java/j2html/tags/specialized/BrTag.java b/src/main/java/j2html/tags/specialized/BrTag.java new file mode 100644 index 00000000..257fed2b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/BrTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; + +public final class BrTag extends EmptyTag { + public BrTag() { + super("br"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ButtonTag.java b/src/main/java/j2html/tags/specialized/ButtonTag.java new file mode 100644 index 00000000..f235a932 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ButtonTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class ButtonTag extends ContainerTag + implements IAutofocus, IDisabled, IForm, IFormaction, IName, IType, IValue { + public ButtonTag() { + super("button"); + } +} diff --git a/src/main/java/j2html/tags/specialized/CanvasTag.java b/src/main/java/j2html/tags/specialized/CanvasTag.java new file mode 100644 index 00000000..7b5971f1 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/CanvasTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IHeight; +import j2html.tags.attributes.IWidth; + +public final class CanvasTag extends ContainerTag + implements IHeight, IWidth { + public CanvasTag() { + super("canvas"); + } +} diff --git a/src/main/java/j2html/tags/specialized/CaptionTag.java b/src/main/java/j2html/tags/specialized/CaptionTag.java new file mode 100644 index 00000000..d9acf53d --- /dev/null +++ b/src/main/java/j2html/tags/specialized/CaptionTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class CaptionTag extends ContainerTag { + public CaptionTag() { + super("caption"); + } +} diff --git a/src/main/java/j2html/tags/specialized/CiteTag.java b/src/main/java/j2html/tags/specialized/CiteTag.java new file mode 100644 index 00000000..ab9a269f --- /dev/null +++ b/src/main/java/j2html/tags/specialized/CiteTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class CiteTag extends ContainerTag { + public CiteTag() { + super("cite"); + } +} diff --git a/src/main/java/j2html/tags/specialized/CodeTag.java b/src/main/java/j2html/tags/specialized/CodeTag.java new file mode 100644 index 00000000..6c98a555 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/CodeTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class CodeTag extends ContainerTag { + public CodeTag() { + super("code"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ColTag.java b/src/main/java/j2html/tags/specialized/ColTag.java new file mode 100644 index 00000000..33e6d97b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ColTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.ISpan; + +public final class ColTag extends EmptyTag + implements ISpan { + public ColTag() { + super("col"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ColgroupTag.java b/src/main/java/j2html/tags/specialized/ColgroupTag.java new file mode 100644 index 00000000..aa71aaaf --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ColgroupTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.ISpan; + +public final class ColgroupTag extends ContainerTag + implements ISpan { + public ColgroupTag() { + super("colgroup"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DatalistTag.java b/src/main/java/j2html/tags/specialized/DatalistTag.java new file mode 100644 index 00000000..c9245e8e --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DatalistTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DatalistTag extends ContainerTag { + public DatalistTag() { + super("datalist"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DdTag.java b/src/main/java/j2html/tags/specialized/DdTag.java new file mode 100644 index 00000000..9531939c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DdTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DdTag extends ContainerTag { + public DdTag() { + super("dd"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DelTag.java b/src/main/java/j2html/tags/specialized/DelTag.java new file mode 100644 index 00000000..b29ccafd --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DelTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.ICite; +import j2html.tags.attributes.IDatetime; + +public final class DelTag extends ContainerTag + implements ICite, IDatetime { + public DelTag() { + super("del"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DetailsTag.java b/src/main/java/j2html/tags/specialized/DetailsTag.java new file mode 100644 index 00000000..19bb8315 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DetailsTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IOntoggle; +import j2html.tags.attributes.IOpen; + +public final class DetailsTag extends ContainerTag + implements IOntoggle, IOpen { + public DetailsTag() { + super("details"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DfnTag.java b/src/main/java/j2html/tags/specialized/DfnTag.java new file mode 100644 index 00000000..4e890af2 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DfnTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DfnTag extends ContainerTag { + public DfnTag() { + super("dfn"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DialogTag.java b/src/main/java/j2html/tags/specialized/DialogTag.java new file mode 100644 index 00000000..b01cfa43 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DialogTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DialogTag extends ContainerTag { + public DialogTag() { + super("dialog"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DivTag.java b/src/main/java/j2html/tags/specialized/DivTag.java new file mode 100644 index 00000000..ebcd5034 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DivTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DivTag extends ContainerTag { + public DivTag() { + super("div"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DlTag.java b/src/main/java/j2html/tags/specialized/DlTag.java new file mode 100644 index 00000000..248c41ad --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DlTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DlTag extends ContainerTag { + public DlTag() { + super("dl"); + } +} diff --git a/src/main/java/j2html/tags/specialized/DtTag.java b/src/main/java/j2html/tags/specialized/DtTag.java new file mode 100644 index 00000000..2c962185 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/DtTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class DtTag extends ContainerTag { + public DtTag() { + super("dt"); + } +} diff --git a/src/main/java/j2html/tags/specialized/EmTag.java b/src/main/java/j2html/tags/specialized/EmTag.java new file mode 100644 index 00000000..42000403 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/EmTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class EmTag extends ContainerTag { + public EmTag() { + super("em"); + } +} diff --git a/src/main/java/j2html/tags/specialized/EmbedTag.java b/src/main/java/j2html/tags/specialized/EmbedTag.java new file mode 100644 index 00000000..b9cf9c72 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/EmbedTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class EmbedTag extends EmptyTag + implements IHeight, IOnabort, IOncanplay, IOnerror, ISrc, IType, IWidth { + public EmbedTag() { + super("embed"); + } +} diff --git a/src/main/java/j2html/tags/specialized/FieldsetTag.java b/src/main/java/j2html/tags/specialized/FieldsetTag.java new file mode 100644 index 00000000..9644fbab --- /dev/null +++ b/src/main/java/j2html/tags/specialized/FieldsetTag.java @@ -0,0 +1,13 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IDisabled; +import j2html.tags.attributes.IForm; +import j2html.tags.attributes.IName; + +public final class FieldsetTag extends ContainerTag + implements IDisabled, IForm, IName { + public FieldsetTag() { + super("fieldset"); + } +} diff --git a/src/main/java/j2html/tags/specialized/FigcaptionTag.java b/src/main/java/j2html/tags/specialized/FigcaptionTag.java new file mode 100644 index 00000000..9339d440 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/FigcaptionTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class FigcaptionTag extends ContainerTag { + public FigcaptionTag() { + super("figcaption"); + } +} diff --git a/src/main/java/j2html/tags/specialized/FigureTag.java b/src/main/java/j2html/tags/specialized/FigureTag.java new file mode 100644 index 00000000..15ffd4a6 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/FigureTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class FigureTag extends ContainerTag { + public FigureTag() { + super("figure"); + } +} diff --git a/src/main/java/j2html/tags/specialized/FooterTag.java b/src/main/java/j2html/tags/specialized/FooterTag.java new file mode 100644 index 00000000..b7c15868 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/FooterTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class FooterTag extends ContainerTag { + public FooterTag() { + super("footer"); + } +} diff --git a/src/main/java/j2html/tags/specialized/FormTag.java b/src/main/java/j2html/tags/specialized/FormTag.java new file mode 100644 index 00000000..0dd431fc --- /dev/null +++ b/src/main/java/j2html/tags/specialized/FormTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class FormTag extends ContainerTag + implements IAction, IAutocomplete, IEnctype, IMethod, IName, INovalidate, IOnreset, IOnsubmit, IRel, ITarget { + public FormTag() { + super("form"); + } +} diff --git a/src/main/java/j2html/tags/specialized/H1Tag.java b/src/main/java/j2html/tags/specialized/H1Tag.java new file mode 100644 index 00000000..d2ce78f2 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/H1Tag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class H1Tag extends ContainerTag { + public H1Tag() { + super("h1"); + } +} diff --git a/src/main/java/j2html/tags/specialized/H2Tag.java b/src/main/java/j2html/tags/specialized/H2Tag.java new file mode 100644 index 00000000..b2967b0f --- /dev/null +++ b/src/main/java/j2html/tags/specialized/H2Tag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class H2Tag extends ContainerTag { + public H2Tag() { + super("h2"); + } +} diff --git a/src/main/java/j2html/tags/specialized/H3Tag.java b/src/main/java/j2html/tags/specialized/H3Tag.java new file mode 100644 index 00000000..c8cc431a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/H3Tag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class H3Tag extends ContainerTag { + public H3Tag() { + super("h3"); + } +} diff --git a/src/main/java/j2html/tags/specialized/H4Tag.java b/src/main/java/j2html/tags/specialized/H4Tag.java new file mode 100644 index 00000000..65973e73 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/H4Tag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class H4Tag extends ContainerTag { + public H4Tag() { + super("h4"); + } +} diff --git a/src/main/java/j2html/tags/specialized/H5Tag.java b/src/main/java/j2html/tags/specialized/H5Tag.java new file mode 100644 index 00000000..457aa387 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/H5Tag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class H5Tag extends ContainerTag { + public H5Tag() { + super("h5"); + } +} diff --git a/src/main/java/j2html/tags/specialized/H6Tag.java b/src/main/java/j2html/tags/specialized/H6Tag.java new file mode 100644 index 00000000..b05e3579 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/H6Tag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class H6Tag extends ContainerTag { + public H6Tag() { + super("h6"); + } +} diff --git a/src/main/java/j2html/tags/specialized/HeadTag.java b/src/main/java/j2html/tags/specialized/HeadTag.java index b7c531f2..c8340a1f 100644 --- a/src/main/java/j2html/tags/specialized/HeadTag.java +++ b/src/main/java/j2html/tags/specialized/HeadTag.java @@ -1,11 +1,10 @@ package j2html.tags.specialized; import j2html.tags.ContainerTag; -import j2html.tags.Tag; -public final class HeadTag extends ContainerTag { +public final class HeadTag extends ContainerTag { - public HeadTag(){ + public HeadTag() { super("head"); } } diff --git a/src/main/java/j2html/tags/specialized/HeaderTag.java b/src/main/java/j2html/tags/specialized/HeaderTag.java new file mode 100644 index 00000000..1d9126d4 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/HeaderTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class HeaderTag extends ContainerTag { + public HeaderTag() { + super("header"); + } +} diff --git a/src/main/java/j2html/tags/specialized/HrTag.java b/src/main/java/j2html/tags/specialized/HrTag.java new file mode 100644 index 00000000..82cb0ff7 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/HrTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; + +public final class HrTag extends EmptyTag { + public HrTag() { + super("hr"); + } +} diff --git a/src/main/java/j2html/tags/specialized/HtmlTag.java b/src/main/java/j2html/tags/specialized/HtmlTag.java index 19bb4fc5..21f1e1ce 100644 --- a/src/main/java/j2html/tags/specialized/HtmlTag.java +++ b/src/main/java/j2html/tags/specialized/HtmlTag.java @@ -11,32 +11,32 @@ public final class HtmlTag extends Tag { private final Optional head; private final Optional body; - public HtmlTag(){ + public HtmlTag() { super("html"); head = Optional.empty(); body = Optional.empty(); } - public HtmlTag(HeadTag head){ + public HtmlTag(HeadTag head) { super("html"); this.head = Optional.of(head); this.body = Optional.empty(); } - public HtmlTag(BodyTag body){ + public HtmlTag(BodyTag body) { super("html"); this.head = Optional.empty(); this.body = Optional.of(body); } - public HtmlTag(HeadTag head, BodyTag body){ + public HtmlTag(HeadTag head, BodyTag body) { super("html"); this.head = Optional.of(head); this.body = Optional.of(body); } - private ContainerTag makeContainerTagForRendering(){ + private ContainerTag makeContainerTagForRendering() { return new ContainerTag("html").with( this.head.orElse(null), this.body.orElse(null) diff --git a/src/main/java/j2html/tags/specialized/ITag.java b/src/main/java/j2html/tags/specialized/ITag.java new file mode 100644 index 00000000..631ddc52 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ITag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class ITag extends ContainerTag { + public ITag() { + super("i"); + } +} diff --git a/src/main/java/j2html/tags/specialized/IframeTag.java b/src/main/java/j2html/tags/specialized/IframeTag.java new file mode 100644 index 00000000..ab5b732f --- /dev/null +++ b/src/main/java/j2html/tags/specialized/IframeTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class IframeTag extends ContainerTag + implements IHeight, IName, IOnload, ISandbox, ISrc, ISrcdoc, IWidth { + public IframeTag() { + super("iframe"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ImgTag.java b/src/main/java/j2html/tags/specialized/ImgTag.java new file mode 100644 index 00000000..a43c35d4 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ImgTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class ImgTag extends EmptyTag + implements IAlt, IHeight, IIsmap, IOnabort, IOnerror, IOnload, ISizes, ISrc, ISrcset, IUsemap, IWidth { + public ImgTag() { + super("img"); + } +} diff --git a/src/main/java/j2html/tags/specialized/InputTag.java b/src/main/java/j2html/tags/specialized/InputTag.java new file mode 100644 index 00000000..d210e565 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/InputTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class InputTag extends EmptyTag + implements IAccept, IAlt, IAutocomplete, IAutofocus, IChecked, IDirname, IDisabled, IForm, IFormaction, IHeight, IList, IMax, IMaxlength, IMin, IMultiple, IName, IOnload, IOnsearch, IPattern, IPlaceholder, IReadonly, IRequired, ISize, ISrc, IStep, IType, IValue, IWidth { + public InputTag() { + super("input"); + } +} diff --git a/src/main/java/j2html/tags/specialized/InsTag.java b/src/main/java/j2html/tags/specialized/InsTag.java new file mode 100644 index 00000000..4238cfb0 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/InsTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.ICite; +import j2html.tags.attributes.IDatetime; + +public final class InsTag extends ContainerTag + implements ICite, IDatetime { + public InsTag() { + super("ins"); + } +} diff --git a/src/main/java/j2html/tags/specialized/KbdTag.java b/src/main/java/j2html/tags/specialized/KbdTag.java new file mode 100644 index 00000000..3656c16c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/KbdTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class KbdTag extends ContainerTag { + public KbdTag() { + super("kbd"); + } +} diff --git a/src/main/java/j2html/tags/specialized/KeygenTag.java b/src/main/java/j2html/tags/specialized/KeygenTag.java new file mode 100644 index 00000000..a9565619 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/KeygenTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; + +public final class KeygenTag extends EmptyTag { + public KeygenTag() { + super("keygen"); + } +} diff --git a/src/main/java/j2html/tags/specialized/LabelTag.java b/src/main/java/j2html/tags/specialized/LabelTag.java new file mode 100644 index 00000000..637b3933 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/LabelTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IFor; +import j2html.tags.attributes.IForm; + +public final class LabelTag extends ContainerTag + implements IFor, IForm { + public LabelTag() { + super("label"); + } +} diff --git a/src/main/java/j2html/tags/specialized/LegendTag.java b/src/main/java/j2html/tags/specialized/LegendTag.java new file mode 100644 index 00000000..0b634a08 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/LegendTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class LegendTag extends ContainerTag { + public LegendTag() { + super("legend"); + } +} diff --git a/src/main/java/j2html/tags/specialized/LiTag.java b/src/main/java/j2html/tags/specialized/LiTag.java new file mode 100644 index 00000000..e12ed41f --- /dev/null +++ b/src/main/java/j2html/tags/specialized/LiTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IValue; + +public final class LiTag extends ContainerTag + implements IValue { + public LiTag() { + super("li"); + } +} diff --git a/src/main/java/j2html/tags/specialized/LinkTag.java b/src/main/java/j2html/tags/specialized/LinkTag.java new file mode 100644 index 00000000..ee7b3b1b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/LinkTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class LinkTag extends EmptyTag + implements IHref, IHreflang, IMedia, IOnload, IRel, ISizes, IType { + public LinkTag() { + super("link"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MainTag.java b/src/main/java/j2html/tags/specialized/MainTag.java new file mode 100644 index 00000000..594adf6e --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MainTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class MainTag extends ContainerTag { + public MainTag() { + super("main"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MapTag.java b/src/main/java/j2html/tags/specialized/MapTag.java new file mode 100644 index 00000000..c98e0eff --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MapTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IName; + +public final class MapTag extends ContainerTag + implements IName { + public MapTag() { + super("map"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MarkTag.java b/src/main/java/j2html/tags/specialized/MarkTag.java new file mode 100644 index 00000000..2d437b1a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MarkTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class MarkTag extends ContainerTag { + public MarkTag() { + super("mark"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MenuTag.java b/src/main/java/j2html/tags/specialized/MenuTag.java new file mode 100644 index 00000000..9c4863ba --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MenuTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IType; + +public final class MenuTag extends ContainerTag + implements IType { + public MenuTag() { + super("menu"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MenuitemTag.java b/src/main/java/j2html/tags/specialized/MenuitemTag.java new file mode 100644 index 00000000..52942e63 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MenuitemTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class MenuitemTag extends ContainerTag { + public MenuitemTag() { + super("menuitem"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MetaTag.java b/src/main/java/j2html/tags/specialized/MetaTag.java new file mode 100644 index 00000000..8626322a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MetaTag.java @@ -0,0 +1,13 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.ICharset; +import j2html.tags.attributes.IContent; +import j2html.tags.attributes.IName; + +public final class MetaTag extends EmptyTag + implements ICharset, IContent, IName { + public MetaTag() { + super("meta"); + } +} diff --git a/src/main/java/j2html/tags/specialized/MeterTag.java b/src/main/java/j2html/tags/specialized/MeterTag.java new file mode 100644 index 00000000..7843860a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/MeterTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class MeterTag extends ContainerTag + implements IForm, IHigh, ILow, IMax, IMin, IOptimum, IValue { + public MeterTag() { + super("meter"); + } +} diff --git a/src/main/java/j2html/tags/specialized/NavTag.java b/src/main/java/j2html/tags/specialized/NavTag.java new file mode 100644 index 00000000..b9290635 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/NavTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class NavTag extends ContainerTag { + public NavTag() { + super("nav"); + } +} diff --git a/src/main/java/j2html/tags/specialized/NoscriptTag.java b/src/main/java/j2html/tags/specialized/NoscriptTag.java new file mode 100644 index 00000000..b111b471 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/NoscriptTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class NoscriptTag extends ContainerTag { + public NoscriptTag() { + super("noscript"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ObjectTag.java b/src/main/java/j2html/tags/specialized/ObjectTag.java new file mode 100644 index 00000000..f6adba9b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ObjectTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class ObjectTag extends ContainerTag + implements IData, IForm, IHeight, IName, IOnabort, IOncanplay, IOnerror, IType, IUsemap, IWidth { + public ObjectTag() { + super("object"); + } +} diff --git a/src/main/java/j2html/tags/specialized/OlTag.java b/src/main/java/j2html/tags/specialized/OlTag.java new file mode 100644 index 00000000..3033394a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/OlTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IReversed; +import j2html.tags.attributes.IStart; + +public final class OlTag extends ContainerTag + implements IReversed, IStart { + public OlTag() { + super("ol"); + } +} diff --git a/src/main/java/j2html/tags/specialized/OptgroupTag.java b/src/main/java/j2html/tags/specialized/OptgroupTag.java new file mode 100644 index 00000000..df4369b4 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/OptgroupTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IDisabled; +import j2html.tags.attributes.ILabel; + +public final class OptgroupTag extends ContainerTag + implements IDisabled, ILabel { + public OptgroupTag() { + super("optgroup"); + } +} diff --git a/src/main/java/j2html/tags/specialized/OptionTag.java b/src/main/java/j2html/tags/specialized/OptionTag.java new file mode 100644 index 00000000..48ef6074 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/OptionTag.java @@ -0,0 +1,14 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IDisabled; +import j2html.tags.attributes.ILabel; +import j2html.tags.attributes.ISelected; +import j2html.tags.attributes.IValue; + +public final class OptionTag extends ContainerTag + implements IDisabled, ILabel, ISelected, IValue { + public OptionTag() { + super("option"); + } +} diff --git a/src/main/java/j2html/tags/specialized/OutputTag.java b/src/main/java/j2html/tags/specialized/OutputTag.java new file mode 100644 index 00000000..58689dca --- /dev/null +++ b/src/main/java/j2html/tags/specialized/OutputTag.java @@ -0,0 +1,13 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IFor; +import j2html.tags.attributes.IForm; +import j2html.tags.attributes.IName; + +public final class OutputTag extends ContainerTag + implements IFor, IForm, IName { + public OutputTag() { + super("output"); + } +} diff --git a/src/main/java/j2html/tags/specialized/PTag.java b/src/main/java/j2html/tags/specialized/PTag.java new file mode 100644 index 00000000..6e02cd2c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/PTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class PTag extends ContainerTag { + public PTag() { + super("p"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ParamTag.java b/src/main/java/j2html/tags/specialized/ParamTag.java new file mode 100644 index 00000000..0f71e265 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ParamTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.IName; +import j2html.tags.attributes.IValue; + +public final class ParamTag extends EmptyTag + implements IName, IValue { + public ParamTag() { + super("param"); + } +} diff --git a/src/main/java/j2html/tags/specialized/PreTag.java b/src/main/java/j2html/tags/specialized/PreTag.java new file mode 100644 index 00000000..4d1c0607 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/PreTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class PreTag extends ContainerTag { + public PreTag() { + super("pre"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ProgressTag.java b/src/main/java/j2html/tags/specialized/ProgressTag.java new file mode 100644 index 00000000..ed5ced1c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ProgressTag.java @@ -0,0 +1,12 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IMax; +import j2html.tags.attributes.IValue; + +public final class ProgressTag extends ContainerTag + implements IMax, IValue { + public ProgressTag() { + super("progress"); + } +} diff --git a/src/main/java/j2html/tags/specialized/QTag.java b/src/main/java/j2html/tags/specialized/QTag.java new file mode 100644 index 00000000..14fa8836 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/QTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.ICite; + +public final class QTag extends ContainerTag + implements ICite { + public QTag() { + super("q"); + } +} diff --git a/src/main/java/j2html/tags/specialized/RpTag.java b/src/main/java/j2html/tags/specialized/RpTag.java new file mode 100644 index 00000000..c19ac18b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/RpTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class RpTag extends ContainerTag { + public RpTag() { + super("rp"); + } +} diff --git a/src/main/java/j2html/tags/specialized/RtTag.java b/src/main/java/j2html/tags/specialized/RtTag.java new file mode 100644 index 00000000..016024f7 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/RtTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class RtTag extends ContainerTag { + public RtTag() { + super("rt"); + } +} diff --git a/src/main/java/j2html/tags/specialized/RubyTag.java b/src/main/java/j2html/tags/specialized/RubyTag.java new file mode 100644 index 00000000..841fa449 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/RubyTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class RubyTag extends ContainerTag { + public RubyTag() { + super("ruby"); + } +} diff --git a/src/main/java/j2html/tags/specialized/STag.java b/src/main/java/j2html/tags/specialized/STag.java new file mode 100644 index 00000000..c0f1de57 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/STag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class STag extends ContainerTag { + public STag() { + super("s"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SampTag.java b/src/main/java/j2html/tags/specialized/SampTag.java new file mode 100644 index 00000000..8ce6681f --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SampTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SampTag extends ContainerTag { + public SampTag() { + super("samp"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ScriptTag.java b/src/main/java/j2html/tags/specialized/ScriptTag.java new file mode 100644 index 00000000..47c39778 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ScriptTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class ScriptTag extends ContainerTag + implements IAsync, ICharset, IDefer, IOnerror, IOnload, ISrc, IType { + public ScriptTag() { + super("script"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SectionTag.java b/src/main/java/j2html/tags/specialized/SectionTag.java new file mode 100644 index 00000000..0a0d6d6e --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SectionTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SectionTag extends ContainerTag { + public SectionTag() { + super("section"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SelectTag.java b/src/main/java/j2html/tags/specialized/SelectTag.java new file mode 100644 index 00000000..9e3bb990 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SelectTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class SelectTag extends ContainerTag + implements IAutofocus, IDisabled, IForm, IMultiple, IName, IRequired, ISize { + public SelectTag() { + super("select"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SmallTag.java b/src/main/java/j2html/tags/specialized/SmallTag.java new file mode 100644 index 00000000..07f14e66 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SmallTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SmallTag extends ContainerTag { + public SmallTag() { + super("small"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SourceTag.java b/src/main/java/j2html/tags/specialized/SourceTag.java new file mode 100644 index 00000000..6707b42c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SourceTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class SourceTag extends EmptyTag + implements IMedia, ISizes, ISrc, ISrcset, IType { + public SourceTag() { + super("source"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SpanTag.java b/src/main/java/j2html/tags/specialized/SpanTag.java new file mode 100644 index 00000000..404c2c98 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SpanTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SpanTag extends ContainerTag { + public SpanTag() { + super("span"); + } +} diff --git a/src/main/java/j2html/tags/specialized/StrongTag.java b/src/main/java/j2html/tags/specialized/StrongTag.java new file mode 100644 index 00000000..a82c59ad --- /dev/null +++ b/src/main/java/j2html/tags/specialized/StrongTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class StrongTag extends ContainerTag { + public StrongTag() { + super("strong"); + } +} diff --git a/src/main/java/j2html/tags/specialized/StyleTag.java b/src/main/java/j2html/tags/specialized/StyleTag.java new file mode 100644 index 00000000..47490058 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/StyleTag.java @@ -0,0 +1,14 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IMedia; +import j2html.tags.attributes.IOnerror; +import j2html.tags.attributes.IOnload; +import j2html.tags.attributes.IType; + +public final class StyleTag extends ContainerTag + implements IMedia, IOnerror, IOnload, IType { + public StyleTag() { + super("style"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SubTag.java b/src/main/java/j2html/tags/specialized/SubTag.java new file mode 100644 index 00000000..9895a6dc --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SubTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SubTag extends ContainerTag { + public SubTag() { + super("sub"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SummaryTag.java b/src/main/java/j2html/tags/specialized/SummaryTag.java new file mode 100644 index 00000000..08bcdf71 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SummaryTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SummaryTag extends ContainerTag { + public SummaryTag() { + super("summary"); + } +} diff --git a/src/main/java/j2html/tags/specialized/SupTag.java b/src/main/java/j2html/tags/specialized/SupTag.java new file mode 100644 index 00000000..6d5ae486 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/SupTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class SupTag extends ContainerTag { + public SupTag() { + super("sup"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TableTag.java b/src/main/java/j2html/tags/specialized/TableTag.java new file mode 100644 index 00000000..60364037 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TableTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class TableTag extends ContainerTag { + public TableTag() { + super("table"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TbodyTag.java b/src/main/java/j2html/tags/specialized/TbodyTag.java new file mode 100644 index 00000000..a478a9a9 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TbodyTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class TbodyTag extends ContainerTag { + public TbodyTag() { + super("tbody"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TdTag.java b/src/main/java/j2html/tags/specialized/TdTag.java new file mode 100644 index 00000000..99589c34 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TdTag.java @@ -0,0 +1,13 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IColspan; +import j2html.tags.attributes.IHeaders; +import j2html.tags.attributes.IRowspan; + +public final class TdTag extends ContainerTag + implements IColspan, IHeaders, IRowspan { + public TdTag() { + super("td"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TextAreaTag.java b/src/main/java/j2html/tags/specialized/TextAreaTag.java new file mode 100644 index 00000000..b0a67d31 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TextAreaTag.java @@ -0,0 +1,15 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IDisabled; +import j2html.tags.attributes.IForm; + +public final class TextAreaTag extends ContainerTag + implements + IDisabled, + IForm { + + public TextAreaTag() { + super("textarea"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TextareaTag.java b/src/main/java/j2html/tags/specialized/TextareaTag.java new file mode 100644 index 00000000..250d3f0a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TextareaTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class TextareaTag extends ContainerTag + implements IAutofocus, ICols, IDirname, IDisabled, IForm, IMaxlength, IName, IPlaceholder, IReadonly, IRequired, IRows, IWrap { + public TextareaTag() { + super("textarea"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TfootTag.java b/src/main/java/j2html/tags/specialized/TfootTag.java new file mode 100644 index 00000000..fdea4251 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TfootTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class TfootTag extends ContainerTag { + public TfootTag() { + super("tfoot"); + } +} diff --git a/src/main/java/j2html/tags/specialized/ThTag.java b/src/main/java/j2html/tags/specialized/ThTag.java new file mode 100644 index 00000000..b4004d41 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/ThTag.java @@ -0,0 +1,14 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IColspan; +import j2html.tags.attributes.IHeaders; +import j2html.tags.attributes.IRowspan; +import j2html.tags.attributes.IScope; + +public final class ThTag extends ContainerTag + implements IColspan, IHeaders, IRowspan, IScope { + public ThTag() { + super("th"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TheadTag.java b/src/main/java/j2html/tags/specialized/TheadTag.java new file mode 100644 index 00000000..31108d35 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TheadTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class TheadTag extends ContainerTag { + public TheadTag() { + super("thead"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TimeTag.java b/src/main/java/j2html/tags/specialized/TimeTag.java new file mode 100644 index 00000000..f2da8a8b --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TimeTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.IDatetime; + +public final class TimeTag extends ContainerTag + implements IDatetime { + public TimeTag() { + super("time"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TitleTag.java b/src/main/java/j2html/tags/specialized/TitleTag.java new file mode 100644 index 00000000..be8a55b3 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TitleTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class TitleTag extends ContainerTag { + public TitleTag() { + super("title"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TrTag.java b/src/main/java/j2html/tags/specialized/TrTag.java new file mode 100644 index 00000000..4b825d32 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TrTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class TrTag extends ContainerTag { + public TrTag() { + super("tr"); + } +} diff --git a/src/main/java/j2html/tags/specialized/TrackTag.java b/src/main/java/j2html/tags/specialized/TrackTag.java new file mode 100644 index 00000000..3bc31e2a --- /dev/null +++ b/src/main/java/j2html/tags/specialized/TrackTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; +import j2html.tags.attributes.*; + +public final class TrackTag extends EmptyTag + implements IDefault, IKind, ILabel, IOncuechange, ISrc, ISrclang { + public TrackTag() { + super("track"); + } +} diff --git a/src/main/java/j2html/tags/specialized/UTag.java b/src/main/java/j2html/tags/specialized/UTag.java new file mode 100644 index 00000000..d961314c --- /dev/null +++ b/src/main/java/j2html/tags/specialized/UTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class UTag extends ContainerTag { + public UTag() { + super("u"); + } +} diff --git a/src/main/java/j2html/tags/specialized/UlTag.java b/src/main/java/j2html/tags/specialized/UlTag.java new file mode 100644 index 00000000..f56b6414 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/UlTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class UlTag extends ContainerTag { + public UlTag() { + super("ul"); + } +} diff --git a/src/main/java/j2html/tags/specialized/VarTag.java b/src/main/java/j2html/tags/specialized/VarTag.java new file mode 100644 index 00000000..19b3fe64 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/VarTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; + +public final class VarTag extends ContainerTag { + public VarTag() { + super("var"); + } +} diff --git a/src/main/java/j2html/tags/specialized/VideoTag.java b/src/main/java/j2html/tags/specialized/VideoTag.java new file mode 100644 index 00000000..142197f8 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/VideoTag.java @@ -0,0 +1,11 @@ +package j2html.tags.specialized; + +import j2html.tags.ContainerTag; +import j2html.tags.attributes.*; + +public final class VideoTag extends ContainerTag + implements IAutoplay, IControls, IHeight, ILoop, IMuted, IOnabort, IOncanplay, IOncanplaythrough, IOndurationchange, IOnemptied, IOnended, IOnerror, IOnloadeddata, IOnloadedmetadata, IOnloadstart, IOnpause, IOnplay, IOnplaying, IOnprogress, IOnratechange, IOnseeked, IOnseeking, IOnstalled, IOnsuspend, IOntimeupdate, IOnvolumechanged, IOnwaiting, IPoster, IPreload, ISrc, IWidth { + public VideoTag() { + super("video"); + } +} diff --git a/src/main/java/j2html/tags/specialized/WbrTag.java b/src/main/java/j2html/tags/specialized/WbrTag.java new file mode 100644 index 00000000..c3842b01 --- /dev/null +++ b/src/main/java/j2html/tags/specialized/WbrTag.java @@ -0,0 +1,9 @@ +package j2html.tags.specialized; + +import j2html.tags.EmptyTag; + +public final class WbrTag extends EmptyTag { + public WbrTag() { + super("wbr"); + } +} diff --git a/src/test/java/j2html/attributes/AttrShortFormTest.java b/src/test/java/j2html/attributes/AttrShortFormTest.java index c2ba37ae..0b601081 100644 --- a/src/test/java/j2html/attributes/AttrShortFormTest.java +++ b/src/test/java/j2html/attributes/AttrShortFormTest.java @@ -1,9 +1,8 @@ package j2html.attributes; import org.junit.Test; -import static j2html.TagCreator.attrs; -import static j2html.TagCreator.div; -import static j2html.TagCreator.input; + +import static j2html.TagCreator.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; diff --git a/src/test/java/j2html/attributes/AttributeTest.java b/src/test/java/j2html/attributes/AttributeTest.java index f98b1551..4d5f9106 100644 --- a/src/test/java/j2html/attributes/AttributeTest.java +++ b/src/test/java/j2html/attributes/AttributeTest.java @@ -2,6 +2,7 @@ import j2html.tags.ContainerTag; import org.junit.Test; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; diff --git a/src/test/java/j2html/tags/AttributesPerTagTest.java b/src/test/java/j2html/tags/AttributesPerTagTest.java new file mode 100644 index 00000000..11434368 --- /dev/null +++ b/src/test/java/j2html/tags/AttributesPerTagTest.java @@ -0,0 +1,70 @@ +package j2html.tags; + +import org.junit.Test; + +import static j2html.TagCreator.*; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +public final class AttributesPerTagTest { + + //This class should contain Tests that check + //if the generated Interface Methods indeed produce the correct HTML for + //their custom HTML Attributes. + + //TODO: WARNING: only testing .with$ATTR and .is$ATTR Methods, not the 'Cond' Variants + + @Test + public void testAttributesPerTag1(){ + //TEST: + //accept, action, alt, async, + //autocomplete, autofocus, + //autoplay, charset, checked + assertThat(input().withAccept("image/*").render(), is("")); + assertThat(form().withAction("/1/2").render(), is("
")); + assertThat(img().withAlt("horse").render(), is("\"horse\"")); + assertThat(script().isAsync().render(), is("")); + assertThat(form().isAutocomplete().render(), is("
")); + assertThat(input().isAutofocus().render(), is("")); + assertThat(video().isAutoplay().render(), is("")); + assertThat(script().withCharset("mycharset").render(), is("")); + assertThat(input().isChecked().render(), is("")); + } + + @Test + public void testAttributesPerTag2(){ + //TEST: cite, cols, colspan, content, controls + assertThat(blockquote().withCite("hi").render(), is("
")); + assertThat(textarea().withCols("3").render(), is("")); + assertThat(td().withColspan("4").render(), is("")); + assertThat(meta().withContent("mycontent").render(), is("")); + assertThat(audio().isControls().render(), is("")); + } + + @Test + public void testAttributesPerTag3(){ + //TEST: coords, data, datetime, default, defer, dirname + assertThat(area().withCoords("0,0,82,126").render(), is("")); + assertThat(object().withData("/1/2").render(), is("")); + assertThat(time().withDatetime("2015-11-15T22:55:03Z").render(), is("")); + assertThat(object().withData("/1/2").render(), is("")); + assertThat(track().isDefault().render(), is("")); + assertThat(script().isDefer().render(), is("")); + assertThat(input().withDirname("fname.dir").render(), is("")); + } + + @Test + public void testAttributesPerTag4(){ + //TEST: disabled, download, enctype, for, form, formaction + assertThat(input().isDisabled().render(), is("")); + assertThat(a().isDownload().render(), is("")); + assertThat(form().withEnctype("enc").render(), is("
")); + assertThat(label().withFor("idk").render(), is("")); + assertThat(button().withForm("myform").render(), is("")); + assertThat(button().withFormaction("/1/2").render(), is("")); + } + + //TODO: leaving the rest of the tests for the rest + //of the custom attributes for later, or for other people + //to possibly implement +} diff --git a/src/test/java/j2html/tags/ComplexRenderTest.java b/src/test/java/j2html/tags/ComplexRenderTest.java index 02e196a2..aad24a65 100644 --- a/src/test/java/j2html/tags/ComplexRenderTest.java +++ b/src/test/java/j2html/tags/ComplexRenderTest.java @@ -43,10 +43,10 @@ private String renderTest() { main().with( h2("Test Form"), div().with( - input().withType("email").withName("email").withPlaceholder("Email"), - input().withType("password").withName("password").withPlaceholder("Password") - ).condWith(USER_SHOULD_LOG_IN, button().withType("submit").withText("Login") - ).condWith(USER_SHOULD_SIGN_UP, button().withType("submit").withText("Signup")) + input().attr("type","email").withName("email").withPlaceholder("Email"), + input().attr("type","password").withName("password").withPlaceholder("Password") + ).condWith(USER_SHOULD_LOG_IN, button().attr("type","submit").withText("Login") + ).condWith(USER_SHOULD_SIGN_UP, button().attr("type","submit").withText("Signup")) ), footer().attr(Attr.CLASS, "footer").condAttr(1 == 1, Attr.ID, "id").withText("Test Footer"), script().withSrc("/testScript.js") @@ -73,10 +73,10 @@ private String renderTest2() { main( h2("Test Form"), div( - input().withType("email").withName("email").withPlaceholder("Email"), - input().withType("password").withName("password").withPlaceholder("Password"), - iff(USER_SHOULD_LOG_IN, button().withType("submit").withText("Login")), - iff(USER_SHOULD_SIGN_UP, button().withType("submit").withText("Signup")) + input().attr("type","email").withName("email").withPlaceholder("Email"), + input().attr("type","password").withName("password").withPlaceholder("Password"), + iff(USER_SHOULD_LOG_IN, button().attr("type","submit").withText("Login")), + iff(USER_SHOULD_SIGN_UP, button().attr("type","submit").withText("Signup")) ) ), footer("Test Footer").attr(Attr.CLASS, "footer").condAttr(1 == 1, Attr.ID, "id"), @@ -104,10 +104,10 @@ private String renderTest3() { main( h2("Test Form"), div( - input().withType("email").withName("email").withPlaceholder("Email"), - input().withType("password").withName("password").withPlaceholder("Password"), - iff(USER_SHOULD_LOG_IN, button().withType("submit").withText("Login")), - iff(USER_SHOULD_SIGN_UP, button().withType("submit").withText("Signup")) + input().attr("type","email").withName("email").withPlaceholder("Email"), + input().attr("type","password").withName("password").withPlaceholder("Password"), + iff(USER_SHOULD_LOG_IN, button().attr("type","submit").withText("Login")), + iff(USER_SHOULD_SIGN_UP, button().attr("type","submit").withText("Signup")) ) ), footer("Test Footer").attr(Attr.CLASS, "footer").condAttr(1 == 1, Attr.ID, "id"), diff --git a/src/test/java/j2html/tags/ConvenienceMethodTest.java b/src/test/java/j2html/tags/ConvenienceMethodTest.java index 006f658f..8ac4bb72 100644 --- a/src/test/java/j2html/tags/ConvenienceMethodTest.java +++ b/src/test/java/j2html/tags/ConvenienceMethodTest.java @@ -15,8 +15,8 @@ public class ConvenienceMethodTest { @Test public void testAllConvenienceMethods() throws Exception { - assertThat(input().isAutoComplete().render(), is("")); - assertThat(input().isAutoFocus().render(), is("")); + assertThat(input().isAutocomplete().render(), is("")); + assertThat(input().isAutofocus().render(), is("")); assertThat(input().isHidden().render(), is("")); assertThat(input().isRequired().render(), is("")); assertThat(img().withAlt("An image").render(), is("\"An")); @@ -32,12 +32,12 @@ public void testAllConvenienceMethods() throws Exception { assertThat(input().withPlaceholder("test-placeholder").render(), is("")); assertThat(a().withTarget("_blank").render(), is("")); assertThat(a().withTitle("Title").render(), is("")); - assertThat(input().withType("email").render(), is("")); + assertThat(input().attr("type","email").render(), is("")); assertThat(link().withRel("stylesheet").render(), is("")); - assertThat(link().withRole("role").render(), is("")); + assertThat(link().attr("role","role").render(), is("")); assertThat(img().withSrc("/img/test.png").render(), is("")); assertThat(input().withStep("0.1").render(), is("")); assertThat(div().withStyle("background:red;").render(), is("
")); - assertThat(input().withValue("test-value").render(), is("")); + assertThat(input().attr("value","test-value").render(), is("")); } } diff --git a/src/test/java/j2html/tags/TagTest.java b/src/test/java/j2html/tags/TagTest.java index 4b71fdb9..d9f8d65e 100644 --- a/src/test/java/j2html/tags/TagTest.java +++ b/src/test/java/j2html/tags/TagTest.java @@ -46,7 +46,9 @@ public void testOpenTag() throws Exception { assertThat(testTag.renderOpenTag(), is("")); ContainerTag complexTestTag = new ContainerTag("input"); - complexTestTag.withType("password").withId("password").withName("password").withPlaceholder("Password").isRequired(); + complexTestTag.attr("type","password").withId("password") + .attr("name","password") + .attr("placeholder","Password").attr("required"); String expectedResult = ""; assertThat(complexTestTag.renderOpenTag(), is(expectedResult)); } @@ -61,7 +63,7 @@ public void testCloseTag() throws Exception { public void testSelfClosingTags() throws Exception { Config.closeEmptyTags = true; assertThat(img().withSrc("/test.png").render(), is("")); - assertThat(input().withType("text").render(), is("")); + assertThat(input().attr("type","text").render(), is("")); Config.closeEmptyTags = false; } @@ -72,14 +74,14 @@ public void testFormattedTags() throws Exception { // better test in ComplexRend @Test public void testEquals() throws Exception { - Tag tagOne = tag("p").withClass("class").withText("Test"); + Tag tagOne = tag("p").withText("Test").withClass("class"); Tag tagTwo = p("Test").withClass("class"); assertThat(tagOne.equals(tagTwo), is(true)); } @Test public void testAcceptObjectValueAttribute() throws Exception { - ContainerTag complexTestTag = new ContainerTag("input") + Tag complexTestTag = new ContainerTag("input") .attr("attr1", "value1") .attr("attr2", 2) .attr("attr3", null); @@ -96,22 +98,22 @@ public void testWithClasses() throws Exception { @Test public void testEmptyAttribute() throws Exception { - ContainerTag testTagWithAttrValueNull = new ContainerTag("a").attr("attribute", null); + Tag testTagWithAttrValueNull = new ContainerTag("a").attr("attribute", null); assertThat(testTagWithAttrValueNull.render(), is("")); - ContainerTag testTagAttrWithoutAttr = new ContainerTag("a").attr("attribute"); + Tag testTagAttrWithoutAttr = new ContainerTag("a").attr("attribute"); assertThat(testTagAttrWithoutAttr.render(), is("")); } @Test public void testDynamicAttribute() throws Exception { - ContainerTag testTagWithAttrValueNull = new ContainerTag("a").attr(new DynamicHrefAttribute()); + Tag testTagWithAttrValueNull = new ContainerTag("a").attr(new DynamicHrefAttribute()); assertThat(testTagWithAttrValueNull.render(), is("")); } @Test public void testDynamicAttributeReplacement() throws Exception { - ContainerTag testTagWithAttrValueNull = new ContainerTag("a").attr("href", "/link").attr(new DynamicHrefAttribute()); + Tag testTagWithAttrValueNull = new ContainerTag("a").attr("href", "/link").attr(new DynamicHrefAttribute()); assertThat(testTagWithAttrValueNull.render(), is("")); }