From 38c6fa5c7a61c7f6d4d2db5f12f9c60d477fb397 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Fri, 28 Jul 2017 08:57:34 +0900 Subject: [PATCH] HADOOP-11875. [JDK9] Adding a second copy of Hamlet without _ as a one-character identifier. --- .../v2/app/webapp/AppController.java | 10 +- .../mapreduce/v2/app/webapp/AppView.java | 4 +- .../mapreduce/v2/app/webapp/ConfBlock.java | 36 +- .../v2/app/webapp/CountersBlock.java | 38 +- .../mapreduce/v2/app/webapp/CountersPage.java | 4 +- .../mapreduce/v2/app/webapp/InfoPage.java | 2 +- .../mapreduce/v2/app/webapp/JobBlock.java | 95 +- .../mapreduce/v2/app/webapp/JobConfPage.java | 3 +- .../mapreduce/v2/app/webapp/JobPage.java | 2 +- .../mapreduce/v2/app/webapp/JobsBlock.java | 24 +- .../mapreduce/v2/app/webapp/NavBlock.java | 38 +- .../v2/app/webapp/SingleCounterBlock.java | 28 +- .../v2/app/webapp/SingleCounterPage.java | 3 +- .../mapreduce/v2/app/webapp/TaskPage.java | 20 +- .../mapreduce/v2/app/webapp/TasksBlock.java | 12 +- .../mapreduce/v2/app/webapp/TasksPage.java | 2 +- .../mapreduce/v2/hs/webapp/HsAboutPage.java | 7 +- .../mapreduce/v2/hs/webapp/HsConfPage.java | 2 +- .../v2/hs/webapp/HsCountersPage.java | 4 +- .../mapreduce/v2/hs/webapp/HsJobBlock.java | 98 +- .../mapreduce/v2/hs/webapp/HsJobPage.java | 2 +- .../mapreduce/v2/hs/webapp/HsJobsBlock.java | 46 +- .../mapreduce/v2/hs/webapp/HsLogsPage.java | 2 +- .../mapreduce/v2/hs/webapp/HsNavBlock.java | 30 +- .../v2/hs/webapp/HsSingleCounterPage.java | 2 +- .../mapreduce/v2/hs/webapp/HsTaskPage.java | 53 +- .../mapreduce/v2/hs/webapp/HsTasksBlock.java | 57 +- .../mapreduce/v2/hs/webapp/HsTasksPage.java | 2 +- .../hadoop/mapreduce/v2/hs/webapp/HsView.java | 4 +- .../hadoop-yarn/hadoop-yarn-common/pom.xml | 22 + .../hadoop/yarn/webapp/ResponseInfo.java | 4 +- .../yarn/webapp/example/HelloWorld.java | 4 +- .../hadoop/yarn/webapp/example/MyApp.java | 6 +- .../hadoop/yarn/webapp/hamlet/Hamlet.java | 4 + .../hadoop/yarn/webapp/hamlet/HamletGen.java | 2 + .../hadoop/yarn/webapp/hamlet/HamletImpl.java | 2 + .../hadoop/yarn/webapp/hamlet/HamletSpec.java | 2 + .../yarn/webapp/hamlet/package-info.java | 6 + .../hadoop/yarn/webapp/hamlet2/Hamlet.java | 30557 ++++++++++++++++ .../hadoop/yarn/webapp/hamlet2/HamletGen.java | 449 + .../yarn/webapp/hamlet2/HamletImpl.java | 385 + .../yarn/webapp/hamlet2/HamletSpec.java | 3101 ++ .../yarn/webapp/hamlet2/package-info.java | 27 + .../yarn/webapp/log/AggregatedLogsBlock.java | 66 +- .../webapp/log/AggregatedLogsNavBlock.java | 4 +- .../yarn/webapp/log/AggregatedLogsPage.java | 2 +- .../hadoop/yarn/webapp/view/ErrorPage.java | 12 +- .../hadoop/yarn/webapp/view/FooterBlock.java | 2 +- .../hadoop/yarn/webapp/view/HeaderBlock.java | 6 +- .../hadoop/yarn/webapp/view/HtmlBlock.java | 2 +- .../hadoop/yarn/webapp/view/HtmlPage.java | 12 +- .../hadoop/yarn/webapp/view/InfoBlock.java | 28 +- .../hadoop/yarn/webapp/view/JQueryUI.java | 14 +- .../hadoop/yarn/webapp/view/LipsumBlock.java | 4 +- .../hadoop/yarn/webapp/view/NavBlock.java | 10 +- .../yarn/webapp/view/TwoColumnCssLayout.java | 20 +- .../yarn/webapp/view/TwoColumnLayout.java | 20 +- .../hadoop/yarn/webapp/TestSubViews.java | 10 +- .../apache/hadoop/yarn/webapp/TestWebApp.java | 28 +- .../yarn/webapp/view/TestHtmlBlock.java | 10 +- .../hadoop/yarn/webapp/view/TestHtmlPage.java | 9 +- .../yarn/webapp/view/TestInfoBlock.java | 6 +- .../webapp/view/TestTwoColumnCssPage.java | 6 +- .../webapp/AHSErrorsAndWarningsPage.java | 2 +- .../webapp/AHSLogsPage.java | 2 +- .../webapp/AHSView.java | 4 +- .../webapp/AboutBlock.java | 8 +- .../webapp/AboutPage.java | 5 +- .../webapp/AppAttemptPage.java | 2 +- .../webapp/AppPage.java | 2 +- .../webapp/ContainerPage.java | 2 +- .../webapp/NavBlock.java | 28 +- .../yarn/server/webapp/AppAttemptBlock.java | 31 +- .../hadoop/yarn/server/webapp/AppBlock.java | 66 +- .../hadoop/yarn/server/webapp/AppsBlock.java | 14 +- .../yarn/server/webapp/ContainerBlock.java | 23 +- .../server/webapp/ErrorsAndWarningsBlock.java | 50 +- .../webapp/AllApplicationsPage.java | 28 +- .../nodemanager/webapp/AllContainersPage.java | 30 +- .../nodemanager/webapp/ApplicationPage.java | 25 +- .../nodemanager/webapp/ContainerLogsPage.java | 17 +- .../nodemanager/webapp/ContainerPage.java | 31 +- .../webapp/NMErrorsAndWarningsPage.java | 2 +- .../server/nodemanager/webapp/NMView.java | 4 +- .../server/nodemanager/webapp/NavBlock.java | 28 +- .../server/nodemanager/webapp/NodePage.java | 28 +- .../resourcemanager/webapp/AboutBlock.java | 20 +- .../resourcemanager/webapp/AboutPage.java | 2 +- .../webapp/AppAttemptPage.java | 2 +- .../webapp/AppLogAggregationStatusPage.java | 2 +- .../resourcemanager/webapp/AppPage.java | 2 +- .../webapp/AppsBlockWithMetrics.java | 5 +- .../webapp/CapacitySchedulerPage.java | 220 +- .../resourcemanager/webapp/ContainerPage.java | 2 +- .../webapp/DefaultSchedulerPage.java | 56 +- .../resourcemanager/webapp/ErrorBlock.java | 2 +- .../webapp/FairSchedulerAppsBlock.java | 12 +- .../webapp/FairSchedulerPage.java | 116 +- .../webapp/MetricsOverviewTable.java | 124 +- .../resourcemanager/webapp/NavBlock.java | 34 +- .../webapp/NodeLabelsPage.java | 18 +- .../resourcemanager/webapp/NodesPage.java | 16 +- .../webapp/RMAppAttemptBlock.java | 48 +- .../resourcemanager/webapp/RMAppBlock.java | 28 +- .../RMAppLogAggregationStatusBlock.java | 34 +- .../resourcemanager/webapp/RMAppsBlock.java | 15 +- .../webapp/RMErrorsAndWarningsPage.java | 2 +- .../webapp/RedirectionErrorPage.java | 2 +- .../server/resourcemanager/webapp/RmView.java | 4 +- .../webapp/SchedulerPageUtil.java | 8 +- .../webapp/SCMOverviewPage.java | 26 +- .../yarn/server/webproxy/ProxyUtils.java | 16 +- .../server/webproxy/WebAppProxyServlet.java | 14 +- 113 files changed, 35634 insertions(+), 1100 deletions(-) create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/Hamlet.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletGen.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletImpl.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletSpec.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/package-info.java diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java index 1c90cb9d172..6db1274a924 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java @@ -84,11 +84,11 @@ public class AppController extends Controller implements AMParams { public void info() { AppInfo info = new AppInfo(app, app.context); info("Application Master Overview"). - _("Application ID:", info.getId()). - _("Application Name:", info.getName()). - _("User:", info.getUser()). - _("Started on:", Times.format(info.getStartTime())). - _("Elasped: ", org.apache.hadoop.util.StringUtils.formatTime( + __("Application ID:", info.getId()). + __("Application Name:", info.getName()). + __("User:", info.getUser()). + __("Started on:", Times.format(info.getStartTime())). + __("Elasped: ", org.apache.hadoop.util.StringUtils.formatTime( info.getElapsedTime() )); render(InfoPage.class); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppView.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppView.java index 7fde95b592a..7a3e2b357e3 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppView.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppView.java @@ -25,14 +25,14 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI.*; public class AppView extends TwoColumnLayout { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "jobs"); set(initID(DATATABLES, "jobs"), jobsTableInit()); setTableStyles(html, "jobs"); } - protected void commonPreHead(Page.HTML<_> html) { + protected void commonPreHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:1}"); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/ConfBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/ConfBlock.java index 98a2ce1d0cc..76ef6bdcb65 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/ConfBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/ConfBlock.java @@ -30,10 +30,10 @@ import org.apache.hadoop.mapreduce.v2.app.job.Job; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ConfEntryInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ConfInfo; import org.apache.hadoop.mapreduce.v2.util.MRApps; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec.InputType; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.HamletSpec.InputType; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -56,21 +56,21 @@ public class ConfBlock extends HtmlBlock { String jid = $(JOB_ID); if (jid.isEmpty()) { html. - p()._("Sorry, can't do anything without a JobID.")._(); + p().__("Sorry, can't do anything without a JobID.").__(); return; } JobId jobID = MRApps.toJobID(jid); Job job = appContext.getJob(jobID); if (job == null) { html. - p()._("Sorry, ", jid, " not found.")._(); + p().__("Sorry, ", jid, " not found.").__(); return; } Path confPath = job.getConfFile(); try { ConfInfo info = new ConfInfo(job); - html.div().a("/jobhistory/downloadconf/" + jid, confPath.toString())._(); + html.div().a("/jobhistory/downloadconf/" + jid, confPath.toString()).__(); TBODY> tbody = html. // Tasks table table("#conf"). @@ -79,8 +79,8 @@ public class ConfBlock extends HtmlBlock { th(_TH, "key"). th(_TH, "value"). th(_TH, "source chain"). - _(). - _(). + __(). + __(). tbody(); for (ConfEntryInfo entry : info.getProperties()) { StringBuffer buffer = new StringBuffer(); @@ -100,20 +100,20 @@ public class ConfBlock extends HtmlBlock { td(entry.getName()). td(entry.getValue()). td(buffer.toString()). - _(); + __(); } - tbody._(). + tbody.__(). tfoot(). tr(). - th().input("search_init").$type(InputType.text).$name("key").$value("key")._()._(). - th().input("search_init").$type(InputType.text).$name("value").$value("value")._()._(). - th().input("search_init").$type(InputType.text).$name("source chain").$value("source chain")._()._(). - _(). - _(). - _(); + th().input("search_init").$type(InputType.text).$name("key").$value("key").__().__(). + th().input("search_init").$type(InputType.text).$name("value").$value("value").__().__(). + th().input("search_init").$type(InputType.text).$name("source chain").$value("source chain").__().__(). + __(). + __(). + __(); } catch(IOException e) { LOG.error("Error while reading "+confPath, e); - html.p()._("Sorry got an error while reading conf file. ",confPath); + html.p().__("Sorry got an error while reading conf file. ", confPath); } } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java index 568658e1587..4b9e6f41d07 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java @@ -34,13 +34,13 @@ import org.apache.hadoop.mapreduce.v2.app.AppContext; import org.apache.hadoop.mapreduce.v2.app.job.Job; import org.apache.hadoop.mapreduce.v2.app.job.Task; import org.apache.hadoop.mapreduce.v2.util.MRApps; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TD; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.THEAD; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TD; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.THEAD; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -60,12 +60,12 @@ public class CountersBlock extends HtmlBlock { @Override protected void render(Block html) { if (job == null) { html. - p()._("Sorry, no counters for nonexistent", $(JOB_ID, "job"))._(); + p().__("Sorry, no counters for nonexistent", $(JOB_ID, "job")).__(); return; } if (!$(TASK_ID).isEmpty() && task == null) { html. - p()._("Sorry, no counters for nonexistent", $(TASK_ID, "task"))._(); + p().__("Sorry, no counters for nonexistent", $(TASK_ID, "task")).__(); return; } @@ -75,7 +75,7 @@ public class CountersBlock extends HtmlBlock { type = $(JOB_ID, "the job"); } html. - p()._("Sorry it looks like ",type," has no counters.")._(); + p().__("Sorry it looks like ", type, " has no counters.").__(); return; } @@ -97,7 +97,7 @@ public class CountersBlock extends HtmlBlock { thead(). tr(). th(".group.ui-state-default", "Counter Group"). - th(".ui-state-default", "Counters")._()._(). + th(".ui-state-default", "Counters").__().__(). tbody(); for (CounterGroup g : total) { CounterGroup mg = map == null ? null : map.getGroup(g.getName()); @@ -109,7 +109,7 @@ public class CountersBlock extends HtmlBlock { TR>>>>>>> groupHeadRow = tbody. tr(). th().$title(g.getName()).$class("ui-state-default"). - _(fixGroupDisplayName(g.getDisplayName()))._(). + __(fixGroupDisplayName(g.getDisplayName())).__(). td().$class(C_TABLE). table(".dt-counters").$id(job.getID()+"."+g.getName()). thead(). @@ -120,20 +120,20 @@ public class CountersBlock extends HtmlBlock { } // Ditto TBODY>>>>>> group = groupHeadRow. - th(map == null ? "Value" : "Total")._()._(). + th(map == null ? "Value" : "Total").__().__(). tbody(); for (Counter counter : g) { // Ditto TR>>>>>>> groupRow = group. tr(); if (task == null && mg == null && rg == null) { - groupRow.td().$title(counter.getName())._(counter.getDisplayName()). - _(); + groupRow.td().$title(counter.getName()).__(counter.getDisplayName()). + __(); } else { groupRow.td().$title(counter.getName()). a(url(urlBase,urlId,g.getName(), counter.getName()), counter.getDisplayName()). - _(); + __(); } if (map != null) { Counter mc = mg == null ? null : mg.findCounter(counter.getName()); @@ -142,11 +142,11 @@ public class CountersBlock extends HtmlBlock { td(mc == null ? "0" : String.format("%,d", mc.getValue())). td(rc == null ? "0" : String.format("%,d", rc.getValue())); } - groupRow.td(String.format("%,d", counter.getValue()))._(); + groupRow.td(String.format("%,d", counter.getValue())).__(); } - group._()._()._()._(); + group.__().__().__().__(); } - tbody._()._()._(); + tbody.__().__().__(); } private void getCounters(AppContext ctx) { diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersPage.java index d7afcd84677..e7809075b73 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersPage.java @@ -25,7 +25,7 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI.*; public class CountersPage extends AppView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); String tid = $(TASK_ID); @@ -39,7 +39,7 @@ public class CountersPage extends AppView { "{bJQueryUI:true, sDom:'t', iDisplayLength:-1}"); } - @Override protected void postHead(Page.HTML<_> html) { + @Override protected void postHead(Page.HTML<__> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/InfoPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/InfoPage.java index 5163a011e9b..3dd64f58bf1 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/InfoPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/InfoPage.java @@ -23,7 +23,7 @@ import org.apache.hadoop.yarn.webapp.view.InfoBlock; public class InfoPage extends AppView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setTitle("About the Application Master"); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobBlock.java index a599870b451..77ea55e03e3 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobBlock.java @@ -30,7 +30,6 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI._TH; import java.util.Date; import java.util.List; -import org.apache.hadoop.http.HttpConfig; import org.apache.hadoop.mapreduce.v2.api.records.AMInfo; import org.apache.hadoop.mapreduce.v2.api.records.JobId; import org.apache.hadoop.mapreduce.v2.app.AppContext; @@ -41,9 +40,9 @@ import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.mapreduce.v2.util.MRApps.TaskAttemptStateUI; import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; import org.apache.hadoop.util.StringUtils; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -60,14 +59,14 @@ public class JobBlock extends HtmlBlock { String jid = $(JOB_ID); if (jid.isEmpty()) { html. - p()._("Sorry, can't do anything without a JobID.")._(); + p().__("Sorry, can't do anything without a JobID.").__(); return; } JobId jobID = MRApps.toJobID(jid); Job job = appContext.getJob(jobID); if (job == null) { html. - p()._("Sorry, ", jid, " not found.")._(); + p().__("Sorry, ", jid, " not found.").__(); return; } @@ -77,15 +76,15 @@ public class JobBlock extends HtmlBlock { JobInfo jinfo = new JobInfo(job, true); info("Job Overview"). - _("Job Name:", jinfo.getName()). - _("User Name:", jinfo.getUserName()). - _("Queue Name:", jinfo.getQueueName()). - _("State:", jinfo.getState()). - _("Uberized:", jinfo.isUberized()). - _("Started:", new Date(jinfo.getStartTime())). - _("Elapsed:", StringUtils.formatTime(jinfo.getElapsedTime())); + __("Job Name:", jinfo.getName()). + __("User Name:", jinfo.getUserName()). + __("Queue Name:", jinfo.getQueueName()). + __("State:", jinfo.getState()). + __("Uberized:", jinfo.isUberized()). + __("Started:", new Date(jinfo.getStartTime())). + __("Elapsed:", StringUtils.formatTime(jinfo.getElapsedTime())); DIV div = html. - _(InfoBlock.class). + __(InfoBlock.class). div(_INFO_WRAP); // MRAppMasters Table @@ -93,13 +92,13 @@ public class JobBlock extends HtmlBlock { table. tr(). th(amString). - _(). + __(). tr(). th(_TH, "Attempt Number"). th(_TH, "Start Time"). th(_TH, "Node"). th(_TH, "Logs"). - _(); + __(); for (AMInfo amInfo : amInfos) { AMAttemptInfo attempt = new AMAttemptInfo(amInfo, jinfo.getId(), jinfo.getUserName()); @@ -109,14 +108,14 @@ public class JobBlock extends HtmlBlock { td(new Date(attempt.getStartTime()).toString()). td().a(".nodelink", url(MRWebAppUtil.getYARNWebappScheme(), attempt.getNodeHttpAddress()), - attempt.getNodeHttpAddress())._(). + attempt.getNodeHttpAddress()).__(). td().a(".logslink", url(attempt.getLogsLink()), - "logs")._(). - _(); + "logs").__(). + __(); } - table._(); - div._(); + table.__(); + div.__(); html.div(_INFO_WRAP). // Tasks table @@ -127,30 +126,30 @@ public class JobBlock extends HtmlBlock { th(_TH, "Total"). th(_TH, "Pending"). th(_TH, "Running"). - th(_TH, "Complete")._(). + th(_TH, "Complete").__(). tr(_ODD). th("Map"). td(). div(_PROGRESSBAR). $title(join(jinfo.getMapProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). - $style(join("width:", jinfo.getMapProgressPercent(), '%'))._()._()._(). - td().a(url("tasks", jid, "m", "ALL"),String.valueOf(jinfo.getMapsTotal()))._(). - td().a(url("tasks", jid, "m", "PENDING"),String.valueOf(jinfo.getMapsPending()))._(). - td().a(url("tasks", jid, "m", "RUNNING"),String.valueOf(jinfo.getMapsRunning()))._(). - td().a(url("tasks", jid, "m", "COMPLETED"),String.valueOf(jinfo.getMapsCompleted()))._()._(). + $style(join("width:", jinfo.getMapProgressPercent(), '%')).__().__().__(). + td().a(url("tasks", jid, "m", "ALL"), String.valueOf(jinfo.getMapsTotal())).__(). + td().a(url("tasks", jid, "m", "PENDING"), String.valueOf(jinfo.getMapsPending())).__(). + td().a(url("tasks", jid, "m", "RUNNING"), String.valueOf(jinfo.getMapsRunning())).__(). + td().a(url("tasks", jid, "m", "COMPLETED"), String.valueOf(jinfo.getMapsCompleted())).__().__(). tr(_EVEN). th("Reduce"). td(). div(_PROGRESSBAR). $title(join(jinfo.getReduceProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). - $style(join("width:", jinfo.getReduceProgressPercent(), '%'))._()._()._(). - td().a(url("tasks", jid, "r", "ALL"),String.valueOf(jinfo.getReducesTotal()))._(). - td().a(url("tasks", jid, "r", "PENDING"),String.valueOf(jinfo.getReducesPending()))._(). - td().a(url("tasks", jid, "r", "RUNNING"),String.valueOf(jinfo.getReducesRunning()))._(). - td().a(url("tasks", jid, "r", "COMPLETED"),String.valueOf(jinfo.getReducesCompleted()))._()._() - ._(). + $style(join("width:", jinfo.getReduceProgressPercent(), '%')).__().__().__(). + td().a(url("tasks", jid, "r", "ALL"), String.valueOf(jinfo.getReducesTotal())).__(). + td().a(url("tasks", jid, "r", "PENDING"), String.valueOf(jinfo.getReducesPending())).__(). + td().a(url("tasks", jid, "r", "RUNNING"), String.valueOf(jinfo.getReducesRunning())).__(). + td().a(url("tasks", jid, "r", "COMPLETED"), String.valueOf(jinfo.getReducesCompleted())).__().__() + .__(). // Attempts table table("#job"). tr(). @@ -159,45 +158,45 @@ public class JobBlock extends HtmlBlock { th(_TH, "Running"). th(_TH, "Failed"). th(_TH, "Killed"). - th(_TH, "Successful")._(). + th(_TH, "Successful").__(). tr(_ODD). th("Maps"). td().a(url("attempts", jid, "m", TaskAttemptStateUI.NEW.toString()), - String.valueOf(jinfo.getNewMapAttempts()))._(). + String.valueOf(jinfo.getNewMapAttempts())).__(). td().a(url("attempts", jid, "m", TaskAttemptStateUI.RUNNING.toString()), - String.valueOf(jinfo.getRunningMapAttempts()))._(). + String.valueOf(jinfo.getRunningMapAttempts())).__(). td().a(url("attempts", jid, "m", TaskAttemptStateUI.FAILED.toString()), - String.valueOf(jinfo.getFailedMapAttempts()))._(). + String.valueOf(jinfo.getFailedMapAttempts())).__(). td().a(url("attempts", jid, "m", TaskAttemptStateUI.KILLED.toString()), - String.valueOf(jinfo.getKilledMapAttempts()))._(). + String.valueOf(jinfo.getKilledMapAttempts())).__(). td().a(url("attempts", jid, "m", TaskAttemptStateUI.SUCCESSFUL.toString()), - String.valueOf(jinfo.getSuccessfulMapAttempts()))._(). - _(). + String.valueOf(jinfo.getSuccessfulMapAttempts())).__(). + __(). tr(_EVEN). th("Reduces"). td().a(url("attempts", jid, "r", TaskAttemptStateUI.NEW.toString()), - String.valueOf(jinfo.getNewReduceAttempts()))._(). + String.valueOf(jinfo.getNewReduceAttempts())).__(). td().a(url("attempts", jid, "r", TaskAttemptStateUI.RUNNING.toString()), - String.valueOf(jinfo.getRunningReduceAttempts()))._(). + String.valueOf(jinfo.getRunningReduceAttempts())).__(). td().a(url("attempts", jid, "r", TaskAttemptStateUI.FAILED.toString()), - String.valueOf(jinfo.getFailedReduceAttempts()))._(). + String.valueOf(jinfo.getFailedReduceAttempts())).__(). td().a(url("attempts", jid, "r", TaskAttemptStateUI.KILLED.toString()), - String.valueOf(jinfo.getKilledReduceAttempts()))._(). + String.valueOf(jinfo.getKilledReduceAttempts())).__(). td().a(url("attempts", jid, "r", TaskAttemptStateUI.SUCCESSFUL.toString()), - String.valueOf(jinfo.getSuccessfulReduceAttempts()))._(). - _(). - _(). - _(); + String.valueOf(jinfo.getSuccessfulReduceAttempts())).__(). + __(). + __(). + __(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobConfPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobConfPage.java index 983859e7d67..4d6a3e2b634 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobConfPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobConfPage.java @@ -27,7 +27,6 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI.initID; import static org.apache.hadoop.yarn.webapp.view.JQueryUI.postInitID; import static org.apache.hadoop.yarn.webapp.view.JQueryUI.tableInit; -import org.apache.hadoop.mapreduce.v2.app.webapp.ConfBlock; import org.apache.hadoop.yarn.webapp.SubView; /** @@ -39,7 +38,7 @@ public class JobConfPage extends AppView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String jobID = $(JOB_ID); set(TITLE, jobID.isEmpty() ? "Bad request: missing job ID" : join("Configuration for MapReduce Job ", $(JOB_ID))); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobPage.java index 00f4750fd34..6508fb88adb 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobPage.java @@ -27,7 +27,7 @@ import org.apache.hadoop.yarn.webapp.SubView; public class JobPage extends AppView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String jobID = $(JOB_ID); set(TITLE, jobID.isEmpty() ? "Bad request: missing job ID" : join("MapReduce Job ", $(JOB_ID))); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobsBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobsBlock.java index 720219ece15..ff4bc00fe22 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobsBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/JobsBlock.java @@ -25,9 +25,9 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI._PROGRESSBAR_VALUE; import org.apache.hadoop.mapreduce.v2.app.AppContext; import org.apache.hadoop.mapreduce.v2.app.job.Job; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobInfo; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -53,34 +53,34 @@ public class JobsBlock extends HtmlBlock { th("Maps Completed"). th("Reduce Progress"). th("Reduces Total"). - th("Reduces Completed")._()._(). + th("Reduces Completed").__().__(). tbody(); for (Job j : appContext.getAllJobs().values()) { JobInfo job = new JobInfo(j, false); tbody. tr(). td(). - span().$title(String.valueOf(job.getId()))._(). // for sorting - a(url("job", job.getId()), job.getId())._(). + span().$title(String.valueOf(job.getId())).__(). // for sorting + a(url("job", job.getId()), job.getId()).__(). td(job.getName()). td(job.getState()). td(). - span().$title(job.getMapProgressPercent())._(). // for sorting + span().$title(job.getMapProgressPercent()).__(). // for sorting div(_PROGRESSBAR). $title(join(job.getMapProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). - $style(join("width:", job.getMapProgressPercent(), '%'))._()._()._(). + $style(join("width:", job.getMapProgressPercent(), '%')).__().__().__(). td(String.valueOf(job.getMapsTotal())). td(String.valueOf(job.getMapsCompleted())). td(). - span().$title(job.getReduceProgressPercent())._(). // for sorting + span().$title(job.getReduceProgressPercent()).__(). // for sorting div(_PROGRESSBAR). $title(join(job.getReduceProgressPercent(), '%')). // tooltip div(_PROGRESSBAR_VALUE). - $style(join("width:", job.getReduceProgressPercent(), '%'))._()._()._(). + $style(join("width:", job.getReduceProgressPercent(), '%')).__().__().__(). td(String.valueOf(job.getReducesTotal())). - td(String.valueOf(job.getReducesCompleted()))._(); + td(String.valueOf(job.getReducesCompleted())).__(); } - tbody._()._(); + tbody.__().__(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/NavBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/NavBlock.java index 4eed7e36600..58e1a4308bc 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/NavBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/NavBlock.java @@ -25,8 +25,8 @@ import java.util.List; import org.apache.hadoop.mapreduce.v2.api.records.AMInfo; import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -42,13 +42,13 @@ public class NavBlock extends HtmlBlock { div("#nav"). h3("Cluster"). ul(). - li().a(url(rmweb, "cluster", "cluster"), "About")._(). - li().a(url(rmweb, "cluster", "apps"), "Applications")._(). - li().a(url(rmweb, "cluster", "scheduler"), "Scheduler")._()._(). + li().a(url(rmweb, "cluster", "cluster"), "About").__(). + li().a(url(rmweb, "cluster", "apps"), "Applications").__(). + li().a(url(rmweb, "cluster", "scheduler"), "Scheduler").__().__(). h3("Application"). ul(). - li().a(url("app/info"), "About")._(). - li().a(url("app"), "Jobs")._()._(); + li().a(url("app/info"), "About").__(). + li().a(url("app"), "Jobs").__().__(); if (app.getJob() != null) { String jobid = MRApps.toString(app.getJob().getID()); List amInfos = app.getJob().getAMInfos(); @@ -58,31 +58,31 @@ public class NavBlock extends HtmlBlock { nav. h3("Job"). ul(). - li().a(url("job", jobid), "Overview")._(). - li().a(url("jobcounters", jobid), "Counters")._(). - li().a(url("conf", jobid), "Configuration")._(). - li().a(url("tasks", jobid, "m"), "Map tasks")._(). - li().a(url("tasks", jobid, "r"), "Reduce tasks")._(). + li().a(url("job", jobid), "Overview").__(). + li().a(url("jobcounters", jobid), "Counters").__(). + li().a(url("conf", jobid), "Configuration").__(). + li().a(url("tasks", jobid, "m"), "Map tasks").__(). + li().a(url("tasks", jobid, "r"), "Reduce tasks").__(). li().a(".logslink", url(MRWebAppUtil.getYARNWebappScheme(), nodeHttpAddress, "node", "containerlogs", thisAmInfo.getContainerId().toString(), app.getJob().getUserName()), - "AM Logs")._()._(); + "AM Logs").__().__(); if (app.getTask() != null) { String taskid = MRApps.toString(app.getTask().getID()); nav. h3("Task"). ul(). - li().a(url("task", taskid), "Task Overview")._(). - li().a(url("taskcounters", taskid), "Counters")._()._(); + li().a(url("task", taskid), "Task Overview").__(). + li().a(url("taskcounters", taskid), "Counters").__().__(); } } nav. h3("Tools"). ul(). - li().a("/conf", "Configuration")._(). - li().a("/logs", "Local logs")._(). - li().a("/stacks", "Server stacks")._(). - li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._(); + li().a("/conf", "Configuration").__(). + li().a("/logs", "Local logs").__(). + li().a("/stacks", "Server stacks").__(). + li().a("/jmx?qry=Hadoop:*", "Server metrics").__().__().__(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterBlock.java index c4311e9ac32..02fb22603cb 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterBlock.java @@ -39,11 +39,11 @@ import org.apache.hadoop.mapreduce.v2.app.job.Job; import org.apache.hadoop.mapreduce.v2.app.job.Task; import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt; import org.apache.hadoop.mapreduce.v2.util.MRApps; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -62,12 +62,12 @@ public class SingleCounterBlock extends HtmlBlock { @Override protected void render(Block html) { if (job == null) { html. - p()._("Sorry, no counters for nonexistent", $(JOB_ID, "job"))._(); + p().__("Sorry, no counters for nonexistent", $(JOB_ID, "job")).__(); return; } if (!$(TASK_ID).isEmpty() && task == null) { html. - p()._("Sorry, no counters for nonexistent", $(TASK_ID, "task"))._(); + p().__("Sorry, no counters for nonexistent", $(TASK_ID, "task")).__(); return; } @@ -79,7 +79,7 @@ public class SingleCounterBlock extends HtmlBlock { thead(). tr(). th(".ui-state-default", columnType). - th(".ui-state-default", "Value")._()._(). + th(".ui-state-default", "Value").__().__(). tbody(); for (Map.Entry entry : values.entrySet()) { TR>>> row = tbody.tr(); @@ -87,16 +87,16 @@ public class SingleCounterBlock extends HtmlBlock { String val = entry.getValue().toString(); if(task != null) { row.td(id); - row.td().br().$title(val)._()._(val)._(); + row.td().br().$title(val).__().__(val).__(); } else { row.td().a(url("singletaskcounter",entry.getKey(), - $(COUNTER_GROUP), $(COUNTER_NAME)), id)._(); - row.td().br().$title(val)._().a(url("singletaskcounter",entry.getKey(), - $(COUNTER_GROUP), $(COUNTER_NAME)), val)._(); + $(COUNTER_GROUP), $(COUNTER_NAME)), id).__(); + row.td().br().$title(val).__().a(url("singletaskcounter", entry.getKey(), + $(COUNTER_GROUP), $(COUNTER_NAME)), val).__(); } - row._(); + row.__(); } - tbody._()._()._(); + tbody.__().__().__(); } private void populateMembers(AppContext ctx) { diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterPage.java index 729b5a8c49c..6fc1f82ce7a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/SingleCounterPage.java @@ -21,7 +21,6 @@ package org.apache.hadoop.mapreduce.v2.app.webapp; import static org.apache.hadoop.mapreduce.v2.app.webapp.AMParams.TASK_ID; import static org.apache.hadoop.yarn.webapp.view.JQueryUI.*; -import org.apache.hadoop.mapreduce.v2.app.webapp.SingleCounterBlock; import org.apache.hadoop.yarn.webapp.SubView; /** @@ -33,7 +32,7 @@ public class SingleCounterPage extends AppView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); String tid = $(TASK_ID); String activeNav = "3"; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java index 01c5b0d7b97..bd7f7a9707e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java @@ -38,11 +38,11 @@ import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.THEAD; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.THEAD; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -100,7 +100,7 @@ public class TaskPage extends AppView { .append(" }\n") .append("}\n"); - html.script().$type("text/javascript")._(script.toString())._(); + html.script().$type("text/javascript").__(script.toString()).__(); } TR>> tr = html.table("#attempts").thead().tr(); @@ -118,7 +118,7 @@ public class TaskPage extends AppView { tr.th(".actions", "Actions"); } - TBODY> tbody = tr._()._().tbody(); + TBODY> tbody = tr.__().__().tbody(); // Write all the data into a JavaScript array of arrays for JQuery // DataTables to display StringBuilder attemptsTableData = new StringBuilder("[\n"); @@ -178,9 +178,9 @@ public class TaskPage extends AppView { } attemptsTableData.append("]"); html.script().$type("text/javascript"). - _("var attemptsTableData=" + attemptsTableData)._(); + __("var attemptsTableData=" + attemptsTableData).__(); - tbody._()._(); + tbody.__().__(); } @@ -197,7 +197,7 @@ public class TaskPage extends AppView { } } - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:3}"); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksBlock.java index 78338ec4d61..8d92dd32ead 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksBlock.java @@ -30,9 +30,9 @@ import org.apache.hadoop.mapreduce.v2.app.job.Task; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskInfo; import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.util.StringUtils; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -65,7 +65,7 @@ public class TasksBlock extends HtmlBlock { th("State"). th("Start Time"). th("Finish Time"). - th("Elapsed Time")._()._(). + th("Elapsed Time").__().__(). tbody(); StringBuilder tasksTableData = new StringBuilder("[\n"); @@ -117,8 +117,8 @@ public class TasksBlock extends HtmlBlock { } tasksTableData.append("]"); html.script().$type("text/javascript"). - _("var tasksTableData=" + tasksTableData)._(); + __("var tasksTableData=" + tasksTableData).__(); - tbody._()._(); + tbody.__().__(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksPage.java index e2f12dc4d16..8fce395163b 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TasksPage.java @@ -24,7 +24,7 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI.*; public class TasksPage extends AppView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "tasks"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:2}"); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsAboutPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsAboutPage.java index f607599a922..d544c6ba7cd 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsAboutPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsAboutPage.java @@ -21,7 +21,6 @@ package org.apache.hadoop.mapreduce.v2.hs.webapp; import static org.apache.hadoop.yarn.webapp.view.JQueryUI.ACCORDION; import static org.apache.hadoop.yarn.webapp.view.JQueryUI.initID; -import org.apache.hadoop.mapreduce.v2.hs.JobHistoryServer; import org.apache.hadoop.mapreduce.v2.hs.webapp.dao.HistoryInfo; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.webapp.SubView; @@ -36,7 +35,7 @@ public class HsAboutPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); //override the nav config from commonPReHead set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); @@ -49,9 +48,9 @@ public class HsAboutPage extends HsView { @Override protected Class content() { HistoryInfo info = new HistoryInfo(); info("History Server"). - _("BuildVersion", info.getHadoopBuildVersion() + __("BuildVersion", info.getHadoopBuildVersion() + " on " + info.getHadoopVersionBuiltOn()). - _("History Server started on", Times.format(info.getStartedOn())); + __("History Server started on", Times.format(info.getStartedOn())); return InfoBlock.class; } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsConfPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsConfPage.java index 8431e2209b1..c08ee5c2f59 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsConfPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsConfPage.java @@ -39,7 +39,7 @@ public class HsConfPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String jobID = $(JOB_ID); set(TITLE, jobID.isEmpty() ? "Bad request: missing job ID" : join("Configuration for MapReduce Job ", $(JOB_ID))); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsCountersPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsCountersPage.java index e70a668be0d..1632a97ba86 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsCountersPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsCountersPage.java @@ -32,7 +32,7 @@ public class HsCountersPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setActiveNavColumnForTask(); set(DATATABLES_SELECTOR, "#counters .dt-counters"); @@ -44,7 +44,7 @@ public class HsCountersPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.yarn.webapp.view.TwoColumnLayout#postHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void postHead(Page.HTML<_> html) { + @Override protected void postHead(Page.HTML<__> html) { html. style("#counters, .dt-counters { table-layout: fixed }", "#counters th { overflow: hidden; vertical-align: middle }", diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobBlock.java index 0d5b03a3ac0..18040f00440 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobBlock.java @@ -43,9 +43,9 @@ import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.webapp.ResponseInfo; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -69,38 +69,38 @@ public class HsJobBlock extends HtmlBlock { String jid = $(JOB_ID); if (jid.isEmpty()) { html. - p()._("Sorry, can't do anything without a JobID.")._(); + p().__("Sorry, can't do anything without a JobID.").__(); return; } JobId jobID = MRApps.toJobID(jid); Job j = appContext.getJob(jobID); if (j == null) { - html.p()._("Sorry, ", jid, " not found.")._(); + html.p().__("Sorry, ", jid, " not found.").__(); return; } if(j instanceof UnparsedJob) { final int taskCount = j.getTotalMaps() + j.getTotalReduces(); UnparsedJob oversizedJob = (UnparsedJob) j; - html.p()._("The job has a total of " + taskCount + " tasks. ") - ._("Any job larger than " + oversizedJob.getMaxTasksAllowed() + - " will not be loaded.")._(); - html.p()._("You can either use the CLI tool: 'mapred job -history'" + html.p().__("The job has a total of " + taskCount + " tasks. ") + .__("Any job larger than " + oversizedJob.getMaxTasksAllowed() + + " will not be loaded.").__(); + html.p().__("You can either use the CLI tool: 'mapred job -history'" + " to view large jobs or adjust the property " + - JHAdminConfig.MR_HS_LOADED_JOBS_TASKS_MAX + ".")._(); + JHAdminConfig.MR_HS_LOADED_JOBS_TASKS_MAX + ".").__(); return; } List amInfos = j.getAMInfos(); JobInfo job = new JobInfo(j); ResponseInfo infoBlock = info("Job Overview"). - _("Job Name:", job.getName()). - _("User Name:", job.getUserName()). - _("Queue:", job.getQueueName()). - _("State:", job.getState()). - _("Uberized:", job.isUber()). - _("Submitted:", new Date(job.getSubmitTime())). - _("Started:", job.getStartTimeStr()). - _("Finished:", new Date(job.getFinishTime())). - _("Elapsed:", StringUtils.formatTime( + __("Job Name:", job.getName()). + __("User Name:", job.getUserName()). + __("Queue:", job.getQueueName()). + __("State:", job.getState()). + __("Uberized:", job.isUber()). + __("Submitted:", new Date(job.getSubmitTime())). + __("Started:", job.getStartTimeStr()). + __("Finished:", new Date(job.getFinishTime())). + __("Elapsed:", StringUtils.formatTime( Times.elapsed(job.getStartTime(), job.getFinishTime(), false))); String amString = @@ -117,19 +117,19 @@ public class HsJobBlock extends HtmlBlock { } if(job.getNumMaps() > 0) { - infoBlock._("Average Map Time", StringUtils.formatTime(job.getAvgMapTime())); + infoBlock.__("Average Map Time", StringUtils.formatTime(job.getAvgMapTime())); } if(job.getNumReduces() > 0) { - infoBlock._("Average Shuffle Time", StringUtils.formatTime(job.getAvgShuffleTime())); - infoBlock._("Average Merge Time", StringUtils.formatTime(job.getAvgMergeTime())); - infoBlock._("Average Reduce Time", StringUtils.formatTime(job.getAvgReduceTime())); + infoBlock.__("Average Shuffle Time", StringUtils.formatTime(job.getAvgShuffleTime())); + infoBlock.__("Average Merge Time", StringUtils.formatTime(job.getAvgMergeTime())); + infoBlock.__("Average Reduce Time", StringUtils.formatTime(job.getAvgReduceTime())); } for (ConfEntryInfo entry : job.getAcls()) { - infoBlock._("ACL "+entry.getName()+":", entry.getValue()); + infoBlock.__("ACL "+entry.getName()+":", entry.getValue()); } DIV div = html. - _(InfoBlock.class). + __(InfoBlock.class). div(_INFO_WRAP); // MRAppMasters Table @@ -137,13 +137,13 @@ public class HsJobBlock extends HtmlBlock { table. tr(). th(amString). - _(). + __(). tr(). th(_TH, "Attempt Number"). th(_TH, "Start Time"). th(_TH, "Node"). th(_TH, "Logs"). - _(); + __(); boolean odd = false; for (AMInfo amInfo : amInfos) { AMAttemptInfo attempt = new AMAttemptInfo(amInfo, @@ -153,13 +153,13 @@ public class HsJobBlock extends HtmlBlock { td(new Date(attempt.getStartTime()).toString()). td().a(".nodelink", url(MRWebAppUtil.getYARNWebappScheme(), attempt.getNodeHttpAddress()), - attempt.getNodeHttpAddress())._(). + attempt.getNodeHttpAddress()).__(). td().a(".logslink", url(attempt.getLogsLink()), - "logs")._(). - _(); + "logs").__(). + __(); } - table._(); - div._(); + table.__(); + div.__(); html.div(_INFO_WRAP). @@ -169,18 +169,18 @@ public class HsJobBlock extends HtmlBlock { tr(). th(_TH, "Task Type"). th(_TH, "Total"). - th(_TH, "Complete")._(). + th(_TH, "Complete").__(). tr(_ODD). th(). - a(url("tasks", jid, "m"), "Map")._(). + a(url("tasks", jid, "m"), "Map").__(). td(String.valueOf(String.valueOf(job.getMapsTotal()))). - td(String.valueOf(String.valueOf(job.getMapsCompleted())))._(). + td(String.valueOf(String.valueOf(job.getMapsCompleted()))).__(). tr(_EVEN). th(). - a(url("tasks", jid, "r"), "Reduce")._(). + a(url("tasks", jid, "r"), "Reduce").__(). td(String.valueOf(String.valueOf(job.getReducesTotal()))). - td(String.valueOf(String.valueOf(job.getReducesCompleted())))._() - ._(). + td(String.valueOf(String.valueOf(job.getReducesCompleted()))).__() + .__(). // Attempts table table("#job"). @@ -188,33 +188,33 @@ public class HsJobBlock extends HtmlBlock { th(_TH, "Attempt Type"). th(_TH, "Failed"). th(_TH, "Killed"). - th(_TH, "Successful")._(). + th(_TH, "Successful").__(). tr(_ODD). th("Maps"). td().a(url("attempts", jid, "m", TaskAttemptStateUI.FAILED.toString()), - String.valueOf(job.getFailedMapAttempts()))._(). + String.valueOf(job.getFailedMapAttempts())).__(). td().a(url("attempts", jid, "m", TaskAttemptStateUI.KILLED.toString()), - String.valueOf(job.getKilledMapAttempts()))._(). + String.valueOf(job.getKilledMapAttempts())).__(). td().a(url("attempts", jid, "m", TaskAttemptStateUI.SUCCESSFUL.toString()), - String.valueOf(job.getSuccessfulMapAttempts()))._(). - _(). + String.valueOf(job.getSuccessfulMapAttempts())).__(). + __(). tr(_EVEN). th("Reduces"). td().a(url("attempts", jid, "r", TaskAttemptStateUI.FAILED.toString()), - String.valueOf(job.getFailedReduceAttempts()))._(). + String.valueOf(job.getFailedReduceAttempts())).__(). td().a(url("attempts", jid, "r", TaskAttemptStateUI.KILLED.toString()), - String.valueOf(job.getKilledReduceAttempts()))._(). + String.valueOf(job.getKilledReduceAttempts())).__(). td().a(url("attempts", jid, "r", TaskAttemptStateUI.SUCCESSFUL.toString()), - String.valueOf(job.getSuccessfulReduceAttempts()))._(). - _(). - _(). - _(); + String.valueOf(job.getSuccessfulReduceAttempts())).__(). + __(). + __(). + __(); } static String addTaskLinks(String text) { diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobPage.java index 4c81a139895..f40c878336e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobPage.java @@ -34,7 +34,7 @@ public class HsJobPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String jobID = $(JOB_ID); set(TITLE, jobID.isEmpty() ? "Bad request: missing job ID" : join("MapReduce Job ", $(JOB_ID))); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobsBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobsBlock.java index b234ca3df03..ef563f6c9f7 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobsBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsJobsBlock.java @@ -27,10 +27,10 @@ import org.apache.hadoop.mapreduce.v2.app.job.Job; import org.apache.hadoop.mapreduce.v2.hs.webapp.dao.JobInfo; import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.yarn.util.Times; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec.InputType; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.HamletSpec.InputType; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -69,7 +69,7 @@ public class HsJobsBlock extends HtmlBlock { th("Maps Completed"). th("Reduces Total"). th("Reduces Completed"). - th("Elapsed Time")._()._(). + th("Elapsed Time").__().__(). tbody(); LOG.info("Getting list of all Jobs."); // Write all the data into a JavaScript array of arrays for JQuery @@ -105,38 +105,38 @@ public class HsJobsBlock extends HtmlBlock { } jobsTableData.append("]"); html.script().$type("text/javascript"). - _("var jobsTableData=" + jobsTableData)._(); - tbody._(). + __("var jobsTableData=" + jobsTableData).__(); + tbody.__(). tfoot(). tr(). th().input("search_init").$type(InputType.text) - .$name("submit_time").$value("Submit Time")._()._(). + .$name("submit_time").$value("Submit Time").__().__(). th().input("search_init").$type(InputType.text) - .$name("start_time").$value("Start Time")._()._(). + .$name("start_time").$value("Start Time").__().__(). th().input("search_init").$type(InputType.text) - .$name("finish_time").$value("Finish Time")._()._(). + .$name("finish_time").$value("Finish Time").__().__(). th().input("search_init").$type(InputType.text) - .$name("job_id").$value("Job ID")._()._(). + .$name("job_id").$value("Job ID").__().__(). th().input("search_init").$type(InputType.text) - .$name("name").$value("Name")._()._(). + .$name("name").$value("Name").__().__(). th().input("search_init").$type(InputType.text) - .$name("user").$value("User")._()._(). + .$name("user").$value("User").__().__(). th().input("search_init").$type(InputType.text) - .$name("queue").$value("Queue")._()._(). + .$name("queue").$value("Queue").__().__(). th().input("search_init").$type(InputType.text) - .$name("state").$value("State")._()._(). + .$name("state").$value("State").__().__(). th().input("search_init").$type(InputType.text) - .$name("maps_total").$value("Maps Total")._()._(). + .$name("maps_total").$value("Maps Total").__().__(). th().input("search_init").$type(InputType.text). - $name("maps_completed").$value("Maps Completed")._()._(). + $name("maps_completed").$value("Maps Completed").__().__(). th().input("search_init").$type(InputType.text). - $name("reduces_total").$value("Reduces Total")._()._(). + $name("reduces_total").$value("Reduces Total").__().__(). th().input("search_init").$type(InputType.text). - $name("reduces_completed").$value("Reduces Completed")._()._(). + $name("reduces_completed").$value("Reduces Completed").__().__(). th().input("search_init").$type(InputType.text). - $name("elapsed_time").$value("Elapsed Time")._()._(). - _(). - _(). - _(); + $name("elapsed_time").$value("Elapsed Time").__().__(). + __(). + __(). + __(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsLogsPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsLogsPage.java index f483dc96b04..2bee3ba9971 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsLogsPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsLogsPage.java @@ -26,7 +26,7 @@ public class HsLogsPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setActiveNavColumnForTask(); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsNavBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsNavBlock.java index 7e49d520e7f..9ef5a0f8cff 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsNavBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsNavBlock.java @@ -20,8 +20,8 @@ package org.apache.hadoop.mapreduce.v2.hs.webapp; import org.apache.hadoop.mapreduce.v2.app.webapp.App; import org.apache.hadoop.mapreduce.v2.util.MRApps; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -43,33 +43,33 @@ public class HsNavBlock extends HtmlBlock { div("#nav"). h3("Application"). ul(). - li().a(url("about"), "About")._(). - li().a(url("app"), "Jobs")._()._(); + li().a(url("about"), "About").__(). + li().a(url("app"), "Jobs").__().__(); if (app.getJob() != null) { String jobid = MRApps.toString(app.getJob().getID()); nav. h3("Job"). ul(). - li().a(url("job", jobid), "Overview")._(). - li().a(url("jobcounters", jobid), "Counters")._(). - li().a(url("conf", jobid), "Configuration")._(). - li().a(url("tasks", jobid, "m"), "Map tasks")._(). - li().a(url("tasks", jobid, "r"), "Reduce tasks")._()._(); + li().a(url("job", jobid), "Overview").__(). + li().a(url("jobcounters", jobid), "Counters").__(). + li().a(url("conf", jobid), "Configuration").__(). + li().a(url("tasks", jobid, "m"), "Map tasks").__(). + li().a(url("tasks", jobid, "r"), "Reduce tasks").__().__(); if (app.getTask() != null) { String taskid = MRApps.toString(app.getTask().getID()); nav. h3("Task"). ul(). - li().a(url("task", taskid), "Task Overview")._(). - li().a(url("taskcounters", taskid), "Counters")._()._(); + li().a(url("task", taskid), "Task Overview").__(). + li().a(url("taskcounters", taskid), "Counters").__().__(); } } nav. h3("Tools"). ul(). - li().a("/conf", "Configuration")._(). - li().a("/logs", "Local logs")._(). - li().a("/stacks", "Server stacks")._(). - li().a("/jmx?qry=Hadoop:*", "Server metrics")._()._()._(); + li().a("/conf", "Configuration").__(). + li().a("/logs", "Local logs").__(). + li().a("/stacks", "Server stacks").__(). + li().a("/jmx?qry=Hadoop:*", "Server metrics").__().__().__(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsSingleCounterPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsSingleCounterPage.java index 5f97b8fdb20..bc2c2c857ac 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsSingleCounterPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsSingleCounterPage.java @@ -32,7 +32,7 @@ public class HsSingleCounterPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setActiveNavColumnForTask(); set(DATATABLES_ID, "singleCounter"); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java index 6403e3bced6..c5117edb9e0 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java @@ -39,16 +39,15 @@ import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.mapreduce.v2.util.MRWebAppUtil; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TFOOT; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.THEAD; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; -import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec.InputType; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TFOOT; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.THEAD; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.HamletSpec.InputType; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; -import com.google.common.base.Joiner; import com.google.inject.Inject; /** @@ -110,7 +109,7 @@ public class HsTaskPage extends HsView { headRow.th("Elapsed Time"). th(".note", "Note"); - TBODY> tbody = headRow._()._().tbody(); + TBODY> tbody = headRow.__().__().tbody(); // Write all the data into a JavaScript array of arrays for JQuery // DataTables to display StringBuilder attemptsTableData = new StringBuilder("[\n"); @@ -182,55 +181,55 @@ public class HsTaskPage extends HsView { } attemptsTableData.append("]"); html.script().$type("text/javascript"). - _("var attemptsTableData=" + attemptsTableData)._(); + __("var attemptsTableData=" + attemptsTableData).__(); - TR>> footRow = tbody._().tfoot().tr(); + TR>> footRow = tbody.__().tfoot().tr(); footRow. th().input("search_init").$type(InputType.text). - $name("attempt_name").$value("Attempt")._()._(). + $name("attempt_name").$value("Attempt").__().__(). th().input("search_init").$type(InputType.text). - $name("attempt_state").$value("State")._()._(). + $name("attempt_state").$value("State").__().__(). th().input("search_init").$type(InputType.text). - $name("attempt_status").$value("Status")._()._(). + $name("attempt_status").$value("Status").__().__(). th().input("search_init").$type(InputType.text). - $name("attempt_node").$value("Node")._()._(). + $name("attempt_node").$value("Node").__().__(). th().input("search_init").$type(InputType.text). - $name("attempt_node").$value("Logs")._()._(). + $name("attempt_node").$value("Logs").__().__(). th().input("search_init").$type(InputType.text). - $name("attempt_start_time").$value("Start Time")._()._(); + $name("attempt_start_time").$value("Start Time").__().__(); if(type == TaskType.REDUCE) { footRow. th().input("search_init").$type(InputType.text). - $name("shuffle_time").$value("Shuffle Time")._()._(); + $name("shuffle_time").$value("Shuffle Time").__().__(); footRow. th().input("search_init").$type(InputType.text). - $name("merge_time").$value("Merge Time")._()._(); + $name("merge_time").$value("Merge Time").__().__(); } footRow. th().input("search_init").$type(InputType.text). - $name("attempt_finish").$value("Finish Time")._()._(); + $name("attempt_finish").$value("Finish Time").__().__(); if(type == TaskType.REDUCE) { footRow. th().input("search_init").$type(InputType.text). - $name("elapsed_shuffle_time").$value("Elapsed Shuffle Time")._()._(); + $name("elapsed_shuffle_time").$value("Elapsed Shuffle Time").__().__(); footRow. th().input("search_init").$type(InputType.text). - $name("elapsed_merge_time").$value("Elapsed Merge Time")._()._(); + $name("elapsed_merge_time").$value("Elapsed Merge Time").__().__(); footRow. th().input("search_init").$type(InputType.text). - $name("elapsed_reduce_time").$value("Elapsed Reduce Time")._()._(); + $name("elapsed_reduce_time").$value("Elapsed Reduce Time").__().__(); } footRow. th().input("search_init").$type(InputType.text). - $name("attempt_elapsed").$value("Elapsed Time")._()._(). + $name("attempt_elapsed").$value("Elapsed Time").__().__(). th().input("search_init").$type(InputType.text). - $name("note").$value("Note")._()._(); + $name("note").$value("Note").__().__(); - footRow._()._()._(); + footRow.__().__().__(); } protected String getAttemptId(TaskId taskId, TaskAttemptInfo ta) { @@ -256,7 +255,7 @@ public class HsTaskPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); //override the nav config from commonPReHead set(initID(ACCORDION, "nav"), "{autoHeight:false, active:2}"); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java index 9511c06724d..702c13c01de 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksBlock.java @@ -28,14 +28,13 @@ import org.apache.hadoop.mapreduce.v2.app.webapp.dao.ReduceTaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskInfo; import org.apache.hadoop.mapreduce.v2.util.MRApps; -import org.apache.hadoop.util.StringUtils; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TFOOT; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.THEAD; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; -import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec.InputType; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TFOOT; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.THEAD; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.HamletSpec.InputType; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -74,10 +73,10 @@ public class HsTasksBlock extends HtmlBlock { //Create the spanning row int attemptColSpan = type == TaskType.REDUCE ? 8 : 3; thead.tr(). - th().$colspan(5).$class("ui-state-default")._("Task")._(). + th().$colspan(5).$class("ui-state-default").__("Task").__(). th().$colspan(attemptColSpan).$class("ui-state-default"). - _("Successful Attempt")._(). - _(); + __("Successful Attempt").__(). + __(); TR>> theadRow = thead. tr(). @@ -102,7 +101,7 @@ public class HsTasksBlock extends HtmlBlock { } theadRow.th("Elapsed Time"); //Attempt - TBODY> tbody = theadRow._()._().tbody(); + TBODY> tbody = theadRow.__().__().tbody(); // Write all the data into a JavaScript array of arrays for JQuery // DataTables to display @@ -173,41 +172,41 @@ public class HsTasksBlock extends HtmlBlock { } tasksTableData.append("]"); html.script().$type("text/javascript"). - _("var tasksTableData=" + tasksTableData)._(); + __("var tasksTableData=" + tasksTableData).__(); - TR>> footRow = tbody._().tfoot().tr(); + TR>> footRow = tbody.__().tfoot().tr(); footRow.th().input("search_init").$type(InputType.text).$name("task") - .$value("ID")._()._().th().input("search_init").$type(InputType.text) - .$name("state").$value("State")._()._().th().input("search_init") - .$type(InputType.text).$name("start_time").$value("Start Time")._()._() + .$value("ID").__().__().th().input("search_init").$type(InputType.text) + .$name("state").$value("State").__().__().th().input("search_init") + .$type(InputType.text).$name("start_time").$value("Start Time").__().__() .th().input("search_init").$type(InputType.text).$name("finish_time") - .$value("Finish Time")._()._().th().input("search_init") - .$type(InputType.text).$name("elapsed_time").$value("Elapsed Time")._() - ._().th().input("search_init").$type(InputType.text) - .$name("attempt_start_time").$value("Start Time")._()._(); + .$value("Finish Time").__().__().th().input("search_init") + .$type(InputType.text).$name("elapsed_time").$value("Elapsed Time").__() + .__().th().input("search_init").$type(InputType.text) + .$name("attempt_start_time").$value("Start Time").__().__(); if(type == TaskType.REDUCE) { footRow.th().input("search_init").$type(InputType.text) - .$name("shuffle_time").$value("Shuffle Time")._()._(); + .$name("shuffle_time").$value("Shuffle Time").__().__(); footRow.th().input("search_init").$type(InputType.text) - .$name("merge_time").$value("Merge Time")._()._(); + .$name("merge_time").$value("Merge Time").__().__(); } footRow.th().input("search_init").$type(InputType.text) - .$name("attempt_finish").$value("Finish Time")._()._(); + .$name("attempt_finish").$value("Finish Time").__().__(); if(type == TaskType.REDUCE) { footRow.th().input("search_init").$type(InputType.text) - .$name("elapsed_shuffle_time").$value("Elapsed Shuffle Time")._()._(); + .$name("elapsed_shuffle_time").$value("Elapsed Shuffle Time").__().__(); footRow.th().input("search_init").$type(InputType.text) - .$name("elapsed_merge_time").$value("Elapsed Merge Time")._()._(); + .$name("elapsed_merge_time").$value("Elapsed Merge Time").__().__(); footRow.th().input("search_init").$type(InputType.text) - .$name("elapsed_reduce_time").$value("Elapsed Reduce Time")._()._(); + .$name("elapsed_reduce_time").$value("Elapsed Reduce Time").__().__(); } footRow.th().input("search_init").$type(InputType.text) - .$name("attempt_elapsed").$value("Elapsed Time")._()._(); + .$name("attempt_elapsed").$value("Elapsed Time").__().__(); - footRow._()._()._(); + footRow.__().__().__(); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java index 3c3386e6741..d0885918994 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java @@ -41,7 +41,7 @@ public class HsTasksPage extends HsView { * (non-Javadoc) * @see org.apache.hadoop.mapreduce.v2.hs.webapp.HsView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "tasks"); set(DATATABLES_SELECTOR, ".dt-tasks" ); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsView.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsView.java index 8e390872c13..510ece69bf0 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsView.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsView.java @@ -39,7 +39,7 @@ public class HsView extends TwoColumnLayout { * (non-Javadoc) * @see org.apache.hadoop.yarn.webapp.view.TwoColumnLayout#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "jobs"); set(initID(DATATABLES, "jobs"), jobsTableInit()); @@ -51,7 +51,7 @@ public class HsView extends TwoColumnLayout { * The prehead that should be common to all subclasses. * @param html used to render. */ - protected void commonPreHead(Page.HTML<_> html) { + protected void commonPreHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/pom.xml index 505e20f509c..f17cf8c500b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/pom.xml @@ -341,4 +341,26 @@ + + + + java9 + + 9 + + + + + maven-compiler-plugin + + + src/main/java/org/apache/hadoop/yarn/webapp/hamlet/** + src/main/test/org/apache/haodop/yarn/webapp/hamlet/** + + + + + + + diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/ResponseInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/ResponseInfo.java index b04bc5dd1be..94063ed222b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/ResponseInfo.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/ResponseInfo.java @@ -75,12 +75,12 @@ public class ResponseInfo implements Iterable { return about; } - public ResponseInfo _(String key, Object value) { + public ResponseInfo __(String key, Object value) { items.add(Item.of(key, value, false)); return this; } - public ResponseInfo _(String key, String url, Object anchor) { + public ResponseInfo __(String key, String url, Object anchor) { if (url == null) { items.add(Item.of(key, anchor, false)); } else { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/HelloWorld.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/HelloWorld.java index 9b5cbd111c6..4376b6e6fcb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/HelloWorld.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/HelloWorld.java @@ -41,11 +41,11 @@ public class HelloWorld { } public static class HelloView extends HtmlPage { - @Override protected void render(Page.HTML<_> html) { + @Override protected void render(Page.HTML<__> html) { html. // produces valid html 4.01 strict title($("title")). p("#hello-for-css"). - _($("title"))._()._(); + __($("title")).__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/MyApp.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/MyApp.java index 3973f68dcf3..e13a883541b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/MyApp.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/example/MyApp.java @@ -60,12 +60,12 @@ public class MyApp { public static class MyView extends HtmlPage { // You can inject the app in views if needed. @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { html. title("My App"). p("#content_id_for_css_styling"). - _("You can have", $("anything"))._()._(); - // Note, there is no _(); (to parent element) method at root level. + __("You can have", $("anything")).__().__(); + // Note, there is no __(); (to parent element) method at root level. // and IDE provides instant feedback on what level you're on in // the auto-completion drop-downs. } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java index 58d9066b39c..72138653612 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java @@ -29,6 +29,10 @@ import java.util.EnumSet; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.yarn.webapp.SubView; +/** + * @deprecated Use org.apache.hadoop.yarn.webapp.hamlet2 package instead. + */ +@Deprecated @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public class Hamlet extends HamletImpl implements HamletSpec._Html { public Hamlet(PrintWriter out, int nestLevel, boolean wasInline) { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletGen.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletGen.java index 5acb3f3ee03..8a2db8f9812 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletGen.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletGen.java @@ -43,7 +43,9 @@ import org.slf4j.LoggerFactory; /** * Generates a specific hamlet implementation class from a spec class * using a generic hamlet implementation class. + * @deprecated Use org.apache.hadoop.yarn.webapp.hamlet2 package instead. */ +@Deprecated @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public class HamletGen { static final Logger LOG = LoggerFactory.getLogger(HamletGen.class); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletImpl.java index d792d31c38c..289ad704cc5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletImpl.java @@ -43,7 +43,9 @@ import org.apache.hadoop.yarn.webapp.WebAppException; * optimized to use a thread-local element pool. * * Prints HTML as it builds. So the order is important. + * @deprecated Use org.apache.hadoop.yarn.webapp.hamlet2 package instead. */ +@Deprecated @InterfaceAudience.Private public class HamletImpl extends HamletSpec { private static final String INDENT_CHARS = " "; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletSpec.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletSpec.java index 081516cb14b..e3bb6d1add8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletSpec.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/HamletSpec.java @@ -43,7 +43,9 @@ import org.apache.hadoop.yarn.webapp.SubView; * UPPERCASE, corresponding to an element definition in the DTD. $lowercase is * used as attribute builder methods to differentiate from element builder * methods. + * @deprecated Use org.apache.hadoop.yarn.webapp.hamlet2 package instead. */ +@Deprecated @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public class HamletSpec { // The enum values are lowercase for better compression, diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/package-info.java index 3286ab551ed..4d0cf4950c5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/package-info.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/package-info.java @@ -15,6 +15,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** + * Deprecated. + * Use org.apache.hadoop.yarn.webapp.hamlet2 package instead. + */ +@Deprecated @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) package org.apache.hadoop.yarn.webapp.hamlet; import org.apache.hadoop.classification.InterfaceAudience; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/Hamlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/Hamlet.java new file mode 100644 index 00000000000..05e1b79c357 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/Hamlet.java @@ -0,0 +1,30557 @@ +/** +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// Generated by HamletGen. Do NOT edit! +package org.apache.hadoop.yarn.webapp.hamlet2; +import static java.util.EnumSet.of; +import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.ENDTAG; +import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.INLINE; +import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.PRE; + +import java.io.PrintWriter; +import java.util.EnumSet; + +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.yarn.webapp.SubView; + +@InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) +public class Hamlet extends HamletImpl implements HamletSpec._Html { + public Hamlet(PrintWriter out, int nestLevel, boolean wasInline) { + super(out, nestLevel, wasInline); + } + + static EnumSet opt(boolean endTag, boolean inline, boolean pre) { + EnumSet opts = of(ENDTAG); + if (!endTag) opts.remove(ENDTAG); + if (inline) opts.add(INLINE); + if (pre) opts.add(PRE); + return opts; + } + + public class HTML extends EImp implements HamletSpec.HTML { + public HTML(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public HTML $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public HTML $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public HEAD> head() { + closeAttrs(); + return head_(this, false); + } + + @Override + public BODY> body() { + closeAttrs(); + return body_(this, false); + } + + @Override + public BODY> body(String selector) { + return setSelector(body(), selector); + } + + @Override + public BASE> base() { + closeAttrs(); + return base_(this, false); + } + + @Override + public HTML base(String href) { + return base().$href(href).__(); + } + + @Override + public TITLE> title() { + closeAttrs(); + return title_(this, false); + } + + @Override + public HTML title(String cdata) { + return title().__(cdata).__(); + } + + @Override + public STYLE> style() { + closeAttrs(); + return style_(this, false); + } + + @Override + public HTML style(Object... lines) { + return style().$type("text/css").__(lines).__(); + } + + @Override + public LINK> link() { + closeAttrs(); + return link_(this, false); + } + + @Override + public HTML link(String href) { + return setLinkHref(link(), href).__(); + } + + @Override + public META> meta() { + closeAttrs(); + return meta_(this, false); + } + + @Override + public HTML meta(String name, String content) { + return meta().$name(name).$content(content).__(); + } + + @Override + public HTML meta_http(String header, String content) { + return meta().$http_equiv(header).$content(content).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, false); + } + + @Override + public HTML script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public HTML address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public HTML __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public HTML hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public HTML h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public HTML h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public HTML h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public HTML h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public HTML h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public HTML h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public HTML h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public HTML h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public HTML h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public HTML h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public HTML h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public HTML h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public HTML ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public HTML del(String cdata) { + return del().__(cdata).__(); + } + } + + private HEAD head_(T e, boolean inline) { + return new HEAD("head", e, opt(true, inline, false)); } + + private BODY body_(T e, boolean inline) { + return new BODY("body", e, opt(true, inline, false)); } + + public class SCRIPT extends EImp implements HamletSpec.SCRIPT { + public SCRIPT(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SCRIPT $type(String value) { + addAttr("type", value); + return this; + } + + @Override + public SCRIPT $src(String value) { + addAttr("src", value); + return this; + } + + @Override + public SCRIPT $charset(String value) { + addAttr("charset", value); + return this; + } + + @Override + public SCRIPT $defer(String value) { + addAttr("defer", value); + return this; + } + + @Override + public SCRIPT __(Object... lines) { + _p(false, lines); + return this; + } + } + + public class STYLE extends EImp implements HamletSpec.STYLE { + public STYLE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public STYLE $type(String value) { + addAttr("type", value); + return this; + } + + @Override + public STYLE $media(EnumSet value) { + addMediaAttr("media", value); + return this; + } + + @Override + public STYLE $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public STYLE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public STYLE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public STYLE __(Object... lines) { + _p(false, lines); + return this; + } + } + + public class META extends EImp implements HamletSpec.META { + public META(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public META $http_equiv(String value) { + addAttr("http-equiv", value); + return this; + } + + @Override + public META $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public META $content(String value) { + addAttr("content", value); + return this; + } + + @Override + public META $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public META $dir(Dir value) { + addAttr("dir", value); + return this; + } + } + + public class BASE extends EImp implements HamletSpec.BASE { + public BASE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public BASE $href(String value) { + addAttr("href", value); + return this; + } + } + + public class TITLE extends EImp implements HamletSpec.TITLE { + public TITLE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TITLE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TITLE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TITLE __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public TITLE _r(Object... lines) { + _p(false, lines); + return this; + } + } + + public class HEAD extends EImp implements HamletSpec.HEAD { + public HEAD(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public HEAD $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public HEAD $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public BASE> base() { + closeAttrs(); + return base_(this, false); + } + + @Override + public HEAD base(String href) { + return base().$href(href).__(); + } + + @Override + public TITLE> title() { + closeAttrs(); + return title_(this, false); + } + + @Override + public HEAD title(String cdata) { + return title().__(cdata).__(); + } + + @Override + public STYLE> style() { + closeAttrs(); + return style_(this, false); + } + + @Override + public HEAD style(Object... lines) { + return style().$type("text/css").__(lines).__(); + } + + @Override + public LINK> link() { + closeAttrs(); + return link_(this, false); + } + + @Override + public HEAD link(String href) { + return setLinkHref(link(), href).__(); + } + + @Override + public META> meta() { + closeAttrs(); + return meta_(this, false); + } + + @Override + public HEAD meta(String name, String content) { + return meta().$name(name).$content(content).__(); + } + + @Override + public HEAD meta_http(String header, String content) { + return meta().$http_equiv(header).$content(content).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, false); + } + + @Override + public HEAD script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + } + + private BASE base_(T e, boolean inline) { + return new BASE("base", e, opt(false, inline, false)); } + + private TITLE title_(T e, boolean inline) { + return new TITLE("title", e, opt(true, inline, false)); } + + public class TD extends EImp implements HamletSpec.TD { + public TD(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TD $headers(String value) { + addAttr("headers", value); + return this; + } + + @Override + public TD $scope(Scope value) { + addAttr("scope", value); + return this; + } + + @Override + public TD $rowspan(int value) { + addAttr("rowspan", value); + return this; + } + + @Override + public TD $colspan(int value) { + addAttr("colspan", value); + return this; + } + + @Override + public TD $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TD $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TD $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TD $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TD $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TD $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TD $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TD $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TD $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TD $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TD $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TD $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TD $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TD $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TD $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TD $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public TD address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public TD __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public TD hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public TD h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public TD h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public TD h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public TD h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public TD h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public TD h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public TD h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public TD h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public TD h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public TD h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public TD h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public TD h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public TD __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public TD _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public TD b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public TD b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public TD i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public TD i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public TD small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public TD small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public TD em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public TD em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public TD strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public TD strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public TD dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public TD dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public TD code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public TD code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public TD samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public TD samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public TD kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public TD kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public TD var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public TD var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public TD cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public TD cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public TD abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public TD abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public TD a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public TD a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public TD img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public TD sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public TD sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public TD sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public TD sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public TD q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public TD q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public TD br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public TD bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public TD span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public TD span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public TD script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public TD ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public TD del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public TD label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public TD textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public TD button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class TH extends EImp implements HamletSpec.TH { + public TH(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TH $headers(String value) { + addAttr("headers", value); + return this; + } + + @Override + public TH $scope(Scope value) { + addAttr("scope", value); + return this; + } + + @Override + public TH $rowspan(int value) { + addAttr("rowspan", value); + return this; + } + + @Override + public TH $colspan(int value) { + addAttr("colspan", value); + return this; + } + + @Override + public TH $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TH $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TH $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TH $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TH $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TH $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TH $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TH $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TH $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TH $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TH $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TH $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TH $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TH $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TH $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TH $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public TH address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public TH __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public TH hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public TH h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public TH h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public TH h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public TH h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public TH h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public TH h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public TH h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public TH h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public TH h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public TH h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public TH h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public TH h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public TH __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public TH _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public TH b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public TH b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public TH i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public TH i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public TH small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public TH small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public TH em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public TH em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public TH strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public TH strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public TH dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public TH dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public TH code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public TH code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public TH samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public TH samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public TH kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public TH kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public TH var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public TH var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public TH cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public TH cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public TH abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public TH abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public TH a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public TH a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public TH img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public TH sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public TH sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public TH sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public TH sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public TH q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public TH q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public TH br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public TH bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public TH span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public TH span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public TH script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public TH ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public TH del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public TH label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public TH textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public TH button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class TR extends EImp implements HamletSpec.TR { + public TR(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TR $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TR $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TR $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TR $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TR $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TR $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TR $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TR $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TR $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TR $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TR $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TR $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TR $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TR $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TR $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TR $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TH> th() { + closeAttrs(); + return th_(this, false); + } + + @Override + public TR th(String cdata) { + return th().__(cdata).__(); + } + + @Override + public TR th(String selector, String cdata) { + return setSelector(th(), selector).__(cdata).__(); + } + + public TR th(String selector, String title, String cdata) { + return setSelector(th(), selector).$title(title).__(cdata).__(); + } + + @Override + public TD> td() { + closeAttrs(); + return td_(this, false); + } + + @Override + public TR td(String cdata) { + return td().__(cdata).__(); + } + + @Override + public TR td(String selector, String cdata) { + return setSelector(td(), selector).__(cdata).__(); + } + } + + private TH th_(T e, boolean inline) { + return new TH("th", e, opt(true, inline, false)); } + + private TD td_(T e, boolean inline) { + return new TD("td", e, opt(true, inline, false)); } + + public class COL extends EImp implements HamletSpec.COL { + public COL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public COL $span(int value) { + addAttr("span", value); + return this; + } + + @Override + public COL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public COL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public COL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public COL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public COL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public COL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public COL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public COL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public COL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public COL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public COL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public COL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public COL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public COL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public COL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public COL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + public class COLGROUP extends EImp implements HamletSpec.COLGROUP { + public COLGROUP(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public COLGROUP $span(int value) { + addAttr("span", value); + return this; + } + + @Override + public COLGROUP $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public COLGROUP $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public COLGROUP $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public COLGROUP $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public COLGROUP $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public COLGROUP $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public COLGROUP $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public COLGROUP $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public COLGROUP $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public COLGROUP $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public COLGROUP $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public COLGROUP $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public COLGROUP $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public COLGROUP $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public COLGROUP $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public COLGROUP $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public COL> col() { + closeAttrs(); + return col_(this, false); + } + + @Override + public COLGROUP col(String selector) { + return setSelector(col(), selector).__(); + } + } + + public class TBODY extends EImp implements HamletSpec.TBODY { + public TBODY(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TBODY $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TBODY $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TBODY $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TBODY $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TBODY $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TBODY $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TBODY $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TBODY $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TBODY $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TBODY $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TBODY $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TBODY $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TBODY $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TBODY $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TBODY $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TBODY $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TR> tr() { + closeAttrs(); + return tr_(this, false); + } + + @Override + public TR> tr(String selector) { + return setSelector(tr(), selector); + } + } + + public class TFOOT extends EImp implements HamletSpec.TFOOT { + public TFOOT(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TFOOT $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TFOOT $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TFOOT $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TFOOT $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TFOOT $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TFOOT $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TFOOT $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TFOOT $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TFOOT $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TFOOT $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TFOOT $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TFOOT $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TFOOT $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TFOOT $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TFOOT $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TFOOT $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TR> tr() { + closeAttrs(); + return tr_(this, false); + } + + @Override + public TR> tr(String selector) { + return setSelector(tr(), selector); + } + } + + public class THEAD extends EImp implements HamletSpec.THEAD { + public THEAD(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public THEAD $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public THEAD $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public THEAD $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public THEAD $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public THEAD $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public THEAD $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public THEAD $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public THEAD $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public THEAD $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public THEAD $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public THEAD $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public THEAD $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public THEAD $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public THEAD $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public THEAD $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public THEAD $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TR> tr() { + closeAttrs(); + return tr_(this, false); + } + + @Override + public TR> tr(String selector) { + return setSelector(tr(), selector); + } + } + + public class CAPTION extends EImp implements HamletSpec.CAPTION { + public CAPTION(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public CAPTION $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public CAPTION $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public CAPTION $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public CAPTION $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public CAPTION $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public CAPTION $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public CAPTION $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public CAPTION $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public CAPTION $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public CAPTION $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public CAPTION $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public CAPTION $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public CAPTION $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public CAPTION $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public CAPTION $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public CAPTION $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public CAPTION __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public CAPTION _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public CAPTION b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public CAPTION b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public CAPTION i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public CAPTION i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public CAPTION small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public CAPTION small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public CAPTION em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public CAPTION em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public CAPTION strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public CAPTION strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public CAPTION dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public CAPTION dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public CAPTION code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public CAPTION code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public CAPTION samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public CAPTION samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public CAPTION kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public CAPTION kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public CAPTION var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public CAPTION var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public CAPTION cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public CAPTION cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public CAPTION abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public CAPTION abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public CAPTION a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public CAPTION a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public CAPTION img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public CAPTION sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public CAPTION sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public CAPTION sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public CAPTION sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public CAPTION q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public CAPTION q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public CAPTION br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public CAPTION bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public CAPTION span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public CAPTION span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public CAPTION script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public CAPTION ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public CAPTION del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public CAPTION label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public CAPTION textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public CAPTION button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class TABLE extends EImp implements HamletSpec.TABLE { + public TABLE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TABLE $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TABLE $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TABLE $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TABLE $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TABLE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TABLE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TABLE $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TABLE $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TABLE $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TABLE $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TABLE $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TABLE $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TABLE $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TABLE $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TABLE $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TABLE $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE caption(String cdata) { + return caption().__(cdata).__(); + } + + @Override + public CAPTION> caption() { + closeAttrs(); + return caption_(this, false); + } + + @Override + public COLGROUP> colgroup() { + closeAttrs(); + return colgroup_(this, false); + } + + @Override + public THEAD> thead(String selector) { + return setSelector(thead(), selector); + } + + @Override + public THEAD> thead() { + closeAttrs(); + return thead_(this, false); + } + + @Override + public TFOOT> tfoot() { + closeAttrs(); + return tfoot_(this, false); + } + + @Override + public TFOOT> tfoot(String selector) { + return setSelector(tfoot(), selector); + } + + @Override + public TBODY> tbody() { + closeAttrs(); + return tbody_(this, false); + } + + @Override + public TBODY> tbody(String selector) { + return setSelector(tbody(), selector); + } + + @Override + public TR> tr() { + closeAttrs(); + return tr_(this, false); + } + + @Override + public TR> tr(String selector) { + return setSelector(tr(), selector); + } + + @Override + public COL> col() { + closeAttrs(); + return col_(this, false); + } + + @Override + public TABLE col(String selector) { + return setSelector(col(), selector).__(); + } + } + + private CAPTION caption_(T e, boolean inline) { + return new CAPTION("caption", e, opt(true, inline, false)); } + + private COLGROUP colgroup_(T e, boolean inline) { + return new COLGROUP("colgroup", e, opt(false, inline, false)); } + + private THEAD thead_(T e, boolean inline) { + return new THEAD("thead", e, opt(true, inline, false)); } + + private TFOOT tfoot_(T e, boolean inline) { + return new TFOOT("tfoot", e, opt(true, inline, false)); } + + private TBODY tbody_(T e, boolean inline) { + return new TBODY("tbody", e, opt(true, inline, false)); } + + private COL col_(T e, boolean inline) { + return new COL("col", e, opt(false, inline, false)); } + + private TR tr_(T e, boolean inline) { + return new TR("tr", e, opt(true, inline, false)); } + + public class BUTTON extends EImp implements HamletSpec.BUTTON { + public BUTTON(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public BUTTON $type(ButtonType value) { + addAttr("type", value); + return this; + } + + @Override + public BUTTON $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public BUTTON $value(String value) { + addAttr("value", value); + return this; + } + + @Override + public BUTTON $disabled() { + addAttr("disabled", null); + return this; + } + + @Override + public BUTTON $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public BUTTON $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public BUTTON $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public BUTTON $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public BUTTON address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public BUTTON __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public BUTTON hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BUTTON h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public BUTTON h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public BUTTON h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public BUTTON h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public BUTTON h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public BUTTON h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public BUTTON h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public BUTTON h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public BUTTON h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public BUTTON h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public BUTTON h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public BUTTON h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public BUTTON __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public BUTTON _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public BUTTON b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public BUTTON b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public BUTTON i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public BUTTON i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public BUTTON small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public BUTTON small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public BUTTON em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public BUTTON em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public BUTTON strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public BUTTON strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public BUTTON dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public BUTTON dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public BUTTON code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public BUTTON code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public BUTTON samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public BUTTON samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public BUTTON kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public BUTTON kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public BUTTON var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public BUTTON var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public BUTTON cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public BUTTON cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public BUTTON abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public BUTTON abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public BUTTON q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public BUTTON q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public BUTTON br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public BUTTON bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public BUTTON span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public BUTTON span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public BUTTON script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public BUTTON ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public BUTTON del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public BUTTON img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public BUTTON sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public BUTTON sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public BUTTON sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public BUTTON sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public BUTTON $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public BUTTON $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public BUTTON $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public BUTTON $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public BUTTON $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public BUTTON $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public BUTTON $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public BUTTON $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public BUTTON $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public BUTTON $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public BUTTON $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public BUTTON $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public BUTTON $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public BUTTON $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public BUTTON $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public BUTTON $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + public class LEGEND extends EImp implements HamletSpec.LEGEND { + public LEGEND(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public LEGEND $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public LEGEND $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public LEGEND $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public LEGEND $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public LEGEND $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public LEGEND $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public LEGEND $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public LEGEND $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public LEGEND $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public LEGEND $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public LEGEND $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public LEGEND $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public LEGEND $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public LEGEND $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public LEGEND $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public LEGEND $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public LEGEND $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public LEGEND __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public LEGEND _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public LEGEND b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public LEGEND b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public LEGEND i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public LEGEND i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public LEGEND small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public LEGEND small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public LEGEND em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public LEGEND em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public LEGEND strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public LEGEND strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public LEGEND dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public LEGEND dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public LEGEND code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public LEGEND code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public LEGEND samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public LEGEND samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public LEGEND kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public LEGEND kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public LEGEND var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public LEGEND var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public LEGEND cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public LEGEND cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public LEGEND abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public LEGEND abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public LEGEND a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public LEGEND a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public LEGEND img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public LEGEND sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public LEGEND sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public LEGEND sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public LEGEND sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public LEGEND q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public LEGEND q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public LEGEND br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public LEGEND bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public LEGEND span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public LEGEND span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public LEGEND script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public LEGEND ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public LEGEND del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public LEGEND label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public LEGEND textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public LEGEND button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class FIELDSET extends EImp implements HamletSpec.FIELDSET { + public FIELDSET(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public FIELDSET $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public FIELDSET $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public FIELDSET $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public FIELDSET $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public FIELDSET $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public FIELDSET $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public FIELDSET $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public FIELDSET $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public FIELDSET $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public FIELDSET $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public FIELDSET $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public FIELDSET $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public FIELDSET $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public FIELDSET $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public FIELDSET $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public FIELDSET $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public LEGEND> legend() { + closeAttrs(); + return legend_(this, false); + } + + @Override + public FIELDSET legend(String cdata) { + return legend().__(cdata).__(); + } + + @Override + public FIELDSET __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public FIELDSET _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public FIELDSET address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public FIELDSET __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public FIELDSET hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public FIELDSET h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public FIELDSET h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public FIELDSET h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public FIELDSET h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public FIELDSET h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public FIELDSET h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public FIELDSET h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public FIELDSET h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public FIELDSET h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public FIELDSET h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public FIELDSET h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public FIELDSET h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public FIELDSET b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public FIELDSET b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public FIELDSET i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public FIELDSET i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public FIELDSET small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public FIELDSET small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public FIELDSET em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public FIELDSET em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public FIELDSET strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public FIELDSET strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public FIELDSET dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public FIELDSET dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public FIELDSET code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public FIELDSET code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public FIELDSET samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public FIELDSET samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public FIELDSET kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public FIELDSET kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public FIELDSET var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public FIELDSET var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public FIELDSET cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public FIELDSET cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public FIELDSET abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public FIELDSET abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public FIELDSET a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public FIELDSET a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public FIELDSET img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public FIELDSET sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public FIELDSET sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public FIELDSET sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public FIELDSET sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public FIELDSET q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public FIELDSET q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public FIELDSET br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public FIELDSET bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public FIELDSET span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public FIELDSET span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public FIELDSET script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public FIELDSET ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public FIELDSET del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public FIELDSET label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public FIELDSET textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public FIELDSET button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + private LEGEND legend_(T e, boolean inline) { + return new LEGEND("legend", e, opt(true, inline, false)); } + + public class TEXTAREA extends EImp implements HamletSpec.TEXTAREA { + public TEXTAREA(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public TEXTAREA $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public TEXTAREA $disabled() { + addAttr("disabled", null); + return this; + } + + @Override + public TEXTAREA $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public TEXTAREA $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public TEXTAREA $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public TEXTAREA $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public TEXTAREA $rows(int value) { + addAttr("rows", value); + return this; + } + + @Override + public TEXTAREA $cols(int value) { + addAttr("cols", value); + return this; + } + + @Override + public TEXTAREA $readonly() { + addAttr("readonly", null); + return this; + } + + @Override + public TEXTAREA $onselect(String value) { + addAttr("onselect", value); + return this; + } + + @Override + public TEXTAREA $onchange(String value) { + addAttr("onchange", value); + return this; + } + + @Override + public TEXTAREA $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public TEXTAREA $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public TEXTAREA $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public TEXTAREA $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public TEXTAREA $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public TEXTAREA $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public TEXTAREA $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public TEXTAREA $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public TEXTAREA $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public TEXTAREA $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public TEXTAREA $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public TEXTAREA $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public TEXTAREA $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public TEXTAREA $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public TEXTAREA $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public TEXTAREA $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TEXTAREA __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public TEXTAREA _r(Object... lines) { + _p(false, lines); + return this; + } + } + + public class OPTION extends EImp implements HamletSpec.OPTION { + public OPTION(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public OPTION $value(String value) { + addAttr("value", value); + return this; + } + + @Override + public OPTION $disabled() { + addAttr("disabled", null); + return this; + } + + @Override + public OPTION $selected() { + addAttr("selected", null); + return this; + } + + @Override + public OPTION $label(String value) { + addAttr("label", value); + return this; + } + + @Override + public OPTION $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public OPTION $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public OPTION $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public OPTION $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public OPTION $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public OPTION $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public OPTION $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public OPTION $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public OPTION $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public OPTION $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public OPTION $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public OPTION $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public OPTION $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public OPTION $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public OPTION $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public OPTION $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public OPTION __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public OPTION _r(Object... lines) { + _p(false, lines); + return this; + } + } + + public class OPTGROUP extends EImp implements HamletSpec.OPTGROUP { + public OPTGROUP(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public OPTGROUP $disabled() { + addAttr("disabled", null); + return this; + } + + @Override + public OPTGROUP $label(String value) { + addAttr("label", value); + return this; + } + + @Override + public OPTGROUP $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public OPTGROUP $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public OPTGROUP $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public OPTGROUP $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public OPTGROUP $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public OPTGROUP $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public OPTGROUP $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public OPTGROUP $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public OPTGROUP $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public OPTGROUP $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public OPTGROUP $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public OPTGROUP $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public OPTGROUP $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public OPTGROUP $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public OPTGROUP $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public OPTGROUP $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public OPTION> option() { + closeAttrs(); + return option_(this, false); + } + + @Override + public OPTGROUP option(String cdata) { + return option().__(cdata).__(); + } + } + + private OPTGROUP optgroup_(T e, boolean inline) { + return new OPTGROUP("optgroup", e, opt(true, inline, false)); } + + public class SELECT extends EImp implements HamletSpec.SELECT { + public SELECT(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SELECT $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public SELECT $disabled() { + addAttr("disabled", null); + return this; + } + + @Override + public SELECT $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public SELECT $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public SELECT $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public SELECT $onchange(String value) { + addAttr("onchange", value); + return this; + } + + @Override + public OPTGROUP> optgroup() { + closeAttrs(); + return optgroup_(this, false); + } + + @Override + public SELECT $size(int value) { + addAttr("size", value); + return this; + } + + @Override + public SELECT $multiple() { + addAttr("multiple", null); + return this; + } + + @Override + public SELECT $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public SELECT $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public SELECT $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public SELECT $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public SELECT $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public SELECT $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public SELECT $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public SELECT $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public SELECT $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public SELECT $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public SELECT $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public SELECT $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public SELECT $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public SELECT $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public SELECT $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public SELECT $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public OPTION> option() { + closeAttrs(); + return option_(this, false); + } + + @Override + public SELECT option(String cdata) { + return option().__(cdata).__(); + } + } + + private OPTION option_(T e, boolean inline) { + return new OPTION("option", e, opt(false, inline, false)); } + + public class INPUT extends EImp implements HamletSpec.INPUT { + public INPUT(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public INPUT $type(InputType value) { + addAttr("type", value); + return this; + } + + @Override + public INPUT $src(String value) { + addAttr("src", value); + return this; + } + + @Override + public INPUT $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public INPUT $value(String value) { + addAttr("value", value); + return this; + } + + @Override + public INPUT $disabled() { + addAttr("disabled", null); + return this; + } + + @Override + public INPUT $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public INPUT $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public INPUT $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public INPUT $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public INPUT $readonly() { + addAttr("readonly", null); + return this; + } + + @Override + public INPUT $onselect(String value) { + addAttr("onselect", value); + return this; + } + + @Override + public INPUT $onchange(String value) { + addAttr("onchange", value); + return this; + } + + @Override + public INPUT $size(String value) { + addAttr("size", value); + return this; + } + + @Override + public INPUT $checked() { + addAttr("checked", null); + return this; + } + + @Override + public INPUT $maxlength(int value) { + addAttr("maxlength", value); + return this; + } + + @Override + public INPUT $alt(String value) { + addAttr("alt", value); + return this; + } + + @Override + public INPUT $ismap() { + addAttr("ismap", null); + return this; + } + + @Override + public INPUT $accept(String value) { + addAttr("accept", value); + return this; + } + + @Override + public INPUT $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public INPUT $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public INPUT $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public INPUT $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public INPUT $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public INPUT $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public INPUT $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public INPUT $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public INPUT $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public INPUT $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public INPUT $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public INPUT $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public INPUT $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public INPUT $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public INPUT $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public INPUT $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + public class LABEL extends EImp implements HamletSpec.LABEL { + public LABEL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public LABEL $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public LABEL $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public LABEL $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public LABEL $for(String value) { + addAttr("for", value); + return this; + } + + @Override + public LABEL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public LABEL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public LABEL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public LABEL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public LABEL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public LABEL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public LABEL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public LABEL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public LABEL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public LABEL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public LABEL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public LABEL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public LABEL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public LABEL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public LABEL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public LABEL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public LABEL __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public LABEL _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public LABEL b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public LABEL b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public LABEL i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public LABEL i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public LABEL small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public LABEL small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public LABEL em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public LABEL em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public LABEL strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public LABEL strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public LABEL dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public LABEL dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public LABEL code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public LABEL code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public LABEL samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public LABEL samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public LABEL kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public LABEL kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public LABEL var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public LABEL var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public LABEL cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public LABEL cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public LABEL abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public LABEL abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public LABEL a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public LABEL a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public LABEL img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public LABEL sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public LABEL sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public LABEL sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public LABEL sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public LABEL q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public LABEL q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public LABEL br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public LABEL bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public LABEL span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public LABEL span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public LABEL script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public LABEL ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public LABEL del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public LABEL textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public LABEL button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class FORM extends EImp implements HamletSpec.FORM { + public FORM(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public FORM $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public FORM $accept(String value) { + addAttr("accept", value); + return this; + } + + @Override + public FORM $action(String value) { + addAttr("action", value); + return this; + } + + @Override + public FORM $method(Method value) { + addAttr("method", value); + return this; + } + + @Override + public FORM $enctype(String value) { + addAttr("enctype", value); + return this; + } + + @Override + public FORM $onsubmit(String value) { + addAttr("onsubmit", value); + return this; + } + + @Override + public FORM $onreset(String value) { + addAttr("onreset", value); + return this; + } + + @Override + public FORM $accept_charset(String value) { + addAttr("accept-charset", value); + return this; + } + + @Override + public FORM $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public FORM $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public FORM $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public FORM $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public FORM $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public FORM $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public FORM $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public FORM $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public FORM $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public FORM $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public FORM $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public FORM $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public FORM $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public FORM $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public FORM $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public FORM $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public FORM script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public FORM address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public FORM __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public FORM hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public FORM h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public FORM h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public FORM h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public FORM h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public FORM h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public FORM h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public FORM h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public FORM h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public FORM h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public FORM h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public FORM h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public FORM h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + } + + public class LI extends EImp implements HamletSpec.LI { + public LI(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public LI $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public LI $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public LI $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public LI $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public LI $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public LI $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public LI $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public LI $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public LI $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public LI $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public LI $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public LI $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public LI $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public LI $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public LI $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public LI $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public LI address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public LI __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public LI hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public LI h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public LI h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public LI h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public LI h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public LI h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public LI h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public LI h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public LI h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public LI h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public LI h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public LI h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public LI h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public LI __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public LI _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public LI b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public LI b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public LI i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public LI i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public LI small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public LI small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public LI em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public LI em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public LI strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public LI strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public LI dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public LI dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public LI code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public LI code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public LI samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public LI samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public LI kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public LI kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public LI var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public LI var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public LI cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public LI cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public LI abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public LI abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public LI a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public LI a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public LI img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public LI sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public LI sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public LI sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public LI sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public LI q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public LI q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public LI br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public LI bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public LI span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public LI span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public LI script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public LI ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public LI del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public LI label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public LI textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public LI button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class UL extends EImp implements HamletSpec.UL { + public UL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public UL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public UL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public UL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public UL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public UL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public UL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public UL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public UL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public UL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public UL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public UL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public UL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public UL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public UL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public UL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public UL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public LI> li() { + closeAttrs(); + return li_(this, false); + } + + @Override + public UL li(String cdata) { + return li().__(cdata).__(); + } + } + + public class OL extends EImp implements HamletSpec.OL { + public OL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public OL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public OL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public OL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public OL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public OL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public OL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public OL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public OL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public OL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public OL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public OL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public OL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public OL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public OL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public OL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public OL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public LI> li() { + closeAttrs(); + return li_(this, false); + } + + @Override + public OL li(String cdata) { + return li().__(cdata).__(); + } + } + + private LI li_(T e, boolean inline) { + return new LI("li", e, opt(false, inline, false)); } + + public class DD extends EImp implements HamletSpec.DD { + public DD(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public DD $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public DD $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public DD $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public DD $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public DD $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public DD $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public DD $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public DD $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public DD $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public DD $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public DD $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public DD $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public DD $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public DD $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public DD $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public DD $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public DD address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public DD __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public DD hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public DD h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public DD h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public DD h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public DD h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public DD h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public DD h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public DD h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public DD h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public DD h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public DD h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public DD h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public DD h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public DD __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public DD _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public DD b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public DD b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public DD i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public DD i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public DD small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public DD small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public DD em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public DD em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public DD strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public DD strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public DD dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public DD dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public DD code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public DD code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public DD samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public DD samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public DD kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public DD kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public DD var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public DD var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public DD cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public DD cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public DD abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public DD abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public DD a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public DD a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public DD img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public DD sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public DD sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public DD sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public DD sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public DD q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public DD q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public DD br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public DD bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public DD span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public DD span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public DD script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public DD ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public DD del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public DD label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public DD textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public DD button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class DT extends EImp implements HamletSpec.DT { + public DT(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public DT $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public DT $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public DT $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public DT $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public DT $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public DT $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public DT $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public DT $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public DT $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public DT $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public DT $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public DT $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public DT $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public DT $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public DT $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public DT $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public DT __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public DT _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public DT b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public DT b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public DT i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public DT i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public DT small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public DT small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public DT em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public DT em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public DT strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public DT strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public DT dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public DT dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public DT code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public DT code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public DT samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public DT samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public DT kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public DT kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public DT var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public DT var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public DT cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public DT cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public DT abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public DT abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public DT a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public DT a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public DT img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public DT sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public DT sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public DT sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public DT sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public DT q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public DT q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public DT br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public DT bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public DT span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public DT span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public DT script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public DT ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public DT del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public DT label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public DT textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public DT button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class DL extends EImp implements HamletSpec.DL { + public DL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public DL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public DL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public DL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public DL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public DL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public DL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public DL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public DL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public DL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public DL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public DL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public DL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public DL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public DL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public DL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public DL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public DT> dt() { + closeAttrs(); + return dt_(this, false); + } + + @Override + public DL dt(String cdata) { + return dt().__(cdata).__(); + } + + @Override + public DD> dd() { + closeAttrs(); + return dd_(this, false); + } + + @Override + public DL dd(String cdata) { + return dd().__(cdata).__(); + } + } + + private DT dt_(T e, boolean inline) { + return new DT("dt", e, opt(false, inline, false)); } + + private DD dd_(T e, boolean inline) { + return new DD("dd", e, opt(false, inline, false)); } + + public class DEL extends EImp implements HamletSpec.DEL { + public DEL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public DEL $cite(String value) { + addAttr("cite", value); + return this; + } + + @Override + public DEL $datetime(String value) { + addAttr("datetime", value); + return this; + } + + @Override + public DEL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public DEL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public DEL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public DEL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public DEL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public DEL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public DEL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public DEL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public DEL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public DEL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public DEL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public DEL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public DEL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public DEL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public DEL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public DEL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public DEL address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public DEL __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public DEL hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public DEL h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public DEL h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public DEL h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public DEL h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public DEL h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public DEL h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public DEL h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public DEL h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public DEL h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public DEL h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public DEL h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public DEL h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public DEL __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public DEL _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public DEL b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public DEL b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public DEL i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public DEL i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public DEL small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public DEL small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public DEL em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public DEL em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public DEL strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public DEL strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public DEL dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public DEL dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public DEL code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public DEL code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public DEL samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public DEL samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public DEL kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public DEL kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public DEL var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public DEL var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public DEL cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public DEL cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public DEL abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public DEL abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public DEL a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public DEL a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public DEL img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public DEL sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public DEL sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public DEL sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public DEL sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public DEL q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public DEL q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public DEL br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public DEL bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public DEL span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public DEL span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public DEL script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public DEL ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public DEL del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public DEL label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public DEL textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public DEL button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class INS extends EImp implements HamletSpec.INS { + public INS(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public INS $cite(String value) { + addAttr("cite", value); + return this; + } + + @Override + public INS $datetime(String value) { + addAttr("datetime", value); + return this; + } + + @Override + public INS $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public INS $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public INS $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public INS $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public INS $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public INS $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public INS $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public INS $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public INS $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public INS $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public INS $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public INS $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public INS $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public INS $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public INS $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public INS $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public INS address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public INS __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public INS hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public INS h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public INS h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public INS h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public INS h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public INS h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public INS h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public INS h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public INS h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public INS h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public INS h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public INS h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public INS h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public INS __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public INS _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public INS b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public INS b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public INS i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public INS i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public INS small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public INS small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public INS em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public INS em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public INS strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public INS strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public INS dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public INS dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public INS code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public INS code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public INS samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public INS samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public INS kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public INS kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public INS var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public INS var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public INS cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public INS cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public INS abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public INS abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public INS a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public INS a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public INS img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public INS sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public INS sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public INS sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public INS sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public INS q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public INS q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public INS br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public INS bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public INS span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public INS span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public INS script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public INS ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public INS del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public INS label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public INS textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public INS button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class BLOCKQUOTE extends EImp implements HamletSpec.BLOCKQUOTE { + public BLOCKQUOTE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public BLOCKQUOTE $cite(String value) { + addAttr("cite", value); + return this; + } + + @Override + public BLOCKQUOTE $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public BLOCKQUOTE $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public BLOCKQUOTE $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public BLOCKQUOTE $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public BLOCKQUOTE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public BLOCKQUOTE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public BLOCKQUOTE $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public BLOCKQUOTE $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public BLOCKQUOTE $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public BLOCKQUOTE $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public BLOCKQUOTE $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public BLOCKQUOTE $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public BLOCKQUOTE $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public BLOCKQUOTE $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public BLOCKQUOTE $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public BLOCKQUOTE $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public BLOCKQUOTE address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public BLOCKQUOTE __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public BLOCKQUOTE hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public BLOCKQUOTE h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public BLOCKQUOTE h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public BLOCKQUOTE h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public BLOCKQUOTE h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public BLOCKQUOTE h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public BLOCKQUOTE h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public BLOCKQUOTE h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public BLOCKQUOTE h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public BLOCKQUOTE h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public BLOCKQUOTE h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public BLOCKQUOTE h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public BLOCKQUOTE script(String src) { + return setScriptSrc(script(), src).__(); + } + } + + public class Q extends EImp implements HamletSpec.Q { + public Q(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public Q $cite(String value) { + addAttr("cite", value); + return this; + } + + @Override + public Q $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public Q $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public Q $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public Q $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public Q $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public Q $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public Q $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public Q $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public Q $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public Q $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public Q $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public Q $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public Q $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public Q $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public Q $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public Q $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public Q __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public Q _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public Q b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public Q b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public Q i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public Q i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public Q small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public Q small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public Q em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public Q em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public Q strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public Q strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public Q dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public Q dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public Q code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public Q code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public Q samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public Q samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public Q kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public Q kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public Q var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public Q var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public Q cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public Q cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public Q abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public Q abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public Q a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public Q a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public Q img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public Q sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public Q sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public Q sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public Q sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public Q q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public Q q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public Q br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public Q bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public Q span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public Q span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public Q script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public Q ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public Q del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public Q label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public Q textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public Q button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class PRE extends EImp implements HamletSpec.PRE { + public PRE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public PRE $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public PRE $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public PRE $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public PRE $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public PRE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public PRE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public PRE $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public PRE $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public PRE $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public PRE $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public PRE $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public PRE $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public PRE $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public PRE $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public PRE $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public PRE $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public PRE __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public PRE _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public PRE b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public PRE b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public PRE i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public PRE i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public PRE em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public PRE em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public PRE strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public PRE strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public PRE dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public PRE dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public PRE code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public PRE code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public PRE samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public PRE samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public PRE kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public PRE kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public PRE var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public PRE var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public PRE cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public PRE cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public PRE abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public PRE abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public PRE a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public PRE a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public PRE q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public PRE q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public PRE br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public PRE bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public PRE span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public PRE span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public PRE script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public PRE ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public PRE del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public PRE label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public PRE textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public PRE button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class H6 extends EImp implements HamletSpec.H6 { + public H6(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public H6 $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public H6 $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public H6 $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public H6 $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public H6 $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public H6 $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public H6 $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public H6 $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public H6 $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public H6 $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public H6 $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public H6 $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public H6 $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public H6 $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public H6 $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public H6 $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public H6 __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public H6 _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public H6 b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public H6 b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public H6 i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public H6 i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public H6 small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public H6 small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public H6 em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public H6 em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public H6 strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public H6 strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public H6 dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public H6 dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public H6 code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public H6 code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public H6 samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public H6 samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public H6 kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public H6 kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public H6 var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public H6 var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public H6 cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public H6 cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public H6 abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public H6 abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public H6 a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public H6 a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public H6 img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public H6 sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public H6 sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public H6 sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public H6 sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public H6 q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public H6 q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public H6 br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public H6 bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public H6 span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public H6 span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public H6 script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public H6 ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public H6 del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public H6 label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public H6 textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public H6 button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class H5 extends EImp implements HamletSpec.H5 { + public H5(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public H5 $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public H5 $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public H5 $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public H5 $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public H5 $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public H5 $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public H5 $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public H5 $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public H5 $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public H5 $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public H5 $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public H5 $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public H5 $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public H5 $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public H5 $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public H5 $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public H5 __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public H5 _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public H5 b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public H5 b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public H5 i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public H5 i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public H5 small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public H5 small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public H5 em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public H5 em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public H5 strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public H5 strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public H5 dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public H5 dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public H5 code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public H5 code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public H5 samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public H5 samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public H5 kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public H5 kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public H5 var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public H5 var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public H5 cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public H5 cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public H5 abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public H5 abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public H5 a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public H5 a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public H5 img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public H5 sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public H5 sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public H5 sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public H5 sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public H5 q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public H5 q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public H5 br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public H5 bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public H5 span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public H5 span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public H5 script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public H5 ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public H5 del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public H5 label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public H5 textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public H5 button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class H4 extends EImp implements HamletSpec.H4 { + public H4(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public H4 $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public H4 $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public H4 $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public H4 $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public H4 $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public H4 $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public H4 $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public H4 $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public H4 $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public H4 $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public H4 $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public H4 $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public H4 $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public H4 $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public H4 $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public H4 $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public H4 __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public H4 _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public H4 b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public H4 b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public H4 i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public H4 i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public H4 small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public H4 small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public H4 em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public H4 em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public H4 strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public H4 strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public H4 dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public H4 dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public H4 code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public H4 code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public H4 samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public H4 samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public H4 kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public H4 kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public H4 var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public H4 var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public H4 cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public H4 cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public H4 abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public H4 abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public H4 a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public H4 a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public H4 img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public H4 sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public H4 sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public H4 sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public H4 sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public H4 q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public H4 q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public H4 br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public H4 bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public H4 span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public H4 span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public H4 script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public H4 ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public H4 del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public H4 label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public H4 textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public H4 button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class H3 extends EImp implements HamletSpec.H3 { + public H3(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public H3 $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public H3 $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public H3 $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public H3 $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public H3 $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public H3 $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public H3 $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public H3 $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public H3 $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public H3 $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public H3 $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public H3 $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public H3 $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public H3 $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public H3 $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public H3 $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public H3 __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public H3 _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public H3 b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public H3 b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public H3 i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public H3 i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public H3 small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public H3 small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public H3 em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public H3 em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public H3 strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public H3 strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public H3 dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public H3 dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public H3 code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public H3 code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public H3 samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public H3 samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public H3 kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public H3 kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public H3 var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public H3 var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public H3 cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public H3 cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public H3 abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public H3 abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public H3 a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public H3 a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public H3 img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public H3 sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public H3 sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public H3 sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public H3 sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public H3 q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public H3 q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public H3 br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public H3 bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public H3 span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public H3 span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public H3 script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public H3 ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public H3 del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public H3 label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public H3 textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public H3 button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class H2 extends EImp implements HamletSpec.H2 { + public H2(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public H2 $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public H2 $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public H2 $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public H2 $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public H2 $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public H2 $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public H2 $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public H2 $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public H2 $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public H2 $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public H2 $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public H2 $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public H2 $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public H2 $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public H2 $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public H2 $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public H2 __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public H2 _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public H2 b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public H2 b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public H2 i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public H2 i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public H2 small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public H2 small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public H2 em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public H2 em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public H2 strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public H2 strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public H2 dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public H2 dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public H2 code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public H2 code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public H2 samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public H2 samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public H2 kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public H2 kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public H2 var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public H2 var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public H2 cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public H2 cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public H2 abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public H2 abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public H2 a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public H2 a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public H2 img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public H2 sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public H2 sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public H2 sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public H2 sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public H2 q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public H2 q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public H2 br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public H2 bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public H2 span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public H2 span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public H2 script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public H2 ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public H2 del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public H2 label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public H2 textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public H2 button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class H1 extends EImp implements HamletSpec.H1 { + public H1(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public H1 $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public H1 $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public H1 $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public H1 $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public H1 $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public H1 $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public H1 $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public H1 $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public H1 $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public H1 $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public H1 $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public H1 $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public H1 $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public H1 $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public H1 $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public H1 $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public H1 __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public H1 _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public H1 b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public H1 b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public H1 i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public H1 i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public H1 small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public H1 small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public H1 em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public H1 em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public H1 strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public H1 strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public H1 dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public H1 dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public H1 code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public H1 code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public H1 samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public H1 samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public H1 kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public H1 kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public H1 var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public H1 var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public H1 cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public H1 cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public H1 abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public H1 abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public H1 a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public H1 a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public H1 img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public H1 sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public H1 sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public H1 sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public H1 sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public H1 q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public H1 q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public H1 br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public H1 bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public H1 span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public H1 span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public H1 script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public H1 ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public H1 del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public H1 label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public H1 textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public H1 button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class P extends EImp implements HamletSpec.P { + public P(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public P $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public P $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public P $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public P $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public P $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public P $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public P $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public P $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public P $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public P $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public P $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public P $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public P $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public P $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public P $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public P $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public P __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public P _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public P b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public P b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public P i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public P i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public P small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public P small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public P em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public P em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public P strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public P strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public P dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public P dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public P code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public P code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public P samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public P samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public P kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public P kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public P var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public P var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public P cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public P cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public P abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public P abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public P a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public P a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public P img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public P sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public P sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public P sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public P sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public P q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public P q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public P br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public P bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public P span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public P span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public P script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public P ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public P del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public P label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public P textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public P button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class HR extends EImp implements HamletSpec.HR { + public HR(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public HR $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public HR $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public HR $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public HR $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public HR $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public HR $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public HR $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public HR $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public HR $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public HR $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public HR $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public HR $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public HR $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public HR $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public HR $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public HR $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + public class PARAM extends EImp implements HamletSpec.PARAM { + public PARAM(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public PARAM $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public PARAM $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public PARAM $value(String value) { + addAttr("value", value); + return this; + } + } + + public class OBJECT extends EImp implements HamletSpec.OBJECT { + public OBJECT(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public OBJECT $type(String value) { + addAttr("type", value); + return this; + } + + @Override + public OBJECT $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public OBJECT $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public OBJECT $data(String value) { + addAttr("data", value); + return this; + } + + @Override + public OBJECT $height(String value) { + addAttr("height", value); + return this; + } + + @Override + public OBJECT $height(int value) { + addAttr("height", value); + return this; + } + + @Override + public OBJECT $width(int value) { + addAttr("width", value); + return this; + } + + @Override + public OBJECT $width(String value) { + addAttr("width", value); + return this; + } + + @Override + public OBJECT $usemap(String value) { + addAttr("usemap", value); + return this; + } + + @Override + public OBJECT $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public OBJECT $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public OBJECT $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public OBJECT $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public OBJECT $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public OBJECT $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public OBJECT $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public OBJECT $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public OBJECT $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public OBJECT $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public OBJECT $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public OBJECT $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public OBJECT $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public OBJECT $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public OBJECT $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public OBJECT $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public PARAM> param() { + closeAttrs(); + return param_(this, false); + } + + @Override + public OBJECT param(String name, String value) { + return param().$name(name).$value(value).__(); + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public OBJECT address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public OBJECT __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public OBJECT hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public OBJECT h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public OBJECT h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public OBJECT h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public OBJECT h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public OBJECT h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public OBJECT h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public OBJECT h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public OBJECT h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public OBJECT h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public OBJECT h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public OBJECT h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public OBJECT h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public OBJECT __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public OBJECT _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public OBJECT b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public OBJECT b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public OBJECT i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public OBJECT i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public OBJECT small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public OBJECT small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public OBJECT em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public OBJECT em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public OBJECT strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public OBJECT strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public OBJECT dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public OBJECT dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public OBJECT code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public OBJECT code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public OBJECT samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public OBJECT samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public OBJECT kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public OBJECT kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public OBJECT var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public OBJECT var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public OBJECT cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public OBJECT cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public OBJECT abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public OBJECT abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public OBJECT a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public OBJECT a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public OBJECT img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public OBJECT sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public OBJECT sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public OBJECT sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public OBJECT sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public OBJECT q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public OBJECT q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public OBJECT br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public OBJECT bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public OBJECT span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public OBJECT span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public OBJECT script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public OBJECT ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public OBJECT del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public OBJECT label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public OBJECT textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public OBJECT button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + private PARAM param_(T e, boolean inline) { + return new PARAM("param", e, opt(false, inline, false)); } + + public class IMG extends EImp implements HamletSpec.IMG { + public IMG(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public IMG $src(String value) { + addAttr("src", value); + return this; + } + + @Override + public IMG $alt(String value) { + addAttr("alt", value); + return this; + } + + @Override + public IMG $ismap() { + addAttr("ismap", null); + return this; + } + + @Override + public IMG $height(String value) { + addAttr("height", value); + return this; + } + + @Override + public IMG $height(int value) { + addAttr("height", value); + return this; + } + + @Override + public IMG $width(int value) { + addAttr("width", value); + return this; + } + + @Override + public IMG $width(String value) { + addAttr("width", value); + return this; + } + + @Override + public IMG $usemap(String value) { + addAttr("usemap", value); + return this; + } + + @Override + public IMG $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public IMG $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public IMG $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public IMG $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public IMG $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public IMG $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public IMG $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public IMG $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public IMG $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public IMG $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public IMG $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public IMG $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public IMG $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public IMG $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public IMG $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public IMG $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + public class LINK extends EImp implements HamletSpec.LINK { + public LINK(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public LINK $rel(EnumSet value) { + addRelAttr("rel", value); + return this; + } + + @Override + public LINK $rel(String value) { + addAttr("rel", value); + return this; + } + + @Override + public LINK $href(String value) { + addAttr("href", value); + return this; + } + + @Override + public LINK $type(String value) { + addAttr("type", value); + return this; + } + + @Override + public LINK $media(EnumSet value) { + addMediaAttr("media", value); + return this; + } + + @Override + public LINK $media(String value) { + addAttr("media", value); + return this; + } + + @Override + public LINK $hreflang(String value) { + addAttr("hreflang", value); + return this; + } + + @Override + public LINK $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public LINK $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public LINK $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public LINK $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public LINK $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public LINK $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public LINK $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public LINK $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public LINK $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public LINK $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public LINK $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public LINK $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public LINK $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public LINK $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public LINK $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public LINK $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + public class AREA extends EImp implements HamletSpec.AREA { + public AREA(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public AREA $href(String value) { + addAttr("href", value); + return this; + } + + @Override + public AREA $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public AREA $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public AREA $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public AREA $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public AREA $alt(String value) { + addAttr("alt", value); + return this; + } + + @Override + public AREA $shape(Shape value) { + addAttr("shape", value); + return this; + } + + @Override + public AREA $coords(String value) { + addAttr("coords", value); + return this; + } + + @Override + public AREA $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public AREA $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public AREA $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public AREA $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public AREA $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public AREA $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public AREA $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public AREA $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public AREA $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public AREA $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public AREA $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public AREA $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public AREA $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public AREA $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public AREA $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public AREA $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + } + + private AREA area_(T e, boolean inline) { + return new AREA("area", e, opt(false, inline, false)); } + + public class MAP extends EImp implements HamletSpec.MAP { + public MAP(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public MAP $name(String value) { + addAttr("name", value); + return this; + } + + @Override + public AREA> area() { + closeAttrs(); + return area_(this, false); + } + + @Override + public AREA> area(String selector) { + return setSelector(area(), selector); + } + + @Override + public MAP $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public MAP $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public MAP $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public MAP $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public MAP $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public MAP $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public MAP $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public MAP $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public MAP $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public MAP $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public MAP $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public MAP $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public MAP $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public MAP $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public MAP $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public MAP $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public MAP address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public MAP __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public MAP hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public MAP h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public MAP h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public MAP h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public MAP h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public MAP h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public MAP h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public MAP h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public MAP h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public MAP h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public MAP h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public MAP h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public MAP h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + } + + public class A extends EImp implements HamletSpec.A { + public A(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public A $rel(EnumSet value) { + addRelAttr("rel", value); + return this; + } + + @Override + public A $rel(String value) { + addAttr("rel", value); + return this; + } + + @Override + public A $href(String value) { + addAttr("href", value); + return this; + } + + @Override + public A $type(String value) { + addAttr("type", value); + return this; + } + + @Override + public A $tabindex(int value) { + addAttr("tabindex", value); + return this; + } + + @Override + public A $accesskey(String value) { + addAttr("accesskey", value); + return this; + } + + @Override + public A $onfocus(String value) { + addAttr("onfocus", value); + return this; + } + + @Override + public A $onblur(String value) { + addAttr("onblur", value); + return this; + } + + @Override + public A $hreflang(String value) { + addAttr("hreflang", value); + return this; + } + + @Override + public A $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public A $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public A $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public A $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public A $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public A $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public A $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public A $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public A $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public A $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public A $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public A $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public A $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public A $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public A $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public A $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public A __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public A _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public A b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public A b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public A i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public A i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public A small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public A small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public A em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public A em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public A strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public A strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public A dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public A dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public A code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public A code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public A samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public A samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public A kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public A kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public A var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public A var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public A cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public A cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public A abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public A abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public A img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public A q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public A q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public A br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public A bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public A span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public A span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public A script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public A ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public A del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public A sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public A sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public A sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public A sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public A label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public A textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public A button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class DIV extends EImp implements HamletSpec.DIV { + public DIV(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public DIV $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public DIV $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public DIV $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public DIV $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public DIV $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public DIV $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public DIV $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public DIV $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public DIV $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public DIV $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public DIV $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public DIV $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public DIV $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public DIV $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public DIV $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public DIV $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public DIV address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public DIV __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public DIV hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public DIV h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public DIV h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public DIV h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public DIV h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public DIV h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public DIV h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public DIV h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public DIV h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public DIV h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public DIV h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public DIV h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public DIV h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public DIV __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public DIV _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public DIV b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public DIV b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public DIV i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public DIV i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public DIV small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public DIV small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public DIV em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public DIV em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public DIV strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public DIV strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public DIV dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public DIV dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public DIV code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public DIV code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public DIV samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public DIV samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public DIV kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public DIV kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public DIV var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public DIV var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public DIV cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public DIV cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public DIV abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public DIV abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public DIV a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public DIV a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public DIV img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public DIV sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public DIV sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public DIV sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public DIV sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public DIV q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public DIV q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public DIV br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public DIV bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public DIV span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public DIV span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public DIV script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public DIV ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public DIV del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public DIV label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public DIV textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public DIV button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class ADDRESS extends EImp implements HamletSpec.ADDRESS { + public ADDRESS(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public ADDRESS $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public ADDRESS $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public ADDRESS $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public ADDRESS $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public ADDRESS $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public ADDRESS $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public ADDRESS $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public ADDRESS $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public ADDRESS $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public ADDRESS $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public ADDRESS $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public ADDRESS $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public ADDRESS $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public ADDRESS $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public ADDRESS $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public ADDRESS $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public ADDRESS __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public ADDRESS _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public ADDRESS b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public ADDRESS b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public ADDRESS i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public ADDRESS i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public ADDRESS small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public ADDRESS small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public ADDRESS em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public ADDRESS em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public ADDRESS strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public ADDRESS strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public ADDRESS dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public ADDRESS dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public ADDRESS code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public ADDRESS code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public ADDRESS samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public ADDRESS samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public ADDRESS kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public ADDRESS kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public ADDRESS var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public ADDRESS var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public ADDRESS cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public ADDRESS cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public ADDRESS abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public ADDRESS abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public ADDRESS a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public ADDRESS a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public ADDRESS img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public ADDRESS sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public ADDRESS sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public ADDRESS sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public ADDRESS sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public ADDRESS q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public ADDRESS q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public ADDRESS br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public ADDRESS bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public ADDRESS span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public ADDRESS span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public ADDRESS script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public ADDRESS ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public ADDRESS del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public ADDRESS label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public ADDRESS textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public ADDRESS button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class BODY extends EImp implements HamletSpec.BODY { + public BODY(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public BODY $onload(String value) { + addAttr("onload", value); + return this; + } + + @Override + public BODY $onunload(String value) { + addAttr("onunload", value); + return this; + } + + @Override + public BODY $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public BODY $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public BODY $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public BODY $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public BODY $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public BODY $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public BODY $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public BODY $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public BODY $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public BODY $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public BODY $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public BODY $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public BODY $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public BODY $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public BODY $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public BODY $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public TABLE> table() { + closeAttrs(); + return table_(this, false); + } + + @Override + public TABLE> table(String selector) { + return setSelector(table(), selector); + } + + @Override + public BODY address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS> address() { + closeAttrs(); + return address_(this, false); + } + + @Override + public P> p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P> p() { + closeAttrs(); + return p_(this, false); + } + + @Override + public BODY __(Class cls) { + _v(cls); + return this; + } + + @Override + public HR> hr() { + closeAttrs(); + return hr_(this, false); + } + + @Override + public BODY hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL> dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL> dl() { + closeAttrs(); + return dl_(this, false); + } + + @Override + public DIV> div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV> div() { + closeAttrs(); + return div_(this, false); + } + + @Override + public BLOCKQUOTE> blockquote() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE> bq() { + closeAttrs(); + return blockquote_(this, false); + } + + @Override + public BODY h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1> h1() { + closeAttrs(); + return h1_(this, false); + } + + @Override + public BODY h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public BODY h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2> h2() { + closeAttrs(); + return h2_(this, false); + } + + @Override + public BODY h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3> h3() { + closeAttrs(); + return h3_(this, false); + } + + @Override + public BODY h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public BODY h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4> h4() { + closeAttrs(); + return h4_(this, false); + } + + @Override + public BODY h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public BODY h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5> h5() { + closeAttrs(); + return h5_(this, false); + } + + @Override + public BODY h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public BODY h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6> h6() { + closeAttrs(); + return h6_(this, false); + } + + @Override + public BODY h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public BODY h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL> ul() { + closeAttrs(); + return ul_(this, false); + } + + @Override + public UL> ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL> ol() { + closeAttrs(); + return ol_(this, false); + } + + @Override + public OL> ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE> pre() { + closeAttrs(); + return pre_(this, false); + } + + @Override + public PRE> pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM> form() { + closeAttrs(); + return form_(this, false); + } + + @Override + public FORM> form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET> fieldset() { + closeAttrs(); + return fieldset_(this, false); + } + + @Override + public FIELDSET> fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, false); + } + + @Override + public BODY script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, false); + } + + @Override + public BODY ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, false); + } + + @Override + public BODY del(String cdata) { + return del().__(cdata).__(); + } + } + + private TABLE table_(T e, boolean inline) { + return new TABLE("table", e, opt(true, inline, false)); } + + private ADDRESS address_(T e, boolean inline) { + return new ADDRESS("address", e, opt(true, inline, false)); } + + private P p_(T e, boolean inline) { + return new P("p", e, opt(false, inline, false)); } + + private HR hr_(T e, boolean inline) { + return new HR("hr", e, opt(false, inline, false)); } + + private DL dl_(T e, boolean inline) { + return new DL("dl", e, opt(true, inline, false)); } + + private DIV div_(T e, boolean inline) { + return new DIV("div", e, opt(true, inline, false)); } + + private BLOCKQUOTE blockquote_(T e, boolean inline) { + return new BLOCKQUOTE("blockquote", e, opt(true, inline, false)); } + + private BLOCKQUOTE bq_(T e, boolean inline) { + return new BLOCKQUOTE("blockquote", e, opt(true, inline, false)); } + + private FIELDSET fieldset_(T e, boolean inline) { + return new FIELDSET("fieldset", e, opt(true, inline, false)); } + + private FORM form_(T e, boolean inline) { + return new FORM("form", e, opt(true, inline, false)); } + + public class BR extends EImp implements HamletSpec.BR { + public BR(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public BR $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public BR $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public BR $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public BR $style(String value) { + addAttr("style", value); + return this; + } + } + + public class BDO extends EImp implements HamletSpec.BDO { + public BDO(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public BDO $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public BDO $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public BDO $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public BDO $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public BDO $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public BDO $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public BDO __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public BDO _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public BDO b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public BDO b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public BDO i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public BDO i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public BDO small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public BDO small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public BDO em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public BDO em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public BDO strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public BDO strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public BDO dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public BDO dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public BDO code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public BDO code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public BDO samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public BDO samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public BDO kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public BDO kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public BDO var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public BDO var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public BDO cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public BDO cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public BDO abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public BDO abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public BDO a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public BDO a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public BDO img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public BDO sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public BDO sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public BDO sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public BDO sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public BDO q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public BDO q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public BDO br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public BDO bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public BDO span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public BDO span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public BDO script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public BDO ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public BDO del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public BDO label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public BDO textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public BDO button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class SPAN extends EImp implements HamletSpec.SPAN { + public SPAN(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SPAN $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public SPAN $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public SPAN $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public SPAN $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public SPAN $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public SPAN $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public SPAN $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public SPAN $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public SPAN $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public SPAN $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public SPAN $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public SPAN $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public SPAN $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public SPAN $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public SPAN $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public SPAN $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public SPAN __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public SPAN _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public SPAN b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public SPAN b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public SPAN i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public SPAN i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public SPAN small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public SPAN small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public SPAN em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public SPAN em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public SPAN strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public SPAN strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public SPAN dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public SPAN dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public SPAN code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public SPAN code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public SPAN samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public SPAN samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public SPAN kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public SPAN kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public SPAN var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public SPAN var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public SPAN cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public SPAN cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public SPAN abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public SPAN abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public SPAN a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public SPAN a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public SPAN img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public SPAN sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public SPAN sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public SPAN sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public SPAN sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public SPAN q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public SPAN q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public SPAN br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public SPAN bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public SPAN span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public SPAN span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public SPAN script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public SPAN ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public SPAN del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public SPAN label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public SPAN textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public SPAN button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class SUP extends EImp implements HamletSpec.SUP { + public SUP(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SUP $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public SUP $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public SUP $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public SUP $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public SUP $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public SUP $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public SUP $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public SUP $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public SUP $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public SUP $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public SUP $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public SUP $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public SUP $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public SUP $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public SUP $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public SUP $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public SUP __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public SUP _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public SUP b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public SUP b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public SUP i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public SUP i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public SUP small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public SUP small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public SUP em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public SUP em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public SUP strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public SUP strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public SUP dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public SUP dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public SUP code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public SUP code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public SUP samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public SUP samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public SUP kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public SUP kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public SUP var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public SUP var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public SUP cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public SUP cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public SUP abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public SUP abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public SUP a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public SUP a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public SUP img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public SUP sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public SUP sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public SUP sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public SUP sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public SUP q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public SUP q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public SUP br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public SUP bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public SUP span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public SUP span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public SUP script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public SUP ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public SUP del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public SUP label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public SUP textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public SUP button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class SUB extends EImp implements HamletSpec.SUB { + public SUB(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SUB $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public SUB $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public SUB $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public SUB $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public SUB $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public SUB $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public SUB $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public SUB $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public SUB $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public SUB $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public SUB $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public SUB $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public SUB $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public SUB $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public SUB $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public SUB $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public SUB __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public SUB _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public SUB b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public SUB b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public SUB i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public SUB i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public SUB small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public SUB small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public SUB em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public SUB em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public SUB strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public SUB strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public SUB dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public SUB dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public SUB code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public SUB code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public SUB samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public SUB samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public SUB kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public SUB kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public SUB var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public SUB var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public SUB cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public SUB cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public SUB abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public SUB abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public SUB a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public SUB a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public SUB img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public SUB sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public SUB sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public SUB sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public SUB sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public SUB q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public SUB q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public SUB br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public SUB bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public SUB span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public SUB span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public SUB script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public SUB ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public SUB del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public SUB label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public SUB textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public SUB button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class ACRONYM extends EImp implements HamletSpec.ACRONYM { + public ACRONYM(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public ACRONYM $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public ACRONYM $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public ACRONYM $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public ACRONYM $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public ACRONYM $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public ACRONYM $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public ACRONYM $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public ACRONYM $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public ACRONYM $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public ACRONYM $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public ACRONYM $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public ACRONYM $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public ACRONYM $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public ACRONYM $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public ACRONYM $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public ACRONYM $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public ACRONYM __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public ACRONYM _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public ACRONYM b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public ACRONYM b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public ACRONYM i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public ACRONYM i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public ACRONYM small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public ACRONYM small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public ACRONYM em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public ACRONYM em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public ACRONYM strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public ACRONYM strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public ACRONYM dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public ACRONYM dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public ACRONYM code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public ACRONYM code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public ACRONYM samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public ACRONYM samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public ACRONYM kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public ACRONYM kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public ACRONYM var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public ACRONYM var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public ACRONYM cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public ACRONYM cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public ACRONYM abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public ACRONYM abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public ACRONYM a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public ACRONYM a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public ACRONYM img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public ACRONYM sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public ACRONYM sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public ACRONYM sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public ACRONYM sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public ACRONYM q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public ACRONYM q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public ACRONYM br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public ACRONYM bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public ACRONYM span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public ACRONYM span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public ACRONYM script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public ACRONYM ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public ACRONYM del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public ACRONYM label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public ACRONYM textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public ACRONYM button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class ABBR extends EImp implements HamletSpec.ABBR { + public ABBR(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public ABBR $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public ABBR $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public ABBR $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public ABBR $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public ABBR $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public ABBR $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public ABBR $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public ABBR $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public ABBR $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public ABBR $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public ABBR $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public ABBR $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public ABBR $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public ABBR $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public ABBR $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public ABBR $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public ABBR __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public ABBR _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public ABBR b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public ABBR b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public ABBR i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public ABBR i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public ABBR small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public ABBR small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public ABBR em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public ABBR em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public ABBR strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public ABBR strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public ABBR dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public ABBR dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public ABBR code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public ABBR code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public ABBR samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public ABBR samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public ABBR kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public ABBR kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public ABBR var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public ABBR var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public ABBR cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public ABBR cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public ABBR abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public ABBR abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public ABBR a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public ABBR a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public ABBR img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public ABBR sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public ABBR sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public ABBR sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public ABBR sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public ABBR q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public ABBR q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public ABBR br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public ABBR bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public ABBR span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public ABBR span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public ABBR script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public ABBR ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public ABBR del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public ABBR label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public ABBR textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public ABBR button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class CITE extends EImp implements HamletSpec.CITE { + public CITE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public CITE $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public CITE $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public CITE $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public CITE $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public CITE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public CITE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public CITE $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public CITE $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public CITE $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public CITE $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public CITE $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public CITE $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public CITE $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public CITE $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public CITE $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public CITE $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public CITE __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public CITE _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public CITE b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public CITE b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public CITE i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public CITE i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public CITE small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public CITE small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public CITE em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public CITE em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public CITE strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public CITE strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public CITE dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public CITE dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public CITE code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public CITE code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public CITE samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public CITE samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public CITE kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public CITE kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public CITE var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public CITE var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public CITE cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public CITE cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public CITE abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public CITE abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public CITE a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public CITE a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public CITE img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public CITE sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public CITE sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public CITE sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public CITE sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public CITE q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public CITE q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public CITE br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public CITE bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public CITE span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public CITE span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public CITE script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public CITE ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public CITE del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public CITE label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public CITE textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public CITE button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class VAR extends EImp implements HamletSpec.VAR { + public VAR(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public VAR $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public VAR $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public VAR $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public VAR $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public VAR $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public VAR $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public VAR $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public VAR $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public VAR $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public VAR $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public VAR $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public VAR $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public VAR $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public VAR $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public VAR $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public VAR $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public VAR __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public VAR _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public VAR b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public VAR b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public VAR i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public VAR i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public VAR small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public VAR small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public VAR em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public VAR em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public VAR strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public VAR strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public VAR dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public VAR dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public VAR code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public VAR code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public VAR samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public VAR samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public VAR kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public VAR kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public VAR var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public VAR var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public VAR cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public VAR cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public VAR abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public VAR abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public VAR a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public VAR a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public VAR img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public VAR sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public VAR sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public VAR sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public VAR sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public VAR q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public VAR q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public VAR br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public VAR bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public VAR span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public VAR span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public VAR script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public VAR ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public VAR del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public VAR label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public VAR textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public VAR button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class KBD extends EImp implements HamletSpec.KBD { + public KBD(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public KBD $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public KBD $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public KBD $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public KBD $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public KBD $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public KBD $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public KBD $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public KBD $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public KBD $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public KBD $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public KBD $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public KBD $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public KBD $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public KBD $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public KBD $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public KBD $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public KBD __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public KBD _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public KBD b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public KBD b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public KBD i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public KBD i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public KBD small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public KBD small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public KBD em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public KBD em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public KBD strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public KBD strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public KBD dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public KBD dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public KBD code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public KBD code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public KBD samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public KBD samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public KBD kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public KBD kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public KBD var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public KBD var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public KBD cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public KBD cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public KBD abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public KBD abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public KBD a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public KBD a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public KBD img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public KBD sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public KBD sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public KBD sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public KBD sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public KBD q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public KBD q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public KBD br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public KBD bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public KBD span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public KBD span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public KBD script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public KBD ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public KBD del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public KBD label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public KBD textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public KBD button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class SAMP extends EImp implements HamletSpec.SAMP { + public SAMP(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SAMP $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public SAMP $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public SAMP $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public SAMP $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public SAMP $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public SAMP $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public SAMP $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public SAMP $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public SAMP $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public SAMP $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public SAMP $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public SAMP $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public SAMP $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public SAMP $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public SAMP $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public SAMP $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public SAMP __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public SAMP _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public SAMP b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public SAMP b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public SAMP i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public SAMP i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public SAMP small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public SAMP small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public SAMP em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public SAMP em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public SAMP strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public SAMP strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public SAMP dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public SAMP dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public SAMP code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public SAMP code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public SAMP samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public SAMP samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public SAMP kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public SAMP kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public SAMP var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public SAMP var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public SAMP cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public SAMP cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public SAMP abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public SAMP abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public SAMP a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public SAMP a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public SAMP img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public SAMP sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public SAMP sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public SAMP sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public SAMP sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public SAMP q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public SAMP q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public SAMP br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public SAMP bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public SAMP span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public SAMP span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public SAMP script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public SAMP ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public SAMP del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public SAMP label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public SAMP textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public SAMP button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class CODE extends EImp implements HamletSpec.CODE { + public CODE(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public CODE $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public CODE $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public CODE $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public CODE $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public CODE $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public CODE $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public CODE $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public CODE $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public CODE $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public CODE $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public CODE $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public CODE $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public CODE $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public CODE $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public CODE $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public CODE $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public CODE __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public CODE _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public CODE b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public CODE b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public CODE i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public CODE i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public CODE small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public CODE small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public CODE em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public CODE em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public CODE strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public CODE strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public CODE dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public CODE dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public CODE code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public CODE code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public CODE samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public CODE samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public CODE kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public CODE kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public CODE var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public CODE var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public CODE cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public CODE cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public CODE abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public CODE abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public CODE a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public CODE a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public CODE img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public CODE sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public CODE sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public CODE sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public CODE sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public CODE q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public CODE q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public CODE br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public CODE bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public CODE span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public CODE span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public CODE script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public CODE ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public CODE del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public CODE label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public CODE textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public CODE button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class DFN extends EImp implements HamletSpec.DFN { + public DFN(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public DFN $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public DFN $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public DFN $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public DFN $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public DFN $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public DFN $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public DFN $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public DFN $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public DFN $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public DFN $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public DFN $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public DFN $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public DFN $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public DFN $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public DFN $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public DFN $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public DFN __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public DFN _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public DFN b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public DFN b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public DFN i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public DFN i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public DFN small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public DFN small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public DFN em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public DFN em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public DFN strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public DFN strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public DFN dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public DFN dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public DFN code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public DFN code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public DFN samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public DFN samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public DFN kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public DFN kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public DFN var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public DFN var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public DFN cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public DFN cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public DFN abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public DFN abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public DFN a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public DFN a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public DFN img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public DFN sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public DFN sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public DFN sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public DFN sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public DFN q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public DFN q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public DFN br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public DFN bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public DFN span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public DFN span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public DFN script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public DFN ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public DFN del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public DFN label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public DFN textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public DFN button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class STRONG extends EImp implements HamletSpec.STRONG { + public STRONG(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public STRONG $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public STRONG $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public STRONG $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public STRONG $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public STRONG $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public STRONG $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public STRONG $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public STRONG $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public STRONG $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public STRONG $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public STRONG $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public STRONG $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public STRONG $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public STRONG $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public STRONG $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public STRONG $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public STRONG __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public STRONG _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public STRONG b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public STRONG b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public STRONG i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public STRONG i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public STRONG small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public STRONG small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public STRONG em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public STRONG em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public STRONG strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public STRONG strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public STRONG dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public STRONG dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public STRONG code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public STRONG code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public STRONG samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public STRONG samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public STRONG kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public STRONG kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public STRONG var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public STRONG var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public STRONG cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public STRONG cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public STRONG abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public STRONG abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public STRONG a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public STRONG a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public STRONG img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public STRONG sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public STRONG sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public STRONG sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public STRONG sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public STRONG q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public STRONG q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public STRONG br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public STRONG bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public STRONG span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public STRONG span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public STRONG script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public STRONG ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public STRONG del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public STRONG label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public STRONG textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public STRONG button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class EM extends EImp implements HamletSpec.EM { + public EM(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public EM $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public EM $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public EM $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public EM $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public EM $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public EM $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public EM $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public EM $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public EM $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public EM $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public EM $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public EM $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public EM $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public EM $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public EM $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public EM $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public EM __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public EM _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public EM b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public EM b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public EM i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public EM i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public EM small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public EM small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public EM em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public EM em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public EM strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public EM strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public EM dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public EM dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public EM code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public EM code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public EM samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public EM samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public EM kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public EM kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public EM var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public EM var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public EM cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public EM cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public EM abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public EM abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public EM a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public EM a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public EM img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public EM sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public EM sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public EM sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public EM sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public EM q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public EM q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public EM br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public EM bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public EM span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public EM span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public EM script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public EM ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public EM del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public EM label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public EM textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public EM button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class SMALL extends EImp implements HamletSpec.SMALL { + public SMALL(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public SMALL $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public SMALL $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public SMALL $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public SMALL $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public SMALL $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public SMALL $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public SMALL $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public SMALL $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public SMALL $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public SMALL $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public SMALL $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public SMALL $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public SMALL $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public SMALL $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public SMALL $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public SMALL $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public SMALL __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public SMALL _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public SMALL b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public SMALL b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public SMALL i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public SMALL i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public SMALL small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public SMALL small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public SMALL em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public SMALL em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public SMALL strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public SMALL strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public SMALL dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public SMALL dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public SMALL code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public SMALL code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public SMALL samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public SMALL samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public SMALL kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public SMALL kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public SMALL var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public SMALL var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public SMALL cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public SMALL cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public SMALL abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public SMALL abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public SMALL a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public SMALL a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public SMALL img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public SMALL sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public SMALL sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public SMALL sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public SMALL sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public SMALL q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public SMALL q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public SMALL br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public SMALL bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public SMALL span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public SMALL span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public SMALL script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public SMALL ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public SMALL del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public SMALL label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public SMALL textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public SMALL button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class B extends EImp implements HamletSpec.B { + public B(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public B $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public B $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public B $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public B $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public B $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public B $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public B $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public B $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public B $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public B $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public B $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public B $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public B $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public B $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public B $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public B $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public B __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public B _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public B b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public B b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public B i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public B i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public B small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public B small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public B em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public B em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public B strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public B strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public B dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public B dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public B code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public B code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public B samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public B samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public B kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public B kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public B var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public B var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public B cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public B cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public B abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public B abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public B a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public B a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public B img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public B sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public B sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public B sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public B sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public B q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public B q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public B br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public B bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public B span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public B span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public B script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public B ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public B del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public B label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public B textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public B button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + public class I extends EImp implements HamletSpec.I { + public I(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + @Override + public I $id(String value) { + addAttr("id", value); + return this; + } + + @Override + public I $class(String value) { + addAttr("class", value); + return this; + } + + @Override + public I $title(String value) { + addAttr("title", value); + return this; + } + + @Override + public I $style(String value) { + addAttr("style", value); + return this; + } + + @Override + public I $lang(String value) { + addAttr("lang", value); + return this; + } + + @Override + public I $dir(Dir value) { + addAttr("dir", value); + return this; + } + + @Override + public I $onclick(String value) { + addAttr("onclick", value); + return this; + } + + @Override + public I $ondblclick(String value) { + addAttr("ondblclick", value); + return this; + } + + @Override + public I $onmousedown(String value) { + addAttr("onmousedown", value); + return this; + } + + @Override + public I $onmouseup(String value) { + addAttr("onmouseup", value); + return this; + } + + @Override + public I $onmouseover(String value) { + addAttr("onmouseover", value); + return this; + } + + @Override + public I $onmousemove(String value) { + addAttr("onmousemove", value); + return this; + } + + @Override + public I $onmouseout(String value) { + addAttr("onmouseout", value); + return this; + } + + @Override + public I $onkeypress(String value) { + addAttr("onkeypress", value); + return this; + } + + @Override + public I $onkeydown(String value) { + addAttr("onkeydown", value); + return this; + } + + @Override + public I $onkeyup(String value) { + addAttr("onkeyup", value); + return this; + } + + @Override + public I __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public I _r(Object... lines) { + _p(false, lines); + return this; + } + + @Override + public B> b() { + closeAttrs(); + return b_(this, true); + } + + @Override + public I b(String cdata) { + return b().__(cdata).__(); + } + + @Override + public I b(String selector, String cdata) { + return setSelector(b(), selector).__(cdata).__(); + } + + @Override + public I> i() { + closeAttrs(); + return i_(this, true); + } + + @Override + public I i(String cdata) { + return i().__(cdata).__(); + } + + @Override + public I i(String selector, String cdata) { + return setSelector(i(), selector).__(cdata).__(); + } + + @Override + public SMALL> small() { + closeAttrs(); + return small_(this, true); + } + + @Override + public I small(String cdata) { + return small().__(cdata).__(); + } + + @Override + public I small(String selector, String cdata) { + return setSelector(small(), selector).__(cdata).__(); + } + + @Override + public I em(String cdata) { + return em().__(cdata).__(); + } + + @Override + public EM> em() { + closeAttrs(); + return em_(this, true); + } + + @Override + public I em(String selector, String cdata) { + return setSelector(em(), selector).__(cdata).__(); + } + + @Override + public STRONG> strong() { + closeAttrs(); + return strong_(this, true); + } + + @Override + public I strong(String cdata) { + return strong().__(cdata).__(); + } + + @Override + public I strong(String selector, String cdata) { + return setSelector(strong(), selector).__(cdata).__(); + } + + @Override + public DFN> dfn() { + closeAttrs(); + return dfn_(this, true); + } + + @Override + public I dfn(String cdata) { + return dfn().__(cdata).__(); + } + + @Override + public I dfn(String selector, String cdata) { + return setSelector(dfn(), selector).__(cdata).__(); + } + + @Override + public CODE> code() { + closeAttrs(); + return code_(this, true); + } + + @Override + public I code(String cdata) { + return code().__(cdata).__(); + } + + @Override + public I code(String selector, String cdata) { + return setSelector(code(), selector).__(cdata).__(); + } + + @Override + public I samp(String cdata) { + return samp().__(cdata).__(); + } + + @Override + public SAMP> samp() { + closeAttrs(); + return samp_(this, true); + } + + @Override + public I samp(String selector, String cdata) { + return setSelector(samp(), selector).__(cdata).__(); + } + + @Override + public KBD> kbd() { + closeAttrs(); + return kbd_(this, true); + } + + @Override + public I kbd(String cdata) { + return kbd().__(cdata).__(); + } + + @Override + public I kbd(String selector, String cdata) { + return setSelector(kbd(), selector).__(cdata).__(); + } + + @Override + public VAR> var() { + closeAttrs(); + return var_(this, true); + } + + @Override + public I var(String cdata) { + return var().__(cdata).__(); + } + + @Override + public I var(String selector, String cdata) { + return setSelector(var(), selector).__(cdata).__(); + } + + @Override + public CITE> cite() { + closeAttrs(); + return cite_(this, true); + } + + @Override + public I cite(String cdata) { + return cite().__(cdata).__(); + } + + @Override + public I cite(String selector, String cdata) { + return setSelector(cite(), selector).__(cdata).__(); + } + + @Override + public ABBR> abbr() { + closeAttrs(); + return abbr_(this, true); + } + + @Override + public I abbr(String cdata) { + return abbr().__(cdata).__(); + } + + @Override + public I abbr(String selector, String cdata) { + return setSelector(abbr(), selector).__(cdata).__(); + } + + @Override + public A> a() { + closeAttrs(); + return a_(this, true); + } + + @Override + public A> a(String selector) { + return setSelector(a(), selector); + } + + @Override + public I a(String href, String anchorText) { + return a().$href(href).__(anchorText).__(); + } + + @Override + public I a(String selector, String href, String anchorText) { + return setSelector(a(), selector).$href(href).__(anchorText).__(); + } + + @Override + public IMG> img() { + closeAttrs(); + return img_(this, true); + } + + @Override + public I img(String src) { + return img().$src(src).__(); + } + + @Override + public OBJECT> object() { + closeAttrs(); + return object_(this, true); + } + + @Override + public OBJECT> object(String selector) { + return setSelector(object(), selector); + } + + @Override + public SUB> sub() { + closeAttrs(); + return sub_(this, true); + } + + @Override + public I sub(String cdata) { + return sub().__(cdata).__(); + } + + @Override + public I sub(String selector, String cdata) { + return setSelector(sub(), selector).__(cdata).__(); + } + + @Override + public SUP> sup() { + closeAttrs(); + return sup_(this, true); + } + + @Override + public I sup(String cdata) { + return sup().__(cdata).__(); + } + + @Override + public I sup(String selector, String cdata) { + return setSelector(sup(), selector).__(cdata).__(); + } + + @Override + public MAP> map() { + closeAttrs(); + return map_(this, true); + } + + @Override + public MAP> map(String selector) { + return setSelector(map(), selector); + } + + @Override + public I q(String cdata) { + return q().__(cdata).__(); + } + + @Override + public I q(String selector, String cdata) { + return setSelector(q(), selector).__(cdata).__(); + } + + @Override + public Q> q() { + closeAttrs(); + return q_(this, true); + } + + @Override + public BR> br() { + closeAttrs(); + return br_(this, true); + } + + @Override + public I br(String selector) { + return setSelector(br(), selector).__(); + } + + @Override + public BDO> bdo() { + closeAttrs(); + return bdo_(this, true); + } + + @Override + public I bdo(Dir dir, String cdata) { + return bdo().$dir(dir).__(cdata).__(); + } + + @Override + public SPAN> span() { + closeAttrs(); + return span_(this, true); + } + + @Override + public I span(String cdata) { + return span().__(cdata).__(); + } + + @Override + public I span(String selector, String cdata) { + return setSelector(span(), selector).__(cdata).__(); + } + + @Override + public SCRIPT> script() { + closeAttrs(); + return script_(this, true); + } + + @Override + public I script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public INS> ins() { + closeAttrs(); + return ins_(this, true); + } + + @Override + public I ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL> del() { + closeAttrs(); + return del_(this, true); + } + + @Override + public I del(String cdata) { + return del().__(cdata).__(); + } + + @Override + public LABEL> label() { + closeAttrs(); + return label_(this, true); + } + + @Override + public I label(String forId, String cdata) { + return label().$for(forId).__(cdata).__(); + } + + @Override + public INPUT> input(String selector) { + return setSelector(input(), selector); + } + + @Override + public INPUT> input() { + closeAttrs(); + return input_(this, true); + } + + @Override + public SELECT> select() { + closeAttrs(); + return select_(this, true); + } + + @Override + public SELECT> select(String selector) { + return setSelector(select(), selector); + } + + @Override + public TEXTAREA> textarea(String selector) { + return setSelector(textarea(), selector); + } + + @Override + public TEXTAREA> textarea() { + closeAttrs(); + return textarea_(this, true); + } + + @Override + public I textarea(String selector, String cdata) { + return setSelector(textarea(), selector).__(cdata).__(); + } + + @Override + public BUTTON> button() { + closeAttrs(); + return button_(this, true); + } + + @Override + public BUTTON> button(String selector) { + return setSelector(button(), selector); + } + + @Override + public I button(String selector, String cdata) { + return setSelector(button(), selector).__(cdata).__(); + } + } + + private INPUT input_(T e, boolean inline) { + return new INPUT("input", e, opt(false, inline, false)); } + + private SELECT select_(T e, boolean inline) { + return new SELECT("select", e, opt(true, inline, false)); } + + private TEXTAREA textarea_(T e, boolean inline) { + return new TEXTAREA("textarea", e, opt(true, inline, false)); } + + private BUTTON button_(T e, boolean inline) { + return new BUTTON("button", e, opt(true, inline, false)); } + + private LABEL label_(T e, boolean inline) { + return new LABEL("label", e, opt(true, inline, false)); } + + private MAP map_(T e, boolean inline) { + return new MAP("map", e, opt(true, inline, false)); } + + private Q q_(T e, boolean inline) { + return new Q("q", e, opt(true, inline, false)); } + + private BR br_(T e, boolean inline) { + return new BR("br", e, opt(false, inline, false)); } + + private BDO bdo_(T e, boolean inline) { + return new BDO("bdo", e, opt(true, inline, false)); } + + private SPAN span_(T e, boolean inline) { + return new SPAN("span", e, opt(true, inline, false)); } + + private INS ins_(T e, boolean inline) { + return new INS("ins", e, opt(true, inline, false)); } + + private DEL del_(T e, boolean inline) { + return new DEL("del", e, opt(true, inline, false)); } + + private A a_(T e, boolean inline) { + return new A("a", e, opt(true, inline, false)); } + + private SUB sub_(T e, boolean inline) { + return new SUB("sub", e, opt(true, inline, false)); } + + private SUP sup_(T e, boolean inline) { + return new SUP("sup", e, opt(true, inline, false)); } + + private IMG img_(T e, boolean inline) { + return new IMG("img", e, opt(false, inline, false)); } + + private EM em_(T e, boolean inline) { + return new EM("em", e, opt(true, inline, false)); } + + private STRONG strong_(T e, boolean inline) { + return new STRONG("strong", e, opt(true, inline, false)); } + + private DFN dfn_(T e, boolean inline) { + return new DFN("dfn", e, opt(true, inline, false)); } + + private CODE code_(T e, boolean inline) { + return new CODE("code", e, opt(true, inline, false)); } + + private SAMP samp_(T e, boolean inline) { + return new SAMP("samp", e, opt(true, inline, false)); } + + private KBD kbd_(T e, boolean inline) { + return new KBD("kbd", e, opt(true, inline, false)); } + + private VAR var_(T e, boolean inline) { + return new VAR("var", e, opt(true, inline, false)); } + + private CITE cite_(T e, boolean inline) { + return new CITE("cite", e, opt(true, inline, false)); } + + private ABBR abbr_(T e, boolean inline) { + return new ABBR("abbr", e, opt(true, inline, false)); } + + private B b_(T e, boolean inline) { + return new B("b", e, opt(true, inline, false)); } + + private I i_(T e, boolean inline) { + return new I("i", e, opt(true, inline, false)); } + + private SMALL small_(T e, boolean inline) { + return new SMALL("small", e, opt(true, inline, false)); } + + private PRE pre_(T e, boolean inline) { + return new PRE("pre", e, opt(true, inline, true)); } + + private UL ul_(T e, boolean inline) { + return new UL("ul", e, opt(true, inline, false)); } + + private OL ol_(T e, boolean inline) { + return new OL("ol", e, opt(true, inline, false)); } + + private H1 h1_(T e, boolean inline) { + return new H1("h1", e, opt(true, inline, false)); } + + private H2 h2_(T e, boolean inline) { + return new H2("h2", e, opt(true, inline, false)); } + + private H3 h3_(T e, boolean inline) { + return new H3("h3", e, opt(true, inline, false)); } + + private H4 h4_(T e, boolean inline) { + return new H4("h4", e, opt(true, inline, false)); } + + private H5 h5_(T e, boolean inline) { + return new H5("h5", e, opt(true, inline, false)); } + + private H6 h6_(T e, boolean inline) { + return new H6("h6", e, opt(true, inline, false)); } + + private STYLE style_(T e, boolean inline) { + return new STYLE("style", e, opt(true, inline, false)); } + + private LINK link_(T e, boolean inline) { + return new LINK("link", e, opt(false, inline, false)); } + + private META meta_(T e, boolean inline) { + return new META("meta", e, opt(false, inline, false)); } + + private OBJECT object_(T e, boolean inline) { + return new OBJECT("object", e, opt(true, inline, false)); } + + private SCRIPT script_(T e, boolean inline) { + return new SCRIPT("script", e, opt(true, inline, false)); } + + @Override + public HEAD head() { + return head_(this, false); + } + + @Override + public BODY body() { + return body_(this, false); + } + + @Override + public BODY body(String selector) { + return setSelector(body(), selector); + } + + @Override + public BASE base() { + return base_(this, false); + } + + @Override + public Hamlet base(String href) { + return base().$href(href).__(); + } + + @Override + public TITLE title() { + return title_(this, false); + } + + @Override + public Hamlet title(String cdata) { + return title().__(cdata).__(); + } + + @Override + public STYLE style() { + return style_(this, false); + } + + @Override + public Hamlet style(Object... lines) { + return style().$type("text/css").__(lines).__(); + } + + @Override + public LINK link() { + return link_(this, false); + } + + @Override + public Hamlet link(String href) { + return setLinkHref(link(), href).__(); + } + + @Override + public META meta() { + return meta_(this, false); + } + + @Override + public Hamlet meta(String name, String content) { + return meta().$name(name).$content(content).__(); + } + + @Override + public Hamlet meta_http(String header, String content) { + return meta().$http_equiv(header).$content(content).__(); + } + + @Override + public SCRIPT script() { + return script_(this, false); + } + + @Override + public Hamlet script(String src) { + return setScriptSrc(script(), src).__(); + } + + @Override + public OBJECT object() { + return object_(this, true); + } + + @Override + public OBJECT object(String selector) { + return setSelector(object(), selector); + } + + @Override + public TABLE table() { + return table_(this, false); + } + + @Override + public TABLE table(String selector) { + return setSelector(table(), selector); + } + + @Override + public Hamlet address(String cdata) { + return address().__(cdata).__(); + } + + @Override + public ADDRESS address() { + return address_(this, false); + } + + @Override + public P p(String selector) { + return setSelector(p(), selector); + } + + @Override + public P p() { + return p_(this, false); + } + + @Override + public Hamlet __(Class cls) { + subView(cls); + return this; + } + + @Override + public HR hr() { + return hr_(this, false); + } + + @Override + public Hamlet hr(String selector) { + return setSelector(hr(), selector).__(); + } + + @Override + public DL dl(String selector) { + return setSelector(dl(), selector); + } + + @Override + public DL dl() { + return dl_(this, false); + } + + @Override + public DIV div(String selector) { + return setSelector(div(), selector); + } + + @Override + public DIV div() { + return div_(this, false); + } + + @Override + public BLOCKQUOTE blockquote() { + return blockquote_(this, false); + } + + @Override + public BLOCKQUOTE bq() { + return blockquote_(this, false); + } + + @Override + public Hamlet h1(String cdata) { + return h1().__(cdata).__(); + } + + @Override + public H1 h1() { + return h1_(this, false); + } + + @Override + public Hamlet h1(String selector, String cdata) { + return setSelector(h1(), selector).__(cdata).__(); + } + + @Override + public Hamlet h2(String cdata) { + return h2().__(cdata).__(); + } + + @Override + public H2 h2() { + return h2_(this, false); + } + + @Override + public Hamlet h2(String selector, String cdata) { + return setSelector(h2(), selector).__(cdata).__(); + } + + @Override + public H3 h3() { + return h3_(this, false); + } + + @Override + public Hamlet h3(String cdata) { + return h3().__(cdata).__(); + } + + @Override + public Hamlet h3(String selector, String cdata) { + return setSelector(h3(), selector).__(cdata).__(); + } + + @Override + public H4 h4() { + return h4_(this, false); + } + + @Override + public Hamlet h4(String cdata) { + return h4().__(cdata).__(); + } + + @Override + public Hamlet h4(String selector, String cdata) { + return setSelector(h4(), selector).__(cdata).__(); + } + + @Override + public H5 h5() { + return h5_(this, false); + } + + @Override + public Hamlet h5(String cdata) { + return h5().__(cdata).__(); + } + + @Override + public Hamlet h5(String selector, String cdata) { + return setSelector(h5(), selector).__(cdata).__(); + } + + @Override + public H6 h6() { + return h6_(this, false); + } + + @Override + public Hamlet h6(String cdata) { + return h6().__(cdata).__(); + } + + @Override + public Hamlet h6(String selector, String cdata) { + return setSelector(h6(), selector).__(cdata).__(); + } + + @Override + public UL ul() { + return ul_(this, false); + } + + @Override + public UL ul(String selector) { + return setSelector(ul(), selector); + } + + @Override + public OL ol() { + return ol_(this, false); + } + + @Override + public OL ol(String selector) { + return setSelector(ol(), selector); + } + + @Override + public PRE pre() { + return pre_(this, false); + } + + @Override + public PRE pre(String selector) { + return setSelector(pre(), selector); + } + + @Override + public FORM form() { + return form_(this, false); + } + + @Override + public FORM form(String selector) { + return setSelector(form(), selector); + } + + @Override + public FIELDSET fieldset() { + return fieldset_(this, false); + } + + @Override + public FIELDSET fieldset(String selector) { + return setSelector(fieldset(), selector); + } + + @Override + public INS ins() { + return ins_(this, false); + } + + @Override + public Hamlet ins(String cdata) { + return ins().__(cdata).__(); + } + + @Override + public DEL del() { + return del_(this, false); + } + + @Override + public Hamlet del(String cdata) { + return del().__(cdata).__(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletGen.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletGen.java new file mode 100644 index 00000000000..c6ca93c597c --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletGen.java @@ -0,0 +1,449 @@ +/** +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.apache.hadoop.yarn.webapp.hamlet2; + +import com.google.common.collect.Sets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.Set; +import java.util.regex.Pattern; + +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.GnuParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Options; +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.util.StringUtils; +import org.apache.hadoop.yarn.webapp.WebAppException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Generates a specific hamlet implementation class from a spec class + * using a generic hamlet implementation class. + */ +@InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) +public class HamletGen { + static final Logger LOG = LoggerFactory.getLogger(HamletGen.class); + static final Options opts = new Options(); + static { + opts.addOption("h", "help", false, "Print this help message"). + addOption("s", "spec-class", true, + "The class that holds the spec interfaces. e.g. HamletSpec"). + addOption("i", "impl-class", true, + "An implementation class. e.g. HamletImpl"). + addOption("o", "output-class", true, "Output class name"). + addOption("p", "output-package", true, "Output package name"); + }; + + static final Pattern elementRegex = Pattern.compile("^[A-Z][A-Z0-9]*$"); + + int bytes = 0; + PrintWriter out; + final Set endTagOptional = Sets.newHashSet(); + final Set inlineElements = Sets.newHashSet(); + Class top; // html top-level interface + String hamlet; // output class simple name; + boolean topMode; + + /** + * Generate a specific Hamlet implementation from a spec. + * @param specClass holds hamlet interfaces. e.g. {@link HamletSpec} + * @param implClass a generic hamlet implementation. e.g. {@link HamletImpl} + * @param outputName name of the output class. e.g. {@link Hamlet} + * @param outputPkg package name of the output class. + * @throws IOException + */ + public void generate(Class specClass, Class implClass, + String outputName, String outputPkg) throws IOException { + LOG.info("Generating {} using {} and {}", new Object[]{outputName, + specClass, implClass}); + out = new PrintWriter(outputName +".java", "UTF-8"); + hamlet = basename(outputName); + String pkg = pkgName(outputPkg, implClass.getPackage().getName()); + puts(0, "// Generated by HamletGen. Do NOT edit!\n", + "package ", pkg, ";\n", + "import java.io.PrintWriter;\n", + "import java.util.EnumSet;\n", + "import static java.util.EnumSet.*;\n", + "import static ", implClass.getName(), ".EOpt.*;\n", + "import org.apache.hadoop.yarn.webapp.SubView;"); + String implClassName = implClass.getSimpleName(); + if (!implClass.getPackage().getName().equals(pkg)) { + puts(0, "import ", implClass.getName(), ';'); + } + puts(0, "\n", + "public class ", hamlet, " extends ", implClassName, + " implements ", specClass.getSimpleName(), "._Html {\n", + " public ", hamlet, "(PrintWriter out, int nestLevel,", + " boolean wasInline) {\n", + " super(out, nestLevel, wasInline);\n", + " }\n\n", // inline is context sensitive + " static EnumSet opt(boolean endTag, boolean inline, ", + "boolean pre) {\n", + " EnumSet opts = of(ENDTAG);\n", + " if (!endTag) opts.remove(ENDTAG);\n", + " if (inline) opts.add(INLINE);\n", + " if (pre) opts.add(PRE);\n", + " return opts;\n", + " }"); + initLut(specClass); + genImpl(specClass, implClassName, 1); + LOG.info("Generating {} methods", hamlet); + genMethods(hamlet, top, 1); + puts(0, "}"); + out.close(); + LOG.info("Wrote {} bytes to {}.java", bytes, outputName); + } + + String basename(String path) { + return path.substring(path.lastIndexOf('/') + 1); + } + + String pkgName(String pkg, String defaultPkg) { + if (pkg == null || pkg.isEmpty()) return defaultPkg; + return pkg; + } + + void initLut(Class spec) { + endTagOptional.clear(); + inlineElements.clear(); + for (Class cls : spec.getClasses()) { + Annotation a = cls.getAnnotation(HamletSpec.Element.class); + if (a != null && !((HamletSpec.Element) a).endTag()) { + endTagOptional.add(cls.getSimpleName()); + } + if (cls.getSimpleName().equals("Inline")) { + for (Method method : cls.getMethods()) { + String retName = method.getReturnType().getSimpleName(); + if (isElement(retName)) { + inlineElements.add(retName); + } + } + } + } + } + + void genImpl(Class spec, String implClassName, int indent) { + String specName = spec.getSimpleName(); + for (Class cls : spec.getClasses()) { + String className = cls.getSimpleName(); + if (cls.isInterface()) { + genFactoryMethods(cls, indent); + } + if (isElement(className)) { + LOG.info("Generating class {}", className); + puts(indent, "\n", + "public class ", className, "", + " extends EImp implements ", specName, ".", className, " {\n", + " public ", className, "(String name, T parent,", + " EnumSet opts) {\n", + " super(name, parent, opts);\n", + " }"); + genMethods(className, cls, indent + 1); + puts(indent, "}"); + } else if (className.equals("_Html")) { + top = cls; + } + } + } + + void genFactoryMethods(Class cls, int indent) { + for (Method method : cls.getDeclaredMethods()) { + String retName = method.getReturnType().getSimpleName(); + String methodName = method.getName(); + if (methodName.charAt(0) == '$') continue; + if (isElement(retName) && method.getParameterTypes().length == 0) { + genFactoryMethod(retName, methodName, indent); + } + } + } + + void genMethods(String className, Class cls, int indent) { + topMode = (top != null && cls.equals(top)); + for (Method method : cls.getMethods()) { + String retName = method.getReturnType().getSimpleName(); + if (method.getName().charAt(0) == '$') { + genAttributeMethod(className, method, indent); + } else if (isElement(retName)) { + genNewElementMethod(className, method, indent); + } else { + genCurElementMethod(className, method, indent); + } + } + } + + void genAttributeMethod(String className, Method method, int indent) { + String methodName = method.getName(); + String attrName = methodName.substring(1).replace("__", "-"); + Type[] params = method.getGenericParameterTypes(); + echo(indent, "\n", + "@Override\n", + "public ", className, topMode ? " " : " ", methodName, "("); + if (params.length == 0) { + puts(0, ") {"); + puts(indent, + " addAttr(\"", attrName, "\", null);\n", + " return this;\n", "}"); + } else if (params.length == 1) { + String typeName = getTypeName(params[0]); + puts(0, typeName, " value) {"); + if (typeName.equals("EnumSet")) { + puts(indent, + " addRelAttr(\"", attrName, "\", value);\n", + " return this;\n", "}"); + } else if (typeName.equals("EnumSet")) { + puts(indent, + " addMediaAttr(\"", attrName, "\", value);\n", + " return this;\n", "}"); + } else { + puts(indent, + " addAttr(\"", attrName, "\", value);\n", + " return this;\n", "}"); + } + } else { + throwUnhandled(className, method); + } + } + + String getTypeName(Type type) { + if (type instanceof Class) { + return ((Class)type).getSimpleName(); + } + ParameterizedType pt = (ParameterizedType) type; + return ((Class)pt.getRawType()).getSimpleName() +"<"+ + ((Class)pt.getActualTypeArguments()[0]).getSimpleName() +">"; + } + + void genFactoryMethod(String retName, String methodName, int indent) { + puts(indent, "\n", + "private ", retName, " ", methodName, + "__(T e, boolean inline) {\n", + " return new ", retName, "(\"", StringUtils.toLowerCase(retName), + "\", e, opt(", !endTagOptional.contains(retName), ", inline, ", + retName.equals("PRE"), ")); }"); + } + + void genNewElementMethod(String className, Method method, int indent) { + String methodName = method.getName(); + String retName = method.getReturnType().getSimpleName(); + Class[] params = method.getParameterTypes(); + echo(indent, "\n", + "@Override\n", + "public ", retName, "<", className, topMode ? "> " : "> ", + methodName, "("); + if (params.length == 0) { + puts(0, ") {"); + puts(indent, + topMode ? "" : " closeAttrs();\n", + " return ", StringUtils.toLowerCase(retName), "__" + "(this, ", + isInline(className, retName), ");\n", "}"); + } else if (params.length == 1) { + puts(0, "String selector) {"); + puts(indent, + " return setSelector(", methodName, "(), selector);\n", "}"); + } else { + throwUnhandled(className, method); + } + } + + boolean isInline(String container, String className) { + if ((container.equals("BODY") || container.equals(hamlet) || + container.equals("HEAD") || container.equals("HTML")) && + (className.equals("INS") || className.equals("DEL") || + className.equals("SCRIPT"))) { + return false; + } + return inlineElements.contains(className); + } + + void genCurElementMethod(String className, Method method, int indent) { + String methodName = method.getName(); + Class[] params = method.getParameterTypes(); + if (topMode || params.length > 0) { + echo(indent, "\n", + "@Override\n", + "public ", className, topMode ? " " : " ", methodName, "("); + } + if (params.length == 0) { + if (topMode) { + puts(0, ") {"); + puts(indent, " return this;\n", "}"); + } + } else if (params.length == 1) { + if (methodName.equals("base")) { + puts(0, "String href) {"); + puts(indent, + " return base().$href(href).__();\n", "}"); + } else if (methodName.equals("script")) { + puts(0, "String src) {"); + puts(indent, + " return setScriptSrc(script(), src).__();\n", "}"); + } else if (methodName.equals("style")) { + puts(0, "Object... lines) {"); + puts(indent, + " return style().$type(\"text/css\").__(lines).__();\n", "}"); + } else if (methodName.equals("img")) { + puts(0, "String src) {"); + puts(indent, + " return ", methodName, "().$src(src).__();\n", "}"); + } else if (methodName.equals("br") || methodName.equals("hr") || + methodName.equals("col")) { + puts(0, "String selector) {"); + puts(indent, + " return setSelector(", methodName, "(), selector).__();\n", "}"); + } else if (methodName.equals("link")) { + puts(0, "String href) {"); + puts(indent, + " return setLinkHref(", methodName, "(), href).__();\n", "}"); + } else if (methodName.equals("__")) { + if (params[0].getSimpleName().equals("Class")) { + puts(0, "Class cls) {"); + puts(indent, + " ", topMode ? "subView" : "_v", "(cls);\n", + " return this;\n", "}"); + } else { + puts(0, "Object... lines) {"); + puts(indent, + " _p(", needsEscaping(className), ", lines);\n", + " return this;\n", "}"); + } + } else if (methodName.equals("_r")) { + puts(0, "Object... lines) {"); + puts(indent, + " _p(false, lines);\n", + " return this;\n", "}"); + } else { + puts(0, "String cdata) {"); + puts(indent, + " return ", methodName, "().__(cdata).__();\n", "}"); + } + } else if (params.length == 2) { + if (methodName.equals("meta")) { + puts(0, "String name, String content) {"); + puts(indent, + " return meta().$name(name).$content(content).__();\n", "}"); + } else if (methodName.equals("meta_http")) { + puts(0, "String header, String content) {"); + puts(indent, + " return meta().$http_equiv(header).$content(content).__();\n", + "}"); + } else if (methodName.equals("a")) { + puts(0, "String href, String anchorText) {"); + puts(indent, + " return a().$href(href).__(anchorText).__();\n", "}"); + } else if (methodName.equals("bdo")) { + puts(0, "Dir dir, String cdata) {"); + puts(indent, " return bdo().$dir(dir).__(cdata).__();\n", "}"); + } else if (methodName.equals("label")) { + puts(0, "String forId, String cdata) {"); + puts(indent, " return label().$for(forId).__(cdata).__();\n", "}"); + } else if (methodName.equals("param")) { + puts(0, "String name, String value) {"); + puts(indent, + " return param().$name(name).$value(value).__();\n", "}"); + } else { + puts(0, "String selector, String cdata) {"); + puts(indent, + " return setSelector(", methodName, + "(), selector).__(cdata).__();\n", "}"); + } + } else if (params.length == 3) { + if (methodName.equals("a")) { + puts(0, "String selector, String href, String anchorText) {"); + puts(indent, + " return setSelector(a(), selector)", + ".$href(href).__(anchorText).__();\n", "}"); + } + } else { + throwUnhandled(className, method); + } + } + + static boolean needsEscaping(String eleName) { + return !eleName.equals("SCRIPT") && !eleName.equals("STYLE"); + } + + static void throwUnhandled(String className, Method method) { + throw new WebAppException("Unhandled " + className + "#" + method); + } + + void echo(int indent, Object... args) { + String prev = null; + for (Object o : args) { + String s = String.valueOf(o); + if (!s.isEmpty() && !s.equals("\n") && + (prev == null || prev.endsWith("\n"))) { + indent(indent); + } + prev = s; + out.print(s); + bytes += s.length(); + } + } + + void indent(int indent) { + for (int i = 0; i < indent; ++i) { + out.print(" "); + bytes += 2; + } + } + + void puts(int indent, Object... args) { + echo(indent, args); + out.println(); + ++bytes; + } + + boolean isElement(String s) { + return elementRegex.matcher(s).matches(); + } + + public static void main(String[] args) throws Exception { + CommandLine cmd = new GnuParser().parse(opts, args); + if (cmd.hasOption("help")) { + new HelpFormatter().printHelp("Usage: hbgen [OPTIONS]", opts); + return; + } + // defaults + Class specClass = HamletSpec.class; + Class implClass = HamletImpl.class; + String outputClass = "HamletTmp"; + String outputPackage = implClass.getPackage().getName(); + if (cmd.hasOption("spec-class")) { + specClass = Class.forName(cmd.getOptionValue("spec-class")); + } + if (cmd.hasOption("impl-class")) { + implClass = Class.forName(cmd.getOptionValue("impl-class")); + } + if (cmd.hasOption("output-class")) { + outputClass = cmd.getOptionValue("output-class"); + } + if (cmd.hasOption("output-package")) { + outputPackage = cmd.getOptionValue("output-package"); + } + new HamletGen().generate(specClass, implClass, outputClass, outputPackage); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletImpl.java new file mode 100644 index 00000000000..995e9fb4912 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletImpl.java @@ -0,0 +1,385 @@ +/** +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.apache.hadoop.yarn.webapp.hamlet2; + +import com.google.common.base.Joiner; +import static com.google.common.base.Preconditions.*; +import com.google.common.base.Splitter; +import com.google.common.collect.Iterables; + +import java.io.PrintWriter; +import java.util.EnumSet; +import static java.util.EnumSet.*; +import java.util.Iterator; + +import static org.apache.commons.lang.StringEscapeUtils.*; +import static org.apache.hadoop.yarn.webapp.hamlet2.HamletImpl.EOpt.*; + +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.yarn.webapp.SubView; +import org.apache.hadoop.yarn.webapp.WebAppException; + + +/** + * A simple unbuffered generic hamlet implementation. + * + * Zero copy but allocation on every element, which could be + * optimized to use a thread-local element pool. + * + * Prints HTML as it builds. So the order is important. + */ +@InterfaceAudience.Private +public class HamletImpl extends HamletSpec { + private static final String INDENT_CHARS = " "; + private static final Splitter SS = Splitter.on('.'). + omitEmptyStrings().trimResults(); + private static final Joiner SJ = Joiner.on(' '); + private static final Joiner CJ = Joiner.on(", "); + static final int S_ID = 0; + static final int S_CLASS = 1; + + int nestLevel; + int indents; // number of indent() called. mostly for testing. + private final PrintWriter out; + private final StringBuilder sb = new StringBuilder(); // not shared + private boolean wasInline = false; + + /** + * Element options. (whether it needs end tag, is inline etc.) + */ + public enum EOpt { + /** needs end(close) tag */ + ENDTAG, + /** The content is inline */ + INLINE, + /** The content is preformatted */ + PRE + }; + + /** + * The base class for elements + * @param type of the parent (containing) element for the element + */ + public class EImp implements _Child { + private final String name; + private final T parent; // short cut for parent element + private final EnumSet opts; // element options + + private boolean started = false; + private boolean attrsClosed = false; + + EImp(String name, T parent, EnumSet opts) { + this.name = name; + this.parent = parent; + this.opts = opts; + } + + @Override + public T __() { + closeAttrs(); + --nestLevel; + printEndTag(name, opts); + return parent; + } + + protected void _p(boolean quote, Object... args) { + closeAttrs(); + for (Object s : args) { + if (!opts.contains(PRE)) { + indent(opts); + } + out.print(quote ? escapeHtml(String.valueOf(s)) + : String.valueOf(s)); + if (!opts.contains(INLINE) && !opts.contains(PRE)) { + out.println(); + } + } + } + + protected void _v(Class cls) { + closeAttrs(); + subView(cls); + } + + protected void closeAttrs() { + if (!attrsClosed) { + startIfNeeded(); + ++nestLevel; + out.print('>'); + if (!opts.contains(INLINE) && !opts.contains(PRE)) { + out.println(); + } + attrsClosed = true; + } + } + + protected void addAttr(String name, String value) { + checkState(!attrsClosed, "attribute added after content"); + startIfNeeded(); + printAttr(name, value); + } + + protected void addAttr(String name, Object value) { + addAttr(name, String.valueOf(value)); + } + + protected void addMediaAttr(String name, EnumSet media) { + // 6.13 comma-separated list + addAttr(name, CJ.join(media)); + } + + protected void addRelAttr(String name, EnumSet types) { + // 6.12 space-separated list + addAttr(name, SJ.join(types)); + } + + private void startIfNeeded() { + if (!started) { + printStartTag(name, opts); + started = true; + } + } + + protected void _inline(boolean choice) { + if (choice) { + opts.add(INLINE); + } else { + opts.remove(INLINE); + } + } + + protected void _endTag(boolean choice) { + if (choice) { + opts.add(ENDTAG); + } else { + opts.remove(ENDTAG); + } + } + + protected void _pre(boolean choice) { + if (choice) { + opts.add(PRE); + } else { + opts.remove(PRE); + } + } + } + + public class Generic extends EImp implements PCData { + Generic(String name, T parent, EnumSet opts) { + super(name, parent, opts); + } + + public Generic _inline() { + super._inline(true); + return this; + } + + public Generic _noEndTag() { + super._endTag(false); + return this; + } + + public Generic _pre() { + super._pre(true); + return this; + } + + public Generic _attr(String name, String value) { + addAttr(name, value); + return this; + } + + public Generic> _elem(String name, EnumSet opts) { + closeAttrs(); + return new Generic>(name, this, opts); + } + + public Generic> elem(String name) { + return _elem(name, of(ENDTAG)); + } + + @Override + public Generic __(Object... lines) { + _p(true, lines); + return this; + } + + @Override + public Generic _r(Object... lines) { + _p(false, lines); + return this; + } + } + + public HamletImpl(PrintWriter out, int nestLevel, boolean wasInline) { + this.out = out; + this.nestLevel = nestLevel; + this.wasInline = wasInline; + } + + public int nestLevel() { + return nestLevel; + } + + public boolean wasInline() { + return wasInline; + } + + public void setWasInline(boolean state) { + wasInline = state; + } + + public PrintWriter getWriter() { + return out; + } + + /** + * Create a root-level generic element. + * Mostly for testing purpose. + * @param type of the parent element + * @param name of the element + * @param opts {@link EOpt element options} + * @return the element + */ + public + Generic root(String name, EnumSet opts) { + return new Generic(name, null, opts); + } + + public Generic root(String name) { + return root(name, of(ENDTAG)); + } + + protected void printStartTag(String name, EnumSet opts) { + indent(opts); + sb.setLength(0); + out.print(sb.append('<').append(name).toString()); // for easier mock test + } + + protected void indent(EnumSet opts) { + if (opts.contains(INLINE) && wasInline) { + return; + } + if (wasInline) { + out.println(); + } + wasInline = opts.contains(INLINE) || opts.contains(PRE); + for (int i = 0; i < nestLevel; ++i) { + out.print(INDENT_CHARS); + } + ++indents; + } + + protected void printEndTag(String name, EnumSet opts) { + if (!opts.contains(ENDTAG)) { + return; + } + if (!opts.contains(PRE)) { + indent(opts); + } else { + wasInline = opts.contains(INLINE); + } + sb.setLength(0); + out.print(sb.append("').toString()); // ditto + if (!opts.contains(INLINE)) { + out.println(); + } + } + + protected void printAttr(String name, String value) { + sb.setLength(0); + sb.append(' ').append(name); + if (value != null) { + sb.append("=\"").append(escapeHtml(value)).append("\""); + } + out.print(sb.toString()); + } + + /** + * Sub-classes should override this to do something interesting. + * @param cls the sub-view class + */ + protected void subView(Class cls) { + indent(of(ENDTAG)); // not an inline view + sb.setLength(0); + out.print(sb.append('[').append(cls.getName()).append(']').toString()); + out.println(); + } + + /** + * Parse selector into id and classes + * @param selector in the form of (#id)?(.class)* + * @return an two element array [id, "space-separated classes"]. + * Either element could be null. + * @throws WebAppException when both are null or syntax error. + */ + public static String[] parseSelector(String selector) { + String[] result = new String[]{null, null}; + Iterable rs = SS.split(selector); + Iterator it = rs.iterator(); + if (it.hasNext()) { + String maybeId = it.next(); + if (maybeId.charAt(0) == '#') { + result[S_ID] = maybeId.substring(1); + if (it.hasNext()) { + result[S_CLASS] = SJ.join(Iterables.skip(rs, 1)); + } + } else { + result[S_CLASS] = SJ.join(rs); + } + return result; + } + throw new WebAppException("Error parsing selector: "+ selector); + } + + /** + * Set id and/or class attributes for an element. + * @param type of the element + * @param e the element + * @param selector Haml form of "(#id)?(.class)*" + * @return the element + */ + public static E setSelector(E e, String selector) { + String[] res = parseSelector(selector); + if (res[S_ID] != null) { + e.$id(res[S_ID]); + } + if (res[S_CLASS] != null) { + e.$class(res[S_CLASS]); + } + return e; + } + + public static E setLinkHref(E e, String href) { + if (href.endsWith(".css")) { + e.$rel("stylesheet"); // required in html5 + } + e.$href(href); + return e; + } + + public static E setScriptSrc(E e, String src) { + if (src.endsWith(".js")) { + e.$type("text/javascript"); // required in html4 + } + e.$src(src); + return e; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletSpec.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletSpec.java new file mode 100644 index 00000000000..8aeba93f098 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/HamletSpec.java @@ -0,0 +1,3101 @@ +/** +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.apache.hadoop.yarn.webapp.hamlet2; + +import java.lang.annotation.*; +import java.util.EnumSet; + +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.yarn.webapp.SubView; + +/** + * HTML5 compatible HTML4 builder interfaces. + * + *

Generated from HTML 4.01 strict DTD and HTML5 diffs. + *
cf. http://www.w3.org/TR/html4/ + *
cf. http://www.w3.org/TR/html5-diff/ + *

The omitted attributes and elements (from the 4.01 DTD) + * are for HTML5 compatibility. + * + *

Note, the common argument selector uses the same syntax as Haml/Sass: + *

  selector ::= (#id)?(.class)*
+ * cf. http://haml-lang.com/ + * + *

The naming convention used in this class is slightly different from + * normal classes. A CamelCase interface corresponds to an entity in the DTD. + * _CamelCase is for internal refactoring. An element builder interface is in + * UPPERCASE, corresponding to an element definition in the DTD. $lowercase is + * used as attribute builder methods to differentiate from element builder + * methods. + */ +@InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) +public class HamletSpec { + // The enum values are lowercase for better compression, + // while avoiding runtime conversion. + // cf. http://www.w3.org/Protocols/HTTP/Performance/Compression/HTMLCanon.html + // http://www.websiteoptimization.com/speed/tweak/lowercase/ + /** %Shape (case-insensitive) */ + public enum Shape { + /** + * rectangle + */ + rect, + /** + * circle + */ + circle, + /** + * polygon + */ + poly, + /** + * default + */ + Default + }; + + /** Values for the %18n dir attribute (case-insensitive) */ + public enum Dir { + /** + * left to right + */ + ltr, + /** + * right to left + */ + rtl + }; + + /** %MediaDesc (case-sensitive) */ + public enum Media { + /** + * computer screen + */ + screen, + /** + * teletype/terminal + */ + tty, + /** + * television + */ + tv, + /** + * projection + */ + projection, + /** + * mobile device + */ + handheld, + /** + * print media + */ + print, + /** + * braille + */ + braille, + /** + * aural + */ + aural, + /** + * suitable all media + */ + all + }; + + /** %LinkTypes (case-insensitive) */ + public enum LinkType { + /** + * + */ + alternate, + /** + * + */ + stylesheet, + /** + * + */ + start, + /** + * + */ + next, + /** + * + */ + prev, + /** + * + */ + contents, + /** + * + */ + index, + /** + * + */ + glossary, + /** + * + */ + copyright, + /** + * + */ + chapter, + /** + * + */ + section, + /** + * + */ + subsection, + /** + * + */ + appendix, + /** + * + */ + help, + /** + * + */ + bookmark + }; + + /** Values for form methods (case-insensitive) */ + public enum Method { + /** + * HTTP GET + */ + get, + /** + * HTTP POST + */ + post + }; + + /** %InputType (case-insensitive) */ + public enum InputType { + /** + * + */ + text, + /** + * + */ + password, + /** + * + */ + checkbox, + /** + * + */ + radio, + /** + * + */ + submit, + /** + * + */ + reset, + /** + * + */ + file, + /** + * + */ + hidden, + /** + * + */ + image, + /** + * + */ + button + }; + + /** Values for button types */ + public enum ButtonType { + /** + * + */ + button, + /** + * + */ + submit, + /** + * + */ + reset + }; + + /** %Scope (case-insensitive) */ + public enum Scope { + /** + * + */ + row, + /** + * + */ + col, + /** + * + */ + rowgroup, + /** + * + */ + colgroup + }; + + /** + * The element annotation for specifying element options other than + * attributes and allowed child elements + */ + @Target({ElementType.TYPE}) + @Retention(RetentionPolicy.RUNTIME) + public @interface Element { + /** + * Whether the start tag is required for the element. + * @return true if start tag is required + */ + boolean startTag() default true; + + /** + * Whether the end tag is required. + * @return true if end tag is required + */ + boolean endTag() default true; + } + + /** + * + */ + public interface __ {} + + /** + * + */ + public interface _Child extends __ { + /** + * Finish the current element. + * @return the parent element + */ + __ __(); + } + + /** + * + */ + public interface _Script { + /** + * Add a script element. + * @return a script element builder + */ + SCRIPT script(); + + /** + * Add a script element + * @param src uri of the script + * @return the current element builder + */ + _Script script(String src); + } + + /** + * + */ + public interface _Object { + /** + * Add an object element. + * @return an object element builder + */ + OBJECT object(); + + /** + * Add an object element. + * @param selector as #id.class etc. + * @return an object element builder + */ + OBJECT object(String selector); + } + + /** %head.misc */ + public interface HeadMisc extends _Script, _Object { + /** + * Add a style element. + * @return a style element builder + */ + STYLE style(); + + /** + * Add a css style element. + * @param lines content of the style sheet + * @return the current element builder + */ + HeadMisc style(Object... lines); + + /** + * Add a meta element. + * @return a meta element builder + */ + META meta(); + + /** + * Add a meta element. + * Shortcut of meta().$name(name).$content(content).__(); + * @param name of the meta element + * @param content of the meta element + * @return the current element builder + */ + HeadMisc meta(String name, String content); + + /** + * Add a meta element with http-equiv attribute. + * Shortcut of
+ * meta().$http_equiv(header).$content(content).__(); + * @param header for the http-equiv attribute + * @param content of the header + * @return the current element builder + */ + HeadMisc meta_http(String header, String content); + + /** + * Add a link element. + * @return a link element builder + */ + LINK link(); + + /** + * Add a link element. + * Implementation should try to figure out type by the suffix of href. + * So link("style.css"); is a shortcut of + * link().$rel("stylesheet").$type("text/css").$href("style.css").__(); + * + * @param href of the link + * @return the current element builder + */ + HeadMisc link(String href); + } + + /** %heading */ + public interface Heading { + /** + * Add an H1 element. + * @return a new H1 element builder + */ + H1 h1(); + + /** + * Add a complete H1 element. + * @param cdata the content of the element + * @return the current element builder + */ + Heading h1(String cdata); + + /** + * Add a complete H1 element + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + Heading h1(String selector, String cdata); + + /** + * Add an H2 element. + * @return a new H2 element builder + */ + H2 h2(); + + /** + * Add a complete H2 element. + * @param cdata the content of the element + * @return the current element builder + */ + Heading h2(String cdata); + + /** + * Add a complete H1 element + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + Heading h2(String selector, String cdata); + + /** + * Add an H3 element. + * @return a new H3 element builder + */ + H3 h3(); + + /** + * Add a complete H3 element. + * @param cdata the content of the element + * @return the current element builder + */ + Heading h3(String cdata); + + /** + * Add a complete H1 element + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + Heading h3(String selector, String cdata); + + /** + * Add an H4 element. + * @return a new H4 element builder + */ + H4 h4(); + + /** + * Add a complete H4 element. + * @param cdata the content of the element + * @return the current element builder + */ + Heading h4(String cdata); + + /** + * Add a complete H4 element + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + Heading h4(String selector, String cdata); + + /** + * Add an H5 element. + * @return a new H5 element builder + */ + H5 h5(); + + /** + * Add a complete H5 element. + * @param cdata the content of the element + * @return the current element builder + */ + Heading h5(String cdata); + + /** + * Add a complete H5 element + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + Heading h5(String selector, String cdata); + + /** + * Add an H6 element. + * @return a new H6 element builder + */ + H6 h6(); + + /** + * Add a complete H6 element. + * @param cdata the content of the element + * @return the current element builder + */ + Heading h6(String cdata); + + /** + * Add a complete H6 element. + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + Heading h6(String selector, String cdata); + } + + /** %list */ + public interface Listing { + + /** + * Add a UL (unordered list) element. + * @return a new UL element builder + */ + UL ul(); + + /** + * Add a UL (unordered list) element. + * @param selector the css selector in the form of (#id)?(.class)* + * @return a new UL element builder + */ + UL ul(String selector); + + /** + * Add a OL (ordered list) element. + * @return a new UL element builder + */ + OL ol(); + + /** + * Add a OL (ordered list) element. + * @param selector the css selector in the form of (#id)?(.class)* + * @return a new UL element builder + */ + OL ol(String selector); + } + + /** % preformatted */ + public interface Preformatted { + + /** + * Add a PRE (preformatted) element. + * @return a new PRE element builder + */ + PRE pre(); + + /** + * Add a PRE (preformatted) element. + * @param selector the css selector in the form of (#id)?(.class)* + * @return a new PRE element builder + */ + PRE pre(String selector); + } + + /** %coreattrs */ + public interface CoreAttrs { + /** document-wide unique id + * @param id the id + * @return the current element builder + */ + CoreAttrs $id(String id); + + /** space-separated list of classes + * @param cls the classes + * @return the current element builder + */ + CoreAttrs $class(String cls); + + /** associated style info + * @param style the style + * @return the current element builder + */ + CoreAttrs $style(String style); + + /** advisory title + * @param title the title + * @return the current element builder + */ + CoreAttrs $title(String title); + } + + /** %i18n */ + public interface I18nAttrs { + /** language code + * @param lang the code + * @return the current element builder + */ + I18nAttrs $lang(String lang); + + /** direction for weak/neutral text + * @param dir the {@link Dir} value + * @return the current element builder + */ + I18nAttrs $dir(Dir dir); + } + + /** %events */ + public interface EventsAttrs { + + /** a pointer button was clicked + * @param onclick the script + * @return the current element builder + */ + EventsAttrs $onclick(String onclick); + + /** a pointer button was double clicked + * @param ondblclick the script + * @return the current element builder + */ + EventsAttrs $ondblclick(String ondblclick); + + /** a pointer button was pressed down + * @param onmousedown the script + * @return the current element builder + */ + EventsAttrs $onmousedown(String onmousedown); + + /** a pointer button was released + * @param onmouseup the script + * @return the current element builder + */ + EventsAttrs $onmouseup(String onmouseup); + + /** a pointer was moved onto + * @param onmouseover the script + * @return the current element builder + */ + EventsAttrs $onmouseover(String onmouseover); + + /** a pointer was moved within + * @param onmousemove the script + * @return the current element builder + */ + EventsAttrs $onmousemove(String onmousemove); + + /** a pointer was moved away + * @param onmouseout the script + * @return the current element builder + */ + EventsAttrs $onmouseout(String onmouseout); + + /** a key was pressed and released + * @param onkeypress the script + * @return the current element builder + */ + EventsAttrs $onkeypress(String onkeypress); + + /** a key was pressed down + * @param onkeydown the script + * @return the current element builder + */ + EventsAttrs $onkeydown(String onkeydown); + + /** a key was released + * @param onkeyup the script + * @return the current element builder + */ + EventsAttrs $onkeyup(String onkeyup); + } + + /** %attrs */ + public interface Attrs extends CoreAttrs, I18nAttrs, EventsAttrs { + } + + /** Part of %pre.exclusion */ + public interface _FontSize extends _Child { + // BIG omitted cf. http://www.w3.org/TR/html5-diff/ + + /** + * Add a SMALL (small print) element + * @return a new SMALL element builder + */ + SMALL small(); + + /** + * Add a complete small (small print) element. + * Shortcut of: small().__(cdata).__(); + * @param cdata the content of the element + * @return the current element builder + */ + _FontSize small(String cdata); + + /** + * Add a complete small (small print) element. + * Shortcut of: small().$id(id).$class(class).__(cdata).__(); + * @param selector css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + _FontSize small(String selector, String cdata); + } + + /** %fontstyle -(%pre.exclusion) */ + public interface _FontStyle extends _Child { + // TT omitted + + /** + * Add an I (italic, alt voice/mood) element. + * @return the new I element builder + */ + I i(); + + /** + * Add a complete I (italic, alt voice/mood) element. + * @param cdata the content of the element + * @return the current element builder + */ + _FontStyle i(String cdata); + + /** + * Add a complete I (italic, alt voice/mood) element. + * @param selector the css selector in the form of (#id)?(.class)* + * @param cdata the content of the element + * @return the current element builder + */ + _FontStyle i(String selector, String cdata); + + /** + * Add a new B (bold/important) element. + * @return a new B element builder + */ + B b(); + + /** + * Add a complete B (bold/important) element. + * @param cdata the content + * @return the current element builder + */ + _FontStyle b(String cdata); + + /** + * Add a complete B (bold/important) element. + * @param selector the css select (#id)?(.class)* + * @param cdata the content + * @return the current element builder + */ + _FontStyle b(String selector, String cdata); + } + + /** %fontstyle */ + public interface FontStyle extends _FontStyle, _FontSize { + } + + /** %phrase */ + public interface Phrase extends _Child { + + /** + * Add an EM (emphasized) element. + * @return a new EM element builder + */ + EM em(); + + /** + * Add an EM (emphasized) element. + * @param cdata the content + * @return the current element builder + */ + Phrase em(String cdata); + + /** + * Add an EM (emphasized) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase em(String selector, String cdata); + + /** + * Add a STRONG (important) element. + * @return a new STRONG element builder + */ + STRONG strong(); + + /** + * Add a complete STRONG (important) element. + * @param cdata the content + * @return the current element builder + */ + Phrase strong(String cdata); + + /** + * Add a complete STRONG (important) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase strong(String selector, String cdata); + + /** + * Add a DFN element. + * @return a new DFN element builder + */ + DFN dfn(); + + /** + * Add a complete DFN element. + * @param cdata the content + * @return the current element builder + */ + Phrase dfn(String cdata); + + /** + * Add a complete DFN element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase dfn(String selector, String cdata); + + /** + * Add a CODE (code fragment) element. + * @return a new CODE element builder + */ + CODE code(); + + /** + * Add a complete CODE element. + * @param cdata the code + * @return the current element builder + */ + Phrase code(String cdata); + + /** + * Add a complete CODE element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the code + * @return the current element builder + */ + Phrase code(String selector, String cdata); + + /** + * Add a SAMP (sample) element. + * @return a new SAMP element builder + */ + SAMP samp(); + + /** + * Add a complete SAMP (sample) element. + * @param cdata the content + * @return the current element builder + */ + Phrase samp(String cdata); + + /** + * Add a complete SAMP (sample) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase samp(String selector, String cdata); + + /** + * Add a KBD (keyboard) element. + * @return a new KBD element builder + */ + KBD kbd(); + + /** + * Add a KBD (keyboard) element. + * @param cdata the content + * @return the current element builder + */ + Phrase kbd(String cdata); + + /** + * Add a KBD (keyboard) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase kbd(String selector, String cdata); + + /** + * Add a VAR (variable) element. + * @return a new VAR element builder + */ + VAR var(); + + /** + * Add a VAR (variable) element. + * @param cdata the content + * @return the current element builder + */ + Phrase var(String cdata); + + /** + * Add a VAR (variable) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase var(String selector, String cdata); + + /** + * Add a CITE element. + * @return a new CITE element builder + */ + CITE cite(); + + /** + * Add a CITE element. + * @param cdata the content + * @return the current element builder + */ + Phrase cite(String cdata); + + /** + * Add a CITE element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase cite(String selector, String cdata); + + /** + * Add an ABBR (abbreviation) element. + * @return a new ABBR element builder + */ + ABBR abbr(); + + /** + * Add a ABBR (abbreviation) element. + * @param cdata the content + * @return the current element builder + */ + Phrase abbr(String cdata); + + /** + * Add a ABBR (abbreviation) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + Phrase abbr(String selector, String cdata); + + // ACRONYM omitted, use ABBR + } + + /** Part of %pre.exclusion */ + public interface _ImgObject extends _Object, _Child { + + /** + * Add a IMG (image) element. + * @return a new IMG element builder + */ + IMG img(); + + /** + * Add a IMG (image) element. + * @param src the source URL of the image + * @return the current element builder + */ + _ImgObject img(String src); + } + + /** Part of %pre.exclusion */ + public interface _SubSup extends _Child { + + /** + * Add a SUB (subscript) element. + * @return a new SUB element builder + */ + SUB sub(); + + /** + * Add a complete SUB (subscript) element. + * @param cdata the content + * @return the current element builder + */ + _SubSup sub(String cdata); + + /** + * Add a complete SUB (subscript) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _SubSup sub(String selector, String cdata); + + /** + * Add a SUP (superscript) element. + * @return a new SUP element builder + */ + SUP sup(); + + /** + * Add a SUP (superscript) element. + * @param cdata the content + * @return the current element builder + */ + _SubSup sup(String cdata); + + /** + * Add a SUP (superscript) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _SubSup sup(String selector, String cdata); + } + + /** + * + */ + public interface _Anchor { + + /** + * Add a A (anchor) element. + * @return a new A element builder + */ + A a(); + + /** + * Add a A (anchor) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new A element builder + */ + A a(String selector); + + /** Shortcut for a().$href(href).__(anchorText).__(); + * @param href the URI + * @param anchorText for the URI + * @return the current element builder + */ + _Anchor a(String href, String anchorText); + + /** Shortcut for a(selector).$href(href).__(anchorText).__(); + * @param selector in the form of (#id)?(.class)* + * @param href the URI + * @param anchorText for the URI + * @return the current element builder + */ + _Anchor a(String selector, String href, String anchorText); + } + + /** + * INS and DEL are unusual for HTML + * "in that they may serve as either block-level or inline elements + * (but not both)". + *
cf. http://www.w3.org/TR/html4/struct/text.html#h-9.4 + *
cf. http://www.w3.org/TR/html5/edits.html#edits + */ + public interface _InsDel { + + /** + * Add an INS (insert) element. + * @return an INS element builder + */ + INS ins(); + + /** + * Add a complete INS element. + * @param cdata inserted data + * @return the current element builder + */ + _InsDel ins(String cdata); + + /** + * Add a DEL (delete) element. + * @return a DEL element builder + */ + DEL del(); + + /** + * Add a complete DEL element. + * @param cdata deleted data + * @return the current element builder + */ + _InsDel del(String cdata); + } + + /** %special -(A|%pre.exclusion) */ + public interface _Special extends _Script, _InsDel { + + /** + * Add a BR (line break) element. + * @return a new BR element builder + */ + BR br(); + + /** + * Add a BR (line break) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return the current element builder + */ + _Special br(String selector); + + /** + * Add a MAP element. + * @return a new MAP element builder + */ + MAP map(); + + /** + * Add a MAP element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new MAP element builder + */ + MAP map(String selector); + + /** + * Add a Q (inline quotation) element. + * @return a q (inline quotation) element builder + */ + Q q(); + + /** + * Add a complete Q element. + * @param cdata the content + * @return the current element builder + */ + _Special q(String cdata); + + /** + * Add a Q element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _Special q(String selector, String cdata); + + /** + * Add a SPAN element. + * @return a new SPAN element builder + */ + SPAN span(); + + /** + * Add a SPAN element. + * @param cdata the content + * @return the current element builder + */ + _Special span(String cdata); + + /** + * Add a SPAN element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _Special span(String selector, String cdata); + + /** + * Add a bdo (bidirectional override) element + * @return a bdo element builder + */ + BDO bdo(); + + /** + * Add a bdo (bidirectional override) element + * @param dir the direction of the text + * @param cdata the text + * @return the current element builder + */ + _Special bdo(Dir dir, String cdata); + } + + /** %special */ + public interface Special extends _Anchor, _ImgObject, _SubSup, _Special { + } + + /** + * + */ + public interface _Label extends _Child { + + /** + * Add a LABEL element. + * @return a new LABEL element builder + */ + LABEL label(); + + /** + * Add a LABEL element. + * Shortcut of label().$for(forId).__(cdata).__(); + * @param forId the for attribute + * @param cdata the content + * @return the current element builder + */ + _Label label(String forId, String cdata); + } + + /** + * + */ + public interface _FormCtrl { + + /** + * Add a INPUT element. + * @return a new INPUT element builder + */ + INPUT input(); + + /** + * Add a INPUT element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new INPUT element builder + */ + INPUT input(String selector); + + /** + * Add a SELECT element. + * @return a new SELECT element builder + */ + SELECT select(); + + /** + * Add a SELECT element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new SELECT element builder + */ + SELECT select(String selector); + + /** + * Add a TEXTAREA element. + * @return a new TEXTAREA element builder + */ + TEXTAREA textarea(); + + /** + * Add a TEXTAREA element. + * @param selector + * @return a new TEXTAREA element builder + */ + TEXTAREA textarea(String selector); + + /** + * Add a complete TEXTAREA element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _FormCtrl textarea(String selector, String cdata); + + /** + * Add a BUTTON element. + * @return a new BUTTON element builder + */ + BUTTON button(); + + /** + * Add a BUTTON element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new BUTTON element builder + */ + BUTTON button(String selector); + + /** + * Add a complete BUTTON element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _FormCtrl button(String selector, String cdata); + } + + /** %formctrl */ + public interface FormCtrl extends _Label, _FormCtrl { + } + + /** + * + */ + public interface _Content extends _Child { + /** + * Content of the element + * @param lines of content + * @return the current element builder + */ + _Content __(Object... lines); + } + + /** + * + */ + public interface _RawContent extends _Child { + /** + * Raw (no need to be HTML escaped) content + * @param lines of content + * @return the current element builder + */ + _RawContent _r(Object... lines); + } + + /** #PCDATA */ + public interface PCData extends _Content, _RawContent { + } + + /** %inline */ + public interface Inline extends PCData, FontStyle, Phrase, Special, FormCtrl { + } + + /** + * + */ + public interface I extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface B extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface SMALL extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface EM extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface STRONG extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface DFN extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface CODE extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface SAMP extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface KBD extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface VAR extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface CITE extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface ABBR extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface ACRONYM extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface SUB extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface SUP extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface SPAN extends Attrs, Inline, _Child { + } + + /** The dir attribute is required for the BDO element */ + public interface BDO extends CoreAttrs, I18nAttrs, Inline, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface BR extends CoreAttrs, _Child { + } + + /** + * + */ + public interface _Form { + + /** + * Add a FORM element. + * @return a new FORM element builder + */ + FORM form(); + + /** + * Add a FORM element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new FORM element builder + */ + FORM form(String selector); + } + + /** + * + */ + public interface _FieldSet { + + /** + * Add a FIELDSET element. + * @return a new FIELDSET element builder + */ + FIELDSET fieldset(); + + /** + * Add a FIELDSET element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new FIELDSET element builder + */ + FIELDSET fieldset(String selector); + } + + /** %block -(FORM|FIELDSET) */ + public interface _Block extends Heading, Listing, Preformatted { + + /** + * Add a P (paragraph) element. + * @return a new P element builder + */ + P p(); + + /** + * Add a P (paragraph) element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new P element builder + */ + P p(String selector); + + /** + * Add a DL (description list) element. + * @return a new DL element builder + */ + DL dl(); + + /** + * Add a DL element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new DL element builder + */ + DL dl(String selector); + + /** + * Add a DIV element. + * @return a new DIV element builder + */ + DIV div(); + + /** + * Add a DIV element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new DIV element builder + */ + DIV div(String selector); + + // NOSCRIPT omitted + // cf. http://www.w3.org/html/wg/tracker/issues/117 + + /** + * Add a BLOCKQUOTE element. + * @return a new BLOCKQUOTE element builder + */ + BLOCKQUOTE blockquote(); + + /** + * Alias of blockquote + * @return a new BLOCKQUOTE element builder + */ + BLOCKQUOTE bq(); + + /** + * Add a HR (horizontal rule) element. + * @return a new HR element builder + */ + HR hr(); + + /** + * Add a HR element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new HR element builder + */ + _Block hr(String selector); + + /** + * Add a TABLE element. + * @return a new TABLE element builder + */ + TABLE table(); + + /** + * Add a TABLE element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new TABLE element builder + */ + TABLE table(String selector); + + /** + * Add a ADDRESS element. + * @return a new ADDRESS element builder + */ + ADDRESS address(); + + /** + * Add a complete ADDRESS element. + * @param cdata the content + * @return the current element builder + */ + _Block address(String cdata); + + /** + * Embed a sub-view. + * @param cls the sub-view class + * @return the current element builder + */ + _Block __(Class cls); + } + + /** %block */ + public interface Block extends _Block, _Form, _FieldSet { + } + + /** %flow */ + public interface Flow extends Block, Inline { + } + + /** + * + */ + public interface _Body extends Block, _Script, _InsDel { + } + + /** + * + */ + public interface BODY extends Attrs, _Body, _Child { + + /** + * The document has been loaded. + * @param script to invoke + * @return the current element builder + */ + BODY $onload(String script); + + /** + * The document has been removed + * @param script to invoke + * @return the current element builder + */ + BODY $onunload(String script); + } + + /** + * + */ + public interface ADDRESS extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface DIV extends Attrs, Flow, _Child { + } + + /** + * + */ + public interface A extends Attrs, _Child, /* %inline -(A) */ + PCData, FontStyle, Phrase, _ImgObject, _Special, + _SubSup, FormCtrl { + // $charset omitted. + + /** advisory content type + * @param cdata the content-type + * @return the current element builder + */ + A $type(String cdata); + + // $name omitted. use id instead. + /** URI for linked resource + * @param uri the URI + * @return the current element builder + */ + A $href(String uri); + + /** language code + * @param cdata the code + * @return the current element builder + */ + A $hreflang(String cdata); + + /** forward link types + * @param linkTypes the types + * @return the current element builder + */ + A $rel(EnumSet linkTypes); + + /** + * forward link types + * @param linkTypes space-separated list of link types + * @return the current element builder. + */ + A $rel(String linkTypes); + + // $rev omitted. Instead of rev="made", use rel="author" + + /** accessibility key character + * @param cdata the key + * @return the current element builder + */ + A $accesskey(String cdata); + + // $shape and coords omitted. use area instead of a for image maps. + /** position in tabbing order + * @param index the index + * @return the current element builder + */ + A $tabindex(int index); + + /** the element got the focus + * @param script to invoke + * @return the current element builder + */ + A $onfocus(String script); + + /** the element lost the focus + * @param script to invoke + * @return the current element builder + */ + A $onblur(String script); + } + + /** + * + */ + public interface MAP extends Attrs, Block, _Child { + + /** + * Add a AREA element. + * @return a new AREA element builder + */ + AREA area(); + + /** + * Add a AREA element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new AREA element builder + */ + AREA area(String selector); + + /** for reference by usemap + * @param name of the map + * @return the current element builder + */ + MAP $name(String name); + } + + /** + * + */ + @Element(endTag=false) + public interface AREA extends Attrs, _Child { + + /** controls interpretation of coords + * @param shape of the area + * @return the current element builder + */ + AREA $shape(Shape shape); + + /** comma-separated list of lengths + * @param cdata coords of the area + * @return the current element builder + */ + AREA $coords(String cdata); + + /** URI for linked resource + * @param uri the URI + * @return the current element builder + */ + AREA $href(String uri); + + // $nohref omitted./ + /** short description + * @param desc the description + * @return the current element builder + */ + AREA $alt(String desc); + + /** position in tabbing order + * @param index of the order + * @return the current element builder + */ + AREA $tabindex(int index); + + /** accessibility key character + * @param cdata the key + * @return the current element builder + */ + AREA $accesskey(String cdata); + + /** the element got the focus + * @param script to invoke + * @return the current element builder + */ + AREA $onfocus(String script); + + /** the element lost the focus + * @param script to invoke + * @return the current element builder + */ + AREA $onblur(String script); + } + + /** + * + */ + @Element(endTag=false) + public interface LINK extends Attrs, _Child { + // $charset omitted + /** URI for linked resource + * @param uri the URI + * @return the current element builder + */ + LINK $href(String uri); + + /** language code + * @param cdata the code + * @return the current element builder + */ + LINK $hreflang(String cdata); + + /** advisory content type + * @param cdata the type + * @return the current element builder + */ + LINK $type(String cdata); + + /** forward link types + * @param linkTypes the types + * @return the current element builder + */ + LINK $rel(EnumSet linkTypes); + + /** + * forward link types. + * @param linkTypes space-separated link types + * @return the current element builder + */ + LINK $rel(String linkTypes); + + // $rev omitted. Instead of rev="made", use rel="author" + + /** for rendering on these media + * @param mediaTypes the media types + * @return the current element builder + */ + LINK $media(EnumSet mediaTypes); + + /** + * for rendering on these media. + * @param mediaTypes comma-separated list of media + * @return the current element builder + */ + LINK $media(String mediaTypes); + } + + /** + * + */ + @Element(endTag=false) + public interface IMG extends Attrs, _Child { + + /** URI of image to embed + * @param uri the URI + * @return the current element builder + */ + IMG $src(String uri); + + /** short description + * @param desc the description + * @return the current element builder + */ + IMG $alt(String desc); + + // $longdesc omitted. use instead + // $name omitted. use id instead. + + /** override height + * @param pixels the height + * @return the current element builder + */ + IMG $height(int pixels); + + /** + * override height + * @param cdata the height (can use %, * etc.) + * @return the current element builder + */ + IMG $height(String cdata); + + /** override width + * @param pixels the width + * @return the current element builder + */ + IMG $width(int pixels); + + /** + * override width + * @param cdata the width (can use %, * etc.) + * @return the current element builder + */ + IMG $width(String cdata); + + /** use client-side image map + * @param uri the URI + * @return the current element builder + */ + IMG $usemap(String uri); + + /** use server-side image map + * @return the current element builder + */ + IMG $ismap(); + } + + /** + * + */ + public interface _Param extends _Child { + + /** + * Add a PARAM (parameter) element. + * @return a new PARAM element builder + */ + PARAM param(); + + /** + * Add a PARAM element. + * Shortcut of param().$name(name).$value(value).__(); + * @param name of the value + * @param value the value + * @return the current element builder + */ + _Param param(String name, String value); + } + + /** + * + */ + public interface OBJECT extends Attrs, _Param, Flow, _Child { + // $declare omitted. repeat element completely + + // $archive, classid, codebase, codetype ommited. use data and type + + /** reference to object's data + * @param uri the URI + * @return the current element builder + */ + OBJECT $data(String uri); + + /** content type for data + * @param contentType the type + * @return the current element builder + */ + OBJECT $type(String contentType); + + // $standby omitted. fix the resource instead. + + /** override height + * @param pixels the height + * @return the current element builder + */ + OBJECT $height(int pixels); + + /** + * override height + * @param length the height (can use %, *) + * @return the current element builder + */ + OBJECT $height(String length); + + /** override width + * @param pixels the width + * @return the current element builder + */ + OBJECT $width(int pixels); + + /** + * override width + * @param length the height (can use %, *) + * @return the current element builder + */ + OBJECT $width(String length); + + /** use client-side image map + * @param uri the URI/name of the map + * @return the current element builder + */ + OBJECT $usemap(String uri); + + /** submit as part of form + * @param cdata the name of the object + * @return the current element builder + */ + OBJECT $name(String cdata); + + /** position in tabbing order + * @param index of the order + * @return the current element builder + */ + OBJECT $tabindex(int index); + } + + /** + * + */ + @Element(endTag=false) + public interface PARAM { + + /** document-wide unique id + * @param cdata the id + * @return the current element builder + */ + PARAM $id(String cdata); + + /** property name. Required. + * @param cdata the name + * @return the current element builder + */ + PARAM $name(String cdata); + + /** property value + * @param cdata the value + * @return the current element builder + */ + PARAM $value(String cdata); + + // $type and valuetype omitted + } + + /** + * + */ + @Element(endTag=false) + public interface HR extends Attrs, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface P extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface H1 extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface H2 extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface H3 extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface H4 extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface H5 extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface H6 extends Attrs, Inline, _Child { + } + + /** + * + */ + public interface PRE extends Attrs, _Child, /* (%inline;)* -(%pre.exclusion) */ + PCData, _FontStyle, Phrase, _Anchor, _Special, + FormCtrl { + } + + /** + * + */ + public interface Q extends Attrs, Inline, _Child { + + /** URI for source document or msg + * @param uri the URI + * @return the current element builder + */ + Q $cite(String uri); + } + + /** + * + */ + public interface BLOCKQUOTE extends Attrs, Block, _Script, _Child { + + /** URI for source document or msg + * @param uri the URI + * @return the current element builder + */ + BLOCKQUOTE $cite(String uri); + } + + /** + * @see _InsDel INS/DEL quirks. + */ + public interface INS extends Attrs, Flow, _Child { + /** info on reason for change + * @param uri + * @return the current element builder + */ + INS $cite(String uri); + + /** date and time of change + * @param datetime + * @return the current element builder + */ + INS $datetime(String datetime); + } + + /** + * @see _InsDel INS/DEL quirks. + */ + public interface DEL extends Attrs, Flow, _Child { + /** info on reason for change + * @param uri the info URI + * @return the current element builder + */ + DEL $cite(String uri); + + /** date and time of change + * @param datetime the time + * @return the current element builder + */ + DEL $datetime(String datetime); + } + + /** + * + */ + public interface _Dl extends _Child { + + /** + * Add a DT (term of the item) element. + * @return a new DT element builder + */ + DT dt(); + + /** + * Add a complete DT element. + * @param cdata the content + * @return the current element builder + */ + _Dl dt(String cdata); + + /** + * Add a DD (definition/description) element. + * @return a new DD element builder + */ + DD dd(); + + /** + * Add a complete DD element. + * @param cdata the content + * @return the current element builder + */ + _Dl dd(String cdata); + } + + /** + * + */ + public interface DL extends Attrs, _Dl, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface DT extends Attrs, Inline, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface DD extends Attrs, Flow, _Child { + } + + /** + * + */ + public interface _Li extends _Child { + + /** + * Add a LI (list item) element. + * @return a new LI element builder + */ + LI li(); + + /** + * Add a LI element. + * @param cdata the content + * @return the current element builder + */ + _Li li(String cdata); + } + + /** + * + */ + public interface OL extends Attrs, _Li, _Child { + } + + /** + * + */ + public interface UL extends Attrs, _Li, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface LI extends Attrs, Flow, _Child { + } + + /** + * + */ + public interface FORM extends Attrs, _Child, /* (%block;|SCRIPT)+ -(FORM) */ + _Script, _Block, _FieldSet { + /** server-side form handler + * @param uri + * @return the current element builder + */ + FORM $action(String uri); + + /** HTTP method used to submit the form + * @param method + * @return the current element builder + */ + FORM $method(Method method); + + /** + * contentype for "POST" method. + * The default is "application/x-www-form-urlencoded". + * Use "multipart/form-data" for input type=file + * @param enctype + * @return the current element builder + */ + FORM $enctype(String enctype); + + /** list of MIME types for file upload + * @param cdata + * @return the current element builder + */ + FORM $accept(String cdata); + + /** name of form for scripting + * @param cdata + * @return the current element builder + */ + FORM $name(String cdata); + + /** the form was submitted + * @param script + * @return the current element builder + */ + FORM $onsubmit(String script); + + /** the form was reset + * @param script + * @return the current element builder + */ + FORM $onreset(String script); + + /** (space and/or comma separated) list of supported charsets + * @param cdata + * @return the current element builder + */ + FORM $accept_charset(String cdata); + } + + /** + * + */ + public interface LABEL extends Attrs, _Child, /* (%inline;)* -(LABEL) */ + PCData, FontStyle, Phrase, Special, _FormCtrl { + /** matches field ID value + * @param cdata + * @return the current element builder + */ + LABEL $for(String cdata); + + /** accessibility key character + * @param cdata + * @return the current element builder + */ + LABEL $accesskey(String cdata); + + /** the element got the focus + * @param script + * @return the current element builder + */ + LABEL $onfocus(String script); + + /** the element lost the focus + * @param script + * @return the current element builder + */ + LABEL $onblur(String script); + } + + /** + * + */ + @Element(endTag=false) + public interface INPUT extends Attrs, _Child { + /** what kind of widget is needed. default is "text". + * @param inputType + * @return the current element builder + */ + INPUT $type(InputType inputType); + + /** submit as part of form + * @param cdata + * @return the current element builder + */ + INPUT $name(String cdata); + + /** Specify for radio buttons and checkboxes + * @param cdata + * @return the current element builder + */ + INPUT $value(String cdata); + + /** for radio buttons and check boxes + * @return the current element builder + */ + INPUT $checked(); + + /** unavailable in this context + * @return the current element builder + */ + INPUT $disabled(); + + /** for text and passwd + * @return the current element builder + */ + INPUT $readonly(); + + /** specific to each type of field + * @param cdata + * @return the current element builder + */ + INPUT $size(String cdata); + + /** max chars for text fields + * @param length + * @return the current element builder + */ + INPUT $maxlength(int length); + + /** for fields with images + * @param uri + * @return the current element builder + */ + INPUT $src(String uri); + + /** short description + * @param cdata + * @return the current element builder + */ + INPUT $alt(String cdata); + + // $usemap omitted. use img instead of input for image maps. + /** use server-side image map + * @return the current element builder + */ + INPUT $ismap(); + + /** position in tabbing order + * @param index + * @return the current element builder + */ + INPUT $tabindex(int index); + + /** accessibility key character + * @param cdata + * @return the current element builder + */ + INPUT $accesskey(String cdata); + + /** the element got the focus + * @param script + * @return the current element builder + */ + INPUT $onfocus(String script); + + /** the element lost the focus + * @param script + * @return the current element builder + */ + INPUT $onblur(String script); + + /** some text was selected + * @param script + * @return the current element builder + */ + INPUT $onselect(String script); + + /** the element value was changed + * @param script + * @return the current element builder + */ + INPUT $onchange(String script); + + /** list of MIME types for file upload (csv) + * @param contentTypes + * @return the current element builder + */ + INPUT $accept(String contentTypes); + } + + /** + * + */ + public interface _Option extends _Child { + /** + * Add a OPTION element. + * @return a new OPTION element builder + */ + OPTION option(); + + /** + * Add a complete OPTION element. + * @param cdata the content + * @return the current element builder + */ + _Option option(String cdata); + } + + /** + * + */ + public interface SELECT extends Attrs, _Option, _Child { + /** + * Add a OPTGROUP element. + * @return a new OPTGROUP element builder + */ + OPTGROUP optgroup(); + + /** field name + * @param cdata + * @return the current element builder + */ + SELECT $name(String cdata); + + /** rows visible + * @param rows + * @return the current element builder + */ + SELECT $size(int rows); + + /** default is single selection + * @return the current element builder + */ + SELECT $multiple(); + + /** unavailable in this context + * @return the current element builder + */ + SELECT $disabled(); + + /** position in tabbing order + * @param index + * @return the current element builder + */ + SELECT $tabindex(int index); + + /** the element got the focus + * @param script + * @return the current element builder + */ + SELECT $onfocus(String script); + + /** the element lost the focus + * @param script + * @return the current element builder + */ + SELECT $onblur(String script); + + /** the element value was changed + * @param script + * @return the current element builder + */ + SELECT $onchange(String script); + } + + /** + * + */ + public interface OPTGROUP extends Attrs, _Option, _Child { + /** unavailable in this context + * @return the current element builder + */ + OPTGROUP $disabled(); + + /** for use in hierarchical menus + * @param cdata + * @return the current element builder + */ + OPTGROUP $label(String cdata); + } + + /** + * + */ + @Element(endTag=false) + public interface OPTION extends Attrs, PCData, _Child { + /** currently selected option + * @return the current element builder + */ + OPTION $selected(); + + /** unavailable in this context + * @return the current element builder + */ + OPTION $disabled(); + + /** for use in hierarchical menus + * @param cdata + * @return the current element builder + */ + OPTION $label(String cdata); + + /** defaults to element content + * @param cdata + * @return the current element builder + */ + OPTION $value(String cdata); + } + + /** + * + */ + public interface TEXTAREA extends Attrs, PCData, _Child { + /** variable name for the text + * @param cdata + * @return the current element builder + */ + TEXTAREA $name(String cdata); + + /** visible rows + * @param rows + * @return the current element builder + */ + TEXTAREA $rows(int rows); + + /** visible columns + * @param cols + * @return the current element builder + */ + TEXTAREA $cols(int cols); + + /** unavailable in this context + * @return the current element builder + */ + TEXTAREA $disabled(); + + /** text is readonly + * @return the current element builder + */ + TEXTAREA $readonly(); + + /** position in tabbing order + * @param index + * @return the current element builder + */ + TEXTAREA $tabindex(int index); + + /** accessibility key character + * @param cdata + * @return the current element builder + */ + TEXTAREA $accesskey(String cdata); + + /** the element got the focus + * @param script + * @return the current element builder + */ + TEXTAREA $onfocus(String script); + + /** the element lost the focus + * @param script + * @return the current element builder + */ + TEXTAREA $onblur(String script); + + /** some text was selected + * @param script + * @return the current element builder + */ + TEXTAREA $onselect(String script); + + /** the element value was changed + * @param script + * @return the current element builder + */ + TEXTAREA $onchange(String script); + } + + /** + * + */ + public interface _Legend extends _Child { + /** + * Add a LEGEND element. + * @return a new LEGEND element builder + */ + LEGEND legend(); + + /** + * Add a LEGEND element. + * @param cdata + * @return the current element builder + */ + _Legend legend(String cdata); + } + + /** + * + */ + public interface FIELDSET extends Attrs, _Legend, PCData, Flow, _Child { + } + + /** + * + */ + public interface LEGEND extends Attrs, Inline, _Child { + /** accessibility key character + * @param cdata + * @return the current element builder + */ + LEGEND $accesskey(String cdata); + } + + /** + * + */ + public interface BUTTON extends /* (%flow;)* -(A|%formctrl|FORM|FIELDSET) */ + _Block, PCData, FontStyle, Phrase, _Special, _ImgObject, _SubSup, Attrs { + /** name of the value + * @param cdata + * @return the current element builder + */ + BUTTON $name(String cdata); + + /** sent to server when submitted + * @param cdata + * @return the current element builder + */ + BUTTON $value(String cdata); + + /** for use as form button + * @param type + * @return the current element builder + */ + BUTTON $type(ButtonType type); + + /** unavailable in this context + * @return the current element builder + */ + BUTTON $disabled(); + + /** position in tabbing order + * @param index + * @return the current element builder + */ + BUTTON $tabindex(int index); + + /** accessibility key character + * @param cdata + * @return the current element builder + */ + BUTTON $accesskey(String cdata); + + /** the element got the focus + * @param script + * @return the current element builder + */ + BUTTON $onfocus(String script); + + /** the element lost the focus + * @param script + * @return the current element builder + */ + BUTTON $onblur(String script); + } + + /** + * + */ + public interface _TableRow { + /** + * Add a TR (table row) element. + * @return a new TR element builder + */ + TR tr(); + + /** + * Add a TR element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new TR element builder + */ + TR tr(String selector); + } + + /** + * + */ + public interface _TableCol extends _Child { + /** + * Add a COL element. + * @return a new COL element builder + */ + COL col(); + + /** + * Add a COL element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return the current element builder + */ + _TableCol col(String selector); + } + + /** + * + */ + public interface _Table extends _TableRow, _TableCol { + /** + * Add a CAPTION element. + * @return a new CAPTION element builder + */ + CAPTION caption(); + + /** + * Add a CAPTION element. + * @param cdata + * @return the current element builder + */ + _Table caption(String cdata); + + /** + * Add a COLGROPU element. + * @return a new COLGROUP element builder + */ + COLGROUP colgroup(); + + /** + * Add a THEAD element. + * @return a new THEAD element builder + */ + THEAD thead(); + + /** + * Add a THEAD element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new THEAD element builder + */ + THEAD thead(String selector); + + /** + * Add a TFOOT element. + * @return a new TFOOT element builder + */ + TFOOT tfoot(); + + /** + * Add a TFOOT element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new TFOOT element builder + */ + TFOOT tfoot(String selector); + + /** + * Add a tbody (table body) element. + * Must be after thead/tfoot and no tr at the same level. + * @return a new tbody element builder + */ + TBODY tbody(); + + /** + * Add a TBODY element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new TBODY element builder + */ + TBODY tbody(String selector); + + // $summary, width, border, frame, rules, cellpadding, cellspacing omitted + // use css instead + } + /** + * TBODY should be used after THEAD/TFOOT, iff there're no TABLE.TR elements. + */ + public interface TABLE extends Attrs, _Table, _Child { + } + + /** + * + */ + public interface CAPTION extends Attrs, Inline, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface THEAD extends Attrs, _TableRow, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface TFOOT extends Attrs, _TableRow, _Child { + } + + /** + * + */ + public interface TBODY extends Attrs, _TableRow, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface COLGROUP extends Attrs, _TableCol, _Child { + /** default number of columns in group. default: 1 + * @param cols + * @return the current element builder + */ + COLGROUP $span(int cols); + + // $width omitted. use css instead. + } + + /** + * + */ + @Element(endTag=false) + public interface COL extends Attrs, _Child { + /** COL attributes affect N columns. default: 1 + * @param cols + * @return the current element builder + */ + COL $span(int cols); + // $width omitted. use css instead. + } + + /** + * + */ + public interface _Tr extends _Child { + /** + * Add a TH element. + * @return a new TH element builder + */ + TH th(); + + /** + * Add a complete TH element. + * @param cdata the content + * @return the current element builder + */ + _Tr th(String cdata); + + /** + * Add a TH element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _Tr th(String selector, String cdata); + + /** + * Add a TD element. + * @return a new TD element builder + */ + TD td(); + + /** + * Add a TD element. + * @param cdata the content + * @return the current element builder + */ + _Tr td(String cdata); + + /** + * Add a TD element. + * @param selector the css selector in the form of (#id)*(.class)* + * @param cdata the content + * @return the current element builder + */ + _Tr td(String selector, String cdata); + } + + /** + * + */ + @Element(endTag=false) + public interface TR extends Attrs, _Tr, _Child { + } + + /** + * + */ + public interface _Cell extends Attrs, Flow, _Child { + // $abbr omited. begin cell text with terse text instead. + // use $title for elaberation, when appropriate. + // $axis omitted. use scope. + /** space-separated list of id's for header cells + * @param cdata + * @return the current element builder + */ + _Cell $headers(String cdata); + + /** scope covered by header cells + * @param scope + * @return the current element builder + */ + _Cell $scope(Scope scope); + + /** number of rows spanned by cell. default: 1 + * @param rows + * @return the current element builder + */ + _Cell $rowspan(int rows); + + /** number of cols spanned by cell. default: 1 + * @param cols + * @return the current element builder + */ + _Cell $colspan(int cols); + } + + /** + * + */ + @Element(endTag=false) + public interface TH extends _Cell { + } + + /** + * + */ + @Element(endTag=false) + public interface TD extends _Cell { + } + + /** + * + */ + public interface _Head extends HeadMisc { + /** + * Add a TITLE element. + * @return a new TITLE element builder + */ + TITLE title(); + + /** + * Add a TITLE element. + * @param cdata the content + * @return the current element builder + */ + _Head title(String cdata); + + /** + * Add a BASE element. + * @return a new BASE element builder + */ + BASE base(); + + /** + * Add a complete BASE element. + * @param uri + * @return the current element builder + */ + _Head base(String uri); + } + + /** + * + */ + public interface HEAD extends I18nAttrs, _Head, _Child { + // $profile omitted + } + + /** + * + */ + public interface TITLE extends I18nAttrs, PCData, _Child { + } + + /** + * + */ + @Element(endTag=false) + public interface BASE extends _Child { + /** URI that acts as base URI + * @param uri + * @return the current element builder + */ + BASE $href(String uri); + } + + /** + * + */ + @Element(endTag=false) + public interface META extends I18nAttrs, _Child { + /** HTTP response header name + * @param header + * @return the current element builder + */ + META $http_equiv(String header); + + /** metainformation name + * @param name + * @return the current element builder + */ + META $name(String name); + + /** associated information + * @param cdata + * @return the current element builder + */ + META $content(String cdata); + + // $scheme omitted + } + + /** + * + */ + public interface STYLE extends I18nAttrs, _Content, _Child { + /** content type of style language + * @param cdata + * @return the current element builder + */ + STYLE $type(String cdata); + + /** designed for use with these media + * @param media + * @return the current element builder + */ + STYLE $media(EnumSet media); + + /** advisory title + * @param cdata + * @return the current element builder + */ + STYLE $title(String cdata); + } + + /** + * + */ + public interface SCRIPT extends _Content, _Child { + /** char encoding of linked resource + * @param cdata + * @return the current element builder + */ + SCRIPT $charset(String cdata); + + /** content type of script language + * @param cdata + * @return the current element builder + */ + SCRIPT $type(String cdata); + + /** URI for an external script + * @param cdata + * @return the current element builder + */ + SCRIPT $src(String cdata); + + /** UA may defer execution of script + * @param cdata + * @return the current element builder + */ + SCRIPT $defer(String cdata); + } + + /** + * + */ + public interface _Html extends _Head, _Body, __ { + /** + * Add a HEAD element. + * @return a new HEAD element builder + */ + HEAD head(); + + /** + * Add a BODY element. + * @return a new BODY element builder + */ + BODY body(); + + /** + * Add a BODY element. + * @param selector the css selector in the form of (#id)*(.class)* + * @return a new BODY element builder + */ + BODY body(String selector); + } + + // There is only one HEAD and BODY, in that order. + /** + * The root element + */ + public interface HTML extends I18nAttrs, _Html { + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/package-info.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/package-info.java new file mode 100644 index 00000000000..64a8447e024 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet2/package-info.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This package is the replacement for org.apache.hadoop.yarn.webapp.hamlet. + * The old package is using _ as a one-character identifier, + * which is banned from JDK9. + */ +@InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) +package org.apache.hadoop.yarn.webapp.hamlet2; +import org.apache.hadoop.classification.InterfaceAudience; + diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsBlock.java index 1da6e232ea3..0c7e09e4149 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsBlock.java @@ -44,10 +44,9 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat; import org.apache.hadoop.yarn.logaggregation.LogAggregationUtils; import org.apache.hadoop.yarn.server.security.ApplicationACLsManager; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.Times; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.PRE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.PRE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -84,12 +83,12 @@ public class AggregatedLogsBlock extends HtmlBlock { if (!conf.getBoolean(YarnConfiguration.LOG_AGGREGATION_ENABLED, YarnConfiguration.DEFAULT_LOG_AGGREGATION_ENABLED)) { html.h1() - ._("Aggregation is not enabled. Try the nodemanager at " + nodeId) - ._(); + .__("Aggregation is not enabled. Try the nodemanager at " + nodeId) + .__(); if(nmApplicationLogUrl != null) { html.h1() - ._("Or see application log at " + nmApplicationLogUrl) - ._(); + .__("Or see application log at " + nmApplicationLogUrl) + .__(); } return; } @@ -110,18 +109,18 @@ public class AggregatedLogsBlock extends HtmlBlock { .listStatus(remoteAppDir); } catch (FileNotFoundException fnf) { html.h1() - ._("Logs not available for " + logEntity + .__("Logs not available for " + logEntity + ". Aggregation may not be complete, " - + "Check back later or try the nodemanager at " + nodeId)._(); + + "Check back later or try the nodemanager at " + nodeId).__(); if(nmApplicationLogUrl != null) { html.h1() - ._("Or see application log at " + nmApplicationLogUrl) - ._(); + .__("Or see application log at " + nmApplicationLogUrl) + .__(); } return; } catch (Exception ex) { html.h1() - ._("Error getting logs at " + nodeId)._(); + .__("Error getting logs at " + nodeId).__(); return; } @@ -168,9 +167,9 @@ public class AggregatedLogsBlock extends HtmlBlock { if (callerUGI != null && !aclsManager.checkAccess(callerUGI, ApplicationAccessType.VIEW_APP, owner, applicationId)) { html.h1() - ._("User [" + remoteUser + .__("User [" + remoteUser + "] is not authorized to view the logs for " + logEntity - + " in log file [" + thisNodeFile.getPath().getName() + "]")._(); + + " in log file [" + thisNodeFile.getPath().getName() + "]").__(); LOG.error("User [" + remoteUser + "] is not authorized to view the logs for " + logEntity); continue; @@ -188,8 +187,9 @@ public class AggregatedLogsBlock extends HtmlBlock { LOG.error("Error getting logs for " + logEntity, ex); continue; } finally { - if (reader != null) + if (reader != null) { reader.close(); + } } } if (!foundLog) { @@ -201,7 +201,7 @@ public class AggregatedLogsBlock extends HtmlBlock { } } } catch (IOException e) { - html.h1()._("Error getting logs for " + logEntity)._(); + html.h1().__("Error getting logs for " + logEntity).__(); LOG.error("Error getting logs for " + logEntity, e); } } @@ -219,12 +219,12 @@ public class AggregatedLogsBlock extends HtmlBlock { || desiredLogType.equals(logType)) { long logLength = logReader.getCurrentLogLength(); if (foundLog) { - html.pre()._("\n\n")._(); + html.pre().__("\n\n").__(); } - html.p()._("Log Type: " + logType)._(); - html.p()._("Log Upload Time: " + Times.format(logUpLoadTime))._(); - html.p()._("Log Length: " + Long.toString(logLength))._(); + html.p().__("Log Type: " + logType).__(); + html.p().__("Log Upload Time: " + Times.format(logUpLoadTime)).__(); + html.p().__("Log Length: " + Long.toString(logLength)).__(); long start = logLimits.start < 0 ? logLength + logLimits.start : logLimits.start; @@ -238,12 +238,12 @@ public class AggregatedLogsBlock extends HtmlBlock { long toRead = end - start; if (toRead < logLength) { - html.p()._("Showing " + toRead + " bytes of " + logLength + html.p().__("Showing " + toRead + " bytes of " + logLength + " total. Click ") .a(url("logs", $(NM_NODENAME), $(CONTAINER_ID), $(ENTITY_STRING), $(APP_OWNER), logType, "?start=0"), "here"). - _(" for the full log.")._(); + __(" for the full log.").__(); } long totalSkipped = 0; @@ -267,12 +267,12 @@ public class AggregatedLogsBlock extends HtmlBlock { while (toRead > 0 && (len = logReader.read(cbuf, 0, currentToRead)) > 0) { - pre._(new String(cbuf, 0, len)); + pre.__(new String(cbuf, 0, len)); toRead = toRead - len; currentToRead = toRead > bufferSize ? bufferSize : (int) toRead; } - pre._(); + pre.__(); foundLog = true; } @@ -285,7 +285,7 @@ public class AggregatedLogsBlock extends HtmlBlock { private ContainerId verifyAndGetContainerId(Block html) { String containerIdStr = $(CONTAINER_ID); if (containerIdStr == null || containerIdStr.isEmpty()) { - html.h1()._("Cannot get container logs without a ContainerId")._(); + html.h1().__("Cannot get container logs without a ContainerId").__(); return null; } ContainerId containerId = null; @@ -293,8 +293,8 @@ public class AggregatedLogsBlock extends HtmlBlock { containerId = ContainerId.fromString(containerIdStr); } catch (IllegalArgumentException e) { html.h1() - ._("Cannot get container logs for invalid containerId: " - + containerIdStr)._(); + .__("Cannot get container logs for invalid containerId: " + + containerIdStr).__(); return null; } return containerId; @@ -303,15 +303,15 @@ public class AggregatedLogsBlock extends HtmlBlock { private NodeId verifyAndGetNodeId(Block html) { String nodeIdStr = $(NM_NODENAME); if (nodeIdStr == null || nodeIdStr.isEmpty()) { - html.h1()._("Cannot get container logs without a NodeId")._(); + html.h1().__("Cannot get container logs without a NodeId").__(); return null; } NodeId nodeId = null; try { nodeId = NodeId.fromString(nodeIdStr); } catch (IllegalArgumentException e) { - html.h1()._("Cannot get container logs. Invalid nodeId: " + nodeIdStr) - ._(); + html.h1().__("Cannot get container logs. Invalid nodeId: " + nodeIdStr) + .__(); return null; } return nodeId; @@ -320,7 +320,7 @@ public class AggregatedLogsBlock extends HtmlBlock { private String verifyAndGetAppOwner(Block html) { String appOwner = $(APP_OWNER); if (appOwner == null || appOwner.isEmpty()) { - html.h1()._("Cannot get container logs without an app owner")._(); + html.h1().__("Cannot get container logs without an app owner").__(); } return appOwner; } @@ -341,7 +341,7 @@ public class AggregatedLogsBlock extends HtmlBlock { start = Long.parseLong(startStr); } catch (NumberFormatException e) { isValid = false; - html.h1()._("Invalid log start value: " + startStr)._(); + html.h1().__("Invalid log start value: " + startStr).__(); } } @@ -351,7 +351,7 @@ public class AggregatedLogsBlock extends HtmlBlock { end = Long.parseLong(endStr); } catch (NumberFormatException e) { isValid = false; - html.h1()._("Invalid log end value: " + endStr)._(); + html.h1().__("Invalid log end value: " + endStr).__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsNavBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsNavBlock.java index fe83eaad2d6..a6e3a056903 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsNavBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsNavBlock.java @@ -28,7 +28,7 @@ public class AggregatedLogsNavBlock extends HtmlBlock { protected void render(Block html) { html .div("#nav") - .h3()._("Logs")._() // - ._(); + .h3().__("Logs").__() + .__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsPage.java index 773738fed7b..f097b0dec75 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/log/AggregatedLogsPage.java @@ -37,7 +37,7 @@ public class AggregatedLogsPage extends TwoColumnLayout { * @see org.apache.hadoop.yarn.server.nodemanager.webapp.NMView#preHead(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { String logEntity = $(ENTITY_STRING); if (logEntity == null || logEntity.isEmpty()) { logEntity = $(CONTAINER_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/ErrorPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/ErrorPage.java index 68e09ad1ad5..fabb5c12242 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/ErrorPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/ErrorPage.java @@ -30,24 +30,24 @@ import org.apache.hadoop.classification.InterfaceAudience; public class ErrorPage extends HtmlPage { @Override - protected void render(Page.HTML<_> html) { + protected void render(Page.HTML<__> html) { set(JQueryUI.ACCORDION_ID, "msg"); String title = "Sorry, got error "+ status(); html. title(title). - link(root_url("static","yarn.css")). - _(JQueryUI.class). // an embedded sub-view + link(root_url("static", "yarn.css")). + __(JQueryUI.class). // an embedded sub-view style("#msg { margin: 1em auto; width: 88%; }", "#msg h1 { padding: 0.2em 1.5em; font: bold 1.3em serif; }"). div("#msg"). h1(title). div(). - _("Please consult"). + __("Please consult"). a("http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", - "RFC 2616")._(" for meanings of the error code.")._(). + "RFC 2616").__(" for meanings of the error code.").__(). h1("Error Details"). pre(). - _(errorDetails())._()._()._(); + __(errorDetails()).__().__().__(); } protected String errorDetails() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/FooterBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/FooterBlock.java index ba85ac69d3f..e4d1f2f71c8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/FooterBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/FooterBlock.java @@ -25,6 +25,6 @@ public class FooterBlock extends HtmlBlock { @Override protected void render(Block html) { html. - div("#footer.ui-widget")._(); + div("#footer.ui-widget").__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HeaderBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HeaderBlock.java index 03f0fb1415f..3a0f35a2f34 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HeaderBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HeaderBlock.java @@ -31,9 +31,9 @@ public class HeaderBlock extends HtmlBlock { html. div("#header.ui-widget"). div("#user"). - _(loggedIn)._(). + __(loggedIn).__(). div("#logo"). - img("/static/hadoop-st.png")._(). - h1($(TITLE))._(); + img("/static/hadoop-st.png").__(). + h1($(TITLE)).__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlBlock.java index a785c0c73d0..acf040ee014 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlBlock.java @@ -25,7 +25,7 @@ import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.webapp.MimeType; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.WebAppException; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public abstract class HtmlBlock extends TextView implements SubView { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlPage.java index 1d176d41ad8..210cf0482a0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/HtmlPage.java @@ -25,17 +25,17 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.yarn.webapp.MimeType; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.WebAppException; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; /** * The parent class of all HTML pages. Override - * {@link #render(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML)} + * {@link #render(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.HTML)} * to actually render the page. */ @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public abstract class HtmlPage extends TextView { - public static class _ implements Hamlet._ { + public static class __ implements Hamlet.__ { } public class Page extends Hamlet { @@ -50,8 +50,8 @@ public abstract class HtmlPage extends TextView { setWasInline(context().wasInline()); } - public HTML html() { - return new HTML("html", null, EnumSet.of(EOpt.ENDTAG)); + public HTML html() { + return new HTML("html", null, EnumSet.of(EOpt.ENDTAG)); } } @@ -91,6 +91,6 @@ public abstract class HtmlPage extends TextView { * Render the the HTML page. * @param html the page to render data to. */ - protected abstract void render(Page.HTML<_> html); + protected abstract void render(Page.HTML<__> html); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/InfoBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/InfoBlock.java index 9fe67f1a52b..0ad8b3c0411 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/InfoBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/InfoBlock.java @@ -26,11 +26,11 @@ import static org.apache.hadoop.yarn.webapp.view.JQueryUI._ODD; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.yarn.webapp.ResponseInfo; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TD; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TD; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; import com.google.inject.Inject; @@ -47,7 +47,7 @@ public class InfoBlock extends HtmlBlock { div(_INFO_WRAP). table(_INFO). tr(). - th().$class(C_TH).$colspan(2)._(info.about())._()._(); + th().$class(C_TH).$colspan(2).__(info.about()).__().__(); int i = 0; for (ResponseInfo.Item item : info) { TR>> tr = table. @@ -62,23 +62,23 @@ public class InfoBlock extends HtmlBlock { DIV>>>> singleLineDiv; for ( String line :lines) { singleLineDiv = td.div(); - singleLineDiv._(line); - singleLineDiv._(); + singleLineDiv.__(line); + singleLineDiv.__(); } } else { - td._(value); + td.__(value); } - td._(); + td.__(); } else { - tr.td()._r(value)._(); + tr.td()._r(value).__(); } } else { tr. td(). - a(url(item.url), value)._(); + a(url(item.url), value).__(); } - tr._(); + tr.__(); } - table._()._(); + table.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/JQueryUI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/JQueryUI.java index 06372e38574..46c76d92d22 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/JQueryUI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/JQueryUI.java @@ -26,7 +26,7 @@ import static org.apache.hadoop.yarn.util.StringHelper.split; import java.util.List; import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.yarn.webapp.hamlet.HamletSpec.HTML; +import org.apache.hadoop.yarn.webapp.hamlet2.HamletSpec.HTML; import com.google.common.collect.Lists; @@ -82,19 +82,19 @@ public class JQueryUI extends HtmlBlock { initProgressBars(list); if (!list.isEmpty()) { - html.script().$type("text/javascript")._("$(function() {") - ._(list.toArray())._("});")._(); + html.script().$type("text/javascript").__("$(function() {") + .__(list.toArray()).__("});").__(); } } public static void jsnotice(HTML html) { html. div("#jsnotice.ui-state-error"). - _("This page will not function without javascript enabled." - + " Please enable javascript on your browser.")._(); + __("This page will not function without javascript enabled." + + " Please enable javascript on your browser.").__(); html. script().$type("text/javascript"). - _("$('#jsnotice').hide();")._(); + __("$('#jsnotice').hide();").__(); } protected void initAccordions(List list) { @@ -130,7 +130,7 @@ public class JQueryUI extends HtmlBlock { // for inserting stateSaveInit int pos = init.indexOf('{') + 1; init = new StringBuffer(init).insert(pos, stateSaveInit).toString(); - list.add(join(id,"DataTable = $('#", id, "').dataTable(", init, + list.add(join(id, "DataTable = $('#", id, "').dataTable(", init, ").fnSetFilteringDelay(188);")); String postInit = $(postInitID(DATATABLES, id)); if(!postInit.isEmpty()) { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/LipsumBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/LipsumBlock.java index 4781a200ac5..a4b6f63d385 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/LipsumBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/LipsumBlock.java @@ -27,7 +27,7 @@ public class LipsumBlock extends HtmlBlock { public void render(Block html) { html. p(). - _("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + __("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "Vivamus eu dui in ipsum tincidunt egestas ac sed nibh.", "Praesent quis nisl lorem, nec interdum urna.", "Duis sagittis dignissim purus sed sollicitudin.", @@ -45,6 +45,6 @@ public class LipsumBlock extends HtmlBlock { "Proin eu ante nisl, vel porttitor eros.", "Aliquam gravida luctus augue, at scelerisque enim consectetur vel.", "Donec interdum tempor nisl, quis laoreet enim venenatis eu.", - "Quisque elit elit, vulputate eget porta vel, laoreet ac lacus.")._(); + "Quisque elit elit, vulputate eget porta vel, laoreet ac lacus.").__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/NavBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/NavBlock.java index cdc13eb59cb..a684eee6a4a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/NavBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/NavBlock.java @@ -30,12 +30,12 @@ public class NavBlock extends HtmlBlock { ul(). li("Item 1"). li("Item 2"). - li("...")._(). + li("...").__(). h3("Tools"). ul(). - li().a("/conf", "Configuration")._(). - li().a("/stacks", "Thread dump")._(). - li().a("/logs", "Logs")._(). - li().a("/jmx?qry=Hadoop:*", "Metrics")._()._()._(); + li().a("/conf", "Configuration").__(). + li().a("/stacks", "Thread dump").__(). + li().a("/logs", "Logs").__(). + li().a("/jmx?qry=Hadoop:*", "Metrics").__().__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnCssLayout.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnCssLayout.java index 23aa51bb1ea..3e831996958 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnCssLayout.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnCssLayout.java @@ -31,11 +31,11 @@ import org.apache.hadoop.yarn.webapp.SubView; @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public class TwoColumnCssLayout extends HtmlPage { - @Override protected void render(Page.HTML<_> html) { + @Override protected void render(Page.HTML<__> html) { preHead(html); html. title($("title")). - link(root_url("static","yarn.css")). + link(root_url("static", "yarn.css")). style(".main { min-height: 100%; height: auto !important; height: 100%;", " margin: 0 auto -4em; border: 0; }", ".footer, .push { height: 4em; clear: both; border: 0 }", @@ -50,28 +50,28 @@ public class TwoColumnCssLayout extends HtmlPage { " right: 100%; overflow: hidden; }", ".leftnav .nav { float: left; width: 11em; position: relative;", " right: 12em; overflow: hidden; }"). - _(JQueryUI.class); + __(JQueryUI.class); postHead(html); JQueryUI.jsnotice(html); html. div(".main.ui-widget-content"). - _(header()). + __(header()). div(".cmask.leftnav"). div(".c1right"). div(".c1wrap"). div(".content"). - _(content())._()._(). + __(content()).__().__(). div(".nav"). - _(nav()). - div(".push")._()._()._()._()._(). + __(nav()). + div(".push").__().__().__().__().__(). div(".footer.ui-widget-content"). - _(footer())._()._(); + __(footer()).__().__(); } - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { } - protected void postHead(Page.HTML<_> html) { + protected void postHead(Page.HTML<__> html) { } protected Class header() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java index 4d7752dddd8..fe71395bf93 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java @@ -39,18 +39,18 @@ public class TwoColumnLayout extends HtmlPage { * (non-Javadoc) * @see org.apache.hadoop.yarn.webapp.view.HtmlPage#render(org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML) */ - @Override protected void render(Page.HTML<_> html) { + @Override protected void render(Page.HTML<__> html) { preHead(html); html. title($(TITLE)). - link(root_url("static","yarn.css")). + link(root_url("static", "yarn.css")). style("#layout { height: 100%; }", "#layout thead td { height: 3em; }", "#layout #navcell { width: 11em; padding: 0 1em; }", "#layout td.content { padding-top: 0 }", "#layout tbody { vertical-align: top; }", "#layout tfoot td { height: 4em; }"). - _(JQueryUI.class); + __(JQueryUI.class); postHead(html); JQueryUI.jsnotice(html); html. @@ -58,17 +58,17 @@ public class TwoColumnLayout extends HtmlPage { thead(). tr(). td().$colspan(2). - _(header())._()._()._(). + __(header()).__().__().__(). tfoot(). tr(). td().$colspan(2). - _(footer())._()._()._(). + __(footer()).__().__().__(). tbody(). tr(). td().$id("navcell"). - _(nav())._(). + __(nav()).__(). td().$class("content"). - _(content())._()._()._()._()._(); + __(content()).__().__().__().__().__(); } /** @@ -76,14 +76,14 @@ public class TwoColumnLayout extends HtmlPage { * involves setting page variables for Javascript and CSS rendering. * @param html the html to use to render. */ - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { } /** * Do what needs to be done after the header is rendered. * @param html the html to use to render. */ - protected void postHead(Page.HTML<_> html) { + protected void postHead(Page.HTML<__> html) { } /** @@ -120,7 +120,7 @@ public class TwoColumnLayout extends HtmlPage { * @param tableId the ID of the table to set styles on. * @param innerStyles any other styles to add to the table. */ - protected void setTableStyles(Page.HTML<_> html, String tableId, + protected void setTableStyles(Page.HTML<__> html, String tableId, String... innerStyles) { List styles = Lists.newArrayList(); styles.add(join('#', tableId, "_paginate span {font-weight:normal}")); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestSubViews.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestSubViews.java index 66d9ef22c38..075bed216dc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestSubViews.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestSubViews.java @@ -32,14 +32,14 @@ public class TestSubViews { static public class MainView extends HtmlPage { @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { html. body(). div(). - _(Sub1.class)._(). + __(Sub1.class).__(). div(). i("inline text"). - _(Sub2.class)._()._()._(); + __(Sub2.class).__().__().__(); } } @@ -48,7 +48,7 @@ public class TestSubViews { public void render(Block html) { html. div("#sub1"). - _("sub1 text")._(); + __("sub1 text").__(); } } @@ -57,7 +57,7 @@ public class TestSubViews { public void render(Block html) { html. pre(). - _("sub2 text")._(); + __("sub2 text").__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestWebApp.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestWebApp.java index db50dd3daa7..dea146da282 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestWebApp.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/TestWebApp.java @@ -100,7 +100,7 @@ public class TestWebApp { static class TablesView extends HtmlPage { @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { set(DATATABLES_ID, "t1 t2 t3 t4"); set(initID(DATATABLES, "t1"), tableInit().append("}").toString()); set(initID(DATATABLES, "t2"), join("{bJQueryUI:true, sDom:'t',", @@ -110,7 +110,7 @@ public class TestWebApp { html. title("Test DataTables"). link("/static/yarn.css"). - _(JQueryUI.class). + __(JQueryUI.class). style(".wrapper { padding: 1em }", ".wrapper h2 { margin: 0.5em 0 }", ".dataTables_wrapper { min-height: 1em }"). @@ -118,33 +118,33 @@ public class TestWebApp { h2("Default table init"). table("#t1"). thead(). - tr().th("Column1").th("Column2")._()._(). + tr().th("Column1").th("Column2").__().__(). tbody(). - tr().td("c1r1").td("c2r1")._(). - tr().td("c1r2").td("c2r2")._()._()._(). + tr().td("c1r1").td("c2r1").__(). + tr().td("c1r2").td("c2r2").__().__().__(). h2("Nested tables"). div(_INFO_WRAP). table("#t2"). thead(). - tr().th(_TH, "Column1").th(_TH, "Column2")._()._(). + tr().th(_TH, "Column1").th(_TH, "Column2").__().__(). tbody(). tr().td("r1"). // th wouldn't work as of dt 1.7.5 td().$class(C_TABLE). table("#t3"). thead(). - tr().th("SubColumn1").th("SubColumn2")._()._(). + tr().th("SubColumn1").th("SubColumn2").__().__(). tbody(). - tr().td("subc1r1").td("subc2r1")._(). - tr().td("subc1r2").td("subc2r2")._()._()._()._()._(). + tr().td("subc1r1").td("subc2r1").__(). + tr().td("subc1r2").td("subc2r2").__().__().__().__().__(). tr().td("r2"). // ditto td().$class(C_TABLE). table("#t4"). thead(). - tr().th("SubColumn1").th("SubColumn2")._()._(). + tr().th("SubColumn1").th("SubColumn2").__().__(). tbody(). - tr().td("subc1r1").td("subc2r1")._(). - tr().td("subc1r2").td("subc2r2")._(). - _()._()._()._()._()._()._()._()._(); + tr().td("subc1r1").td("subc2r1").__(). + tr().td("subc1r2").td("subc2r2").__(). + __().__().__().__().__().__().__().__().__(); } } @@ -358,7 +358,7 @@ public class TestWebApp { assertEquals("foo", getContent(baseUrl +"test/foo").trim()); app1 = WebApps.$for("test", this).at(port).start(); assertEquals(port, app1.getListenerAddress().getPort()); - app2 = WebApps.$for("test", this).at("0.0.0.0",port, true).start(); + app2 = WebApps.$for("test", this).at("0.0.0.0", port, true).start(); assertTrue(app2.getListenerAddress().getPort() > port); Configuration conf = new Configuration(); port = ServerSocketUtil.waitForPort(47000, 60); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlBlock.java index 89042c64c81..e510dd57ba8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlBlock.java @@ -24,8 +24,6 @@ import java.io.PrintWriter; import org.apache.hadoop.yarn.webapp.WebAppException; import org.apache.hadoop.yarn.webapp.test.WebAppTests; -import org.apache.hadoop.yarn.webapp.view.HtmlBlock; -import org.apache.hadoop.yarn.webapp.view.HtmlPage; import org.junit.Test; import static org.mockito.Mockito.*; @@ -35,7 +33,7 @@ public class TestHtmlBlock { @Override public void render(Block html) { html. - p("#testid")._("test note")._(); + p("#testid").__("test note").__(); } } @@ -43,16 +41,16 @@ public class TestHtmlBlock { @Override public void render(Block html) { html. - p()._("should throw"); + p().__("should throw"); } } public static class ShortPage extends HtmlPage { @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { html. title("short test"). - _(ShortBlock.class); + __(ShortBlock.class); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlPage.java index a5a8e1f1ce1..beed31fb478 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestHtmlPage.java @@ -25,7 +25,6 @@ import java.io.PrintWriter; import org.apache.hadoop.yarn.webapp.MimeType; import org.apache.hadoop.yarn.webapp.WebAppException; import org.apache.hadoop.yarn.webapp.test.WebAppTests; -import org.apache.hadoop.yarn.webapp.view.HtmlPage; import org.junit.Test; import static org.mockito.Mockito.*; @@ -34,19 +33,19 @@ public class TestHtmlPage { public static class TestView extends HtmlPage { @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { html. title("test"). - p("#testid")._("test note")._()._(); + p("#testid").__("test note").__().__(); } } public static class ShortView extends HtmlPage { @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { html. title("short test"). - p()._("should throw"); + p().__("should throw"); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java index da5efbb82fb..751aa2cabe4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java @@ -45,7 +45,7 @@ public class TestInfoBlock { static { resInfo = new ResponseInfo(); - resInfo._("User_Name", JAVASCRIPT); + resInfo.__("User_Name", JAVASCRIPT); } @Override @@ -68,8 +68,8 @@ public class TestInfoBlock { static { resInfo = new ResponseInfo(); - resInfo._("Multiple_line_value", "This is one line."); - resInfo._("Multiple_line_value", "This is first line.\nThis is second line."); + resInfo.__("Multiple_line_value", "This is one line."); + resInfo.__("Multiple_line_value", "This is first line.\nThis is second line."); } @Override diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestTwoColumnCssPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestTwoColumnCssPage.java index a718636cbf5..20df4093ad3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestTwoColumnCssPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestTwoColumnCssPage.java @@ -22,8 +22,6 @@ import org.apache.hadoop.yarn.MockApps; import org.apache.hadoop.yarn.webapp.Controller; import org.apache.hadoop.yarn.webapp.WebApps; import org.apache.hadoop.yarn.webapp.test.WebAppTests; -import org.apache.hadoop.yarn.webapp.view.HtmlPage; -import org.apache.hadoop.yarn.webapp.view.TwoColumnCssLayout; import org.junit.Test; public class TestTwoColumnCssPage { @@ -52,10 +50,10 @@ public class TestTwoColumnCssPage { public static class TestView extends HtmlPage { @Override - public void render(Page.HTML<_> html) { + public void render(Page.HTML<__> html) { html. title($("title")). - h1($("title"))._(); + h1($("title")).__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSErrorsAndWarningsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSErrorsAndWarningsPage.java index 3798ee5b3b2..1601f8c54ce 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSErrorsAndWarningsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSErrorsAndWarningsPage.java @@ -34,7 +34,7 @@ public class AHSErrorsAndWarningsPage extends AHSView { } @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String title = "Errors and Warnings in the Application History Server"; setTitle(title); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSLogsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSLogsPage.java index 8821bc02dcb..d8455033f09 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSLogsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSLogsPage.java @@ -32,7 +32,7 @@ public class AHSLogsPage extends AHSView { * preHead(org.apache.hadoop .yarn.webapp.hamlet.Hamlet.HTML) */ @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { String logEntity = $(ENTITY_STRING); if (logEntity == null || logEntity.isEmpty()) { logEntity = $(CONTAINER_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSView.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSView.java index 65b5ac168a6..d965eebb456 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSView.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AHSView.java @@ -37,7 +37,7 @@ public class AHSView extends TwoColumnLayout { static final int MAX_FAST_ROWS = 1000; // inline js array @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "apps"); set(initID(DATATABLES, "apps"), WebPageUtils.appsTableInit(false)); @@ -49,7 +49,7 @@ public class AHSView extends TwoColumnLayout { setTitle(sjoin(reqState, "Applications")); } - protected void commonPreHead(Page.HTML<_> html) { + protected void commonPreHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutBlock.java index b2419e9ac6b..996568bf778 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutBlock.java @@ -19,9 +19,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.webapp; import com.google.inject.Inject; -import org.apache.hadoop.util.VersionInfo; import org.apache.hadoop.yarn.api.records.timeline.TimelineAbout; -import org.apache.hadoop.yarn.util.YarnVersionInfo; import org.apache.hadoop.yarn.util.timeline.TimelineUtils; import org.apache.hadoop.yarn.webapp.View; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; @@ -38,10 +36,10 @@ public class AboutBlock extends HtmlBlock { TimelineAbout tsInfo = TimelineUtils.createTimelineAbout( "Timeline Server - Generic History Service UI"); info("Timeline Server Overview"). - _("Timeline Server Version:", tsInfo.getTimelineServiceBuildVersion() + + __("Timeline Server Version:", tsInfo.getTimelineServiceBuildVersion() + " on " + tsInfo.getTimelineServiceVersionBuiltOn()). - _("Hadoop Version:", tsInfo.getHadoopBuildVersion() + + __("Hadoop Version:", tsInfo.getHadoopBuildVersion() + " on " + tsInfo.getHadoopVersionBuiltOn()); - html._(InfoBlock.class); + html.__(InfoBlock.class); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutPage.java index b50073af646..1df5832132c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutPage.java @@ -20,12 +20,9 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.webapp; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.YarnWebParams; - -import static org.apache.hadoop.yarn.util.StringHelper.join; public class AboutPage extends AHSView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(TITLE, "Timeline Server - Generic History Service"); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppAttemptPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppAttemptPage.java index a08297db9a6..ec00db675d9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppAttemptPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppAttemptPage.java @@ -29,7 +29,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class AppAttemptPage extends AHSView { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String appAttemptId = $(YarnWebParams.APPLICATION_ATTEMPT_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppPage.java index c0e1394ae62..32fcc958bea 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AppPage.java @@ -30,7 +30,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class AppPage extends AHSView { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String appId = $(YarnWebParams.APPLICATION_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/ContainerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/ContainerPage.java index 1be8a26136d..8327ee68a15 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/ContainerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/ContainerPage.java @@ -26,7 +26,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class ContainerPage extends AHSView { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String containerId = $(YarnWebParams.CONTAINER_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/NavBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/NavBlock.java index 25ee4f0a221..3ee4dd103c5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/NavBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/NavBlock.java @@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.impl.Log4JLogger; import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.util.Log4jWarningErrorMetricsAppender; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; public class NavBlock extends HtmlBlock { @@ -44,34 +44,34 @@ public class NavBlock extends HtmlBlock { h3("Application History"). ul(). li().a(url("about"), "About"). - _(). + __(). li().a(url("apps"), "Applications"). ul(). li().a(url("apps", YarnApplicationState.FINISHED.toString()), YarnApplicationState.FINISHED.toString()). - _(). + __(). li().a(url("apps", YarnApplicationState.FAILED.toString()), YarnApplicationState.FAILED.toString()). - _(). + __(). li().a(url("apps", YarnApplicationState.KILLED.toString()), YarnApplicationState.KILLED.toString()). - _(). - _(). - _(). - _(); + __(). + __(). + __(). + __(); Hamlet.UL> tools = nav.h3("Tools").ul(); - tools.li().a("/conf", "Configuration")._() - .li().a("/logs", "Local logs")._() - .li().a("/stacks", "Server stacks")._() - .li().a("/jmx?qry=Hadoop:*", "Server metrics")._(); + tools.li().a("/conf", "Configuration").__() + .li().a("/logs", "Local logs").__() + .li().a("/stacks", "Server stacks").__() + .li().a("/jmx?qry=Hadoop:*", "Server metrics").__(); if (addErrorsAndWarningsLink) { - tools.li().a(url("errors-and-warnings"), "Errors/Warnings")._(); + tools.li().a(url("errors-and-warnings"), "Errors/Warnings").__(); } - tools._()._(); + tools.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java index 798c3726739..87c554d4bec 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppAttemptBlock.java @@ -36,10 +36,9 @@ import org.apache.hadoop.yarn.api.records.ContainerReport; import org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState; import org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo; import org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo; -import org.apache.hadoop.yarn.util.ConverterUtils; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; import com.google.inject.Inject; @@ -94,7 +93,7 @@ public class AppAttemptBlock extends HtmlBlock { String message = "Failed to read the application attempt " + appAttemptId + "."; LOG.error(message, e); - html.p()._(message)._(); + html.p().__(message).__(); return; } @@ -140,14 +139,14 @@ public class AppAttemptBlock extends HtmlBlock { if (exceptionWhenGetContainerReports) { html .p() - ._( + .__( "Sorry, Failed to get containers for application attempt" + attemptid - + ".")._(); + + ".").__(); return; } createAttemptHeadRoomTable(html); - html._(InfoBlock.class); + html.__(InfoBlock.class); createTablesForAttemptMetrics(html); @@ -155,7 +154,7 @@ public class AppAttemptBlock extends HtmlBlock { TBODY> tbody = html.table("#containers").thead().tr().th(".id", "Container ID") .th(".node", "Node").th(".exitstatus", "Container Exit Status") - .th(".logs", "Logs")._()._().tbody(); + .th(".logs", "Logs").__().__().tbody(); StringBuilder containersTableData = new StringBuilder("[\n"); for (ContainerReport containerReport : containers) { @@ -186,9 +185,9 @@ public class AppAttemptBlock extends HtmlBlock { } containersTableData.append("]"); html.script().$type("text/javascript") - ._("var containersTableData=" + containersTableData)._(); + .__("var containersTableData=" + containersTableData).__(); - tbody._()._(); + tbody.__().__(); } protected void generateOverview(ApplicationAttemptReport appAttemptReport, @@ -196,18 +195,18 @@ public class AppAttemptBlock extends HtmlBlock { String node) { String amContainerId = appAttempt.getAmContainerId(); info("Application Attempt Overview") - ._( + .__( "Application Attempt State:", appAttempt.getAppAttemptState() == null ? UNAVAILABLE : appAttempt .getAppAttemptState()) - ._("AM Container:", + .__("AM Container:", amContainerId == null || containers == null || !hasAMContainer(appAttemptReport.getAMContainerId(), containers) ? null : root_url("container", amContainerId), amContainerId == null ? "N/A" : amContainerId) - ._("Node:", node) - ._( + .__("Node:", node) + .__( "Tracking URL:", appAttempt.getTrackingUrl() == null || appAttempt.getTrackingUrl().equals(UNAVAILABLE) ? null @@ -219,7 +218,7 @@ public class AppAttemptBlock extends HtmlBlock { || appAttempt.getAppAttemptState() == YarnApplicationAttemptState.FAILED || appAttempt.getAppAttemptState() == YarnApplicationAttemptState.KILLED ? "History" : "ApplicationMaster") - ._( + .__( "Diagnostics Info:", appAttempt.getDiagnosticsInfo() == null ? "" : appAttempt .getDiagnosticsInfo()); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java index 11bd9b47185..d4090aaa7a3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java @@ -55,9 +55,9 @@ import org.apache.hadoop.yarn.util.Apps; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.webapp.ResponseInfo; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -116,7 +116,7 @@ public class AppBlock extends HtmlBlock { } catch (Exception e) { String message = "Failed to read the application " + appID + "."; LOG.error(message, e); - html.p()._(message)._(); + html.p().__(message).__(); return; } @@ -136,8 +136,8 @@ public class AppBlock extends HtmlBlock { // Application Kill html.div() .button() - .$onclick("confirmAction()").b("Kill Application")._() - ._(); + .$onclick("confirmAction()").b("Kill Application").__() + .__(); StringBuilder script = new StringBuilder(); script.append("function confirmAction() {") @@ -160,7 +160,7 @@ public class AppBlock extends HtmlBlock { .append(" }") .append("}"); - html.script().$type("text/javascript")._(script.toString())._(); + html.script().$type("text/javascript").__(script.toString()).__(); } String schedulerPath = WebAppUtils.getResolvedRMWebAppURLWithScheme(conf) + @@ -185,13 +185,13 @@ public class AppBlock extends HtmlBlock { String message = "Failed to read the attempts of the application " + appID + "."; LOG.error(message, e); - html.p()._(message)._(); + html.p().__(message).__(); return; } createApplicationMetricsTable(html); - html._(InfoBlock.class); + html.__(InfoBlock.class); generateApplicationTable(html, callerUGI, attempts); @@ -207,25 +207,25 @@ public class AppBlock extends HtmlBlock { private void generateOverviewTable(AppInfo app, String schedulerPath, String webUiType, ApplicationReport appReport) { ResponseInfo overviewTable = info("Application Overview") - ._("User:", schedulerPath, app.getUser()) - ._("Name:", app.getName()) - ._("Application Type:", app.getType()) - ._("Application Tags:", + .__("User:", schedulerPath, app.getUser()) + .__("Name:", app.getName()) + .__("Application Type:", app.getType()) + .__("Application Tags:", app.getApplicationTags() == null ? "" : app.getApplicationTags()) - ._("Application Priority:", clarifyAppPriority(app.getPriority())) - ._( + .__("Application Priority:", clarifyAppPriority(app.getPriority())) + .__( "YarnApplicationState:", app.getAppState() == null ? UNAVAILABLE : clarifyAppState(app .getAppState())) - ._("Queue:", schedulerPath, app.getQueue()) - ._("FinalStatus Reported by AM:", + .__("Queue:", schedulerPath, app.getQueue()) + .__("FinalStatus Reported by AM:", clairfyAppFinalStatus(app.getFinalAppStatus())) - ._("Started:", Times.format(app.getStartedTime())) - ._( + .__("Started:", Times.format(app.getStartedTime())) + .__( "Elapsed:", StringUtils.formatTime(Times.elapsed(app.getStartedTime(), app.getFinishedTime()))) - ._( + .__( "Tracking URL:", app.getTrackingUrl() == null || app.getTrackingUrl().equals(UNAVAILABLE) ? null : root_url(app @@ -240,31 +240,31 @@ public class AppBlock extends HtmlBlock { && webUiType.equals(YarnWebParams.RM_WEB_UI)) { LogAggregationStatus status = getLogAggregationStatus(); if (status == null) { - overviewTable._("Log Aggregation Status:", "N/A"); + overviewTable.__("Log Aggregation Status:", "N/A"); } else if (status == LogAggregationStatus.DISABLED || status == LogAggregationStatus.NOT_START || status == LogAggregationStatus.SUCCEEDED) { - overviewTable._("Log Aggregation Status:", status.name()); + overviewTable.__("Log Aggregation Status:", status.name()); } else { - overviewTable._("Log Aggregation Status:", + overviewTable.__("Log Aggregation Status:", root_url("logaggregationstatus", app.getAppId()), status.name()); } long timeout = appReport.getApplicationTimeouts() .get(ApplicationTimeoutType.LIFETIME).getRemainingTime(); if (timeout < 0) { - overviewTable._("Application Timeout (Remaining Time):", "Unlimited"); + overviewTable.__("Application Timeout (Remaining Time):", "Unlimited"); } else { - overviewTable._("Application Timeout (Remaining Time):", + overviewTable.__("Application Timeout (Remaining Time):", String.format("%d seconds", timeout)); } } - overviewTable._("Diagnostics:", + overviewTable.__("Diagnostics:", app.getDiagnosticsInfo() == null ? "" : app.getDiagnosticsInfo()); - overviewTable._("Unmanaged Application:", app.isUnmanagedApp()); - overviewTable._("Application Node Label expression:", + overviewTable.__("Unmanaged Application:", app.isUnmanagedApp()); + overviewTable.__("Application Node Label expression:", app.getAppNodeLabelExpression() == null ? "" : app.getAppNodeLabelExpression()); - overviewTable._("AM container Node Label expression:", + overviewTable.__("AM container Node Label expression:", app.getAmNodeLabelExpression() == null ? "" : app.getAmNodeLabelExpression()); } @@ -276,7 +276,7 @@ public class AppBlock extends HtmlBlock { TBODY> tbody = html.table("#attempts").thead().tr().th(".id", "Attempt ID") .th(".started", "Started").th(".node", "Node").th(".logs", "Logs") - ._()._().tbody(); + .__().__().tbody(); StringBuilder attemptsTableData = new StringBuilder("[\n"); for (final ApplicationAttemptReport appAttemptReport : attempts) { @@ -312,7 +312,7 @@ public class AppBlock extends HtmlBlock { "Failed to read the AM container of the application attempt " + appAttemptReport.getApplicationAttemptId() + "."; LOG.error(message, e); - html.p()._(message)._(); + html.p().__(message).__(); return; } long startTime = 0L; @@ -346,9 +346,9 @@ public class AppBlock extends HtmlBlock { } attemptsTableData.append("]"); html.script().$type("text/javascript") - ._("var attemptsTableData=" + attemptsTableData)._(); + .__("var attemptsTableData=" + attemptsTableData).__(); - tbody._()._(); + tbody.__().__(); } private String clarifyAppState(YarnApplicationState state) { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppsBlock.java index 7f42343658d..d836e641177 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppsBlock.java @@ -44,9 +44,9 @@ import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.server.webapp.dao.AppInfo; import org.apache.hadoop.yarn.webapp.BadRequestException; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -134,7 +134,7 @@ public class AppsBlock extends HtmlBlock { catch( Exception e) { String message = "Failed to read the applications."; LOG.error(message, e); - html.p()._(message)._(); + html.p().__(message).__(); return; } renderData(html); @@ -147,7 +147,7 @@ public class AppsBlock extends HtmlBlock { .th(".queue", "Queue").th(".priority", "Application Priority") .th(".starttime", "StartTime").th(".finishtime", "FinishTime") .th(".state", "State").th(".finalstatus", "FinalStatus") - .th(".progress", "Progress").th(".ui", "Tracking UI")._()._().tbody(); + .th(".progress", "Progress").th(".ui", "Tracking UI").__().__().tbody(); StringBuilder appsTableData = new StringBuilder("[\n"); for (ApplicationReport appReport : appReports) { @@ -218,8 +218,8 @@ public class AppsBlock extends HtmlBlock { } appsTableData.append("]"); html.script().$type("text/javascript") - ._("var appsTableData=" + appsTableData)._(); + .__("var appsTableData=" + appsTableData).__(); - tbody._()._(); + tbody.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ContainerBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ContainerBlock.java index 893e82384f2..fa35a3d5273 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ContainerBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ContainerBlock.java @@ -31,7 +31,6 @@ import org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportRequest; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.ContainerReport; import org.apache.hadoop.yarn.server.webapp.dao.ContainerInfo; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -86,7 +85,7 @@ public class ContainerBlock extends HtmlBlock { } catch (Exception e) { String message = "Failed to read the container " + containerid + "."; LOG.error(message, e); - html.p()._(message)._(); + html.p().__(message).__(); return; } @@ -99,32 +98,32 @@ public class ContainerBlock extends HtmlBlock { setTitle(join("Container ", containerid)); info("Container Overview") - ._( + .__( "Container State:", container.getContainerState() == null ? UNAVAILABLE : container .getContainerState()) - ._("Exit Status:", container.getContainerExitStatus()) - ._( + .__("Exit Status:", container.getContainerExitStatus()) + .__( "Node:", container.getNodeHttpAddress() == null ? "#" : container .getNodeHttpAddress(), container.getNodeHttpAddress() == null ? "N/A" : container .getNodeHttpAddress()) - ._("Priority:", container.getPriority()) - ._("Started:", Times.format(container.getStartedTime())) - ._( + .__("Priority:", container.getPriority()) + .__("Started:", Times.format(container.getStartedTime())) + .__( "Elapsed:", StringUtils.formatTime(Times.elapsed(container.getStartedTime(), container.getFinishedTime()))) - ._( + .__( "Resource:", container.getAllocatedMB() + " Memory, " + container.getAllocatedVCores() + " VCores") - ._("Logs:", container.getLogUrl() == null ? "#" : container.getLogUrl(), + .__("Logs:", container.getLogUrl() == null ? "#" : container.getLogUrl(), container.getLogUrl() == null ? "N/A" : "Logs") - ._("Diagnostics:", container.getDiagnosticsInfo() == null ? + .__("Diagnostics:", container.getDiagnosticsInfo() == null ? "" : container.getDiagnosticsInfo()); - html._(InfoBlock.class); + html.__(InfoBlock.class); } } \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ErrorsAndWarningsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ErrorsAndWarningsBlock.java index 56db66c3605..75f6fcd254a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ErrorsAndWarningsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/ErrorsAndWarningsBlock.java @@ -28,7 +28,7 @@ import org.apache.hadoop.util.Time; import org.apache.hadoop.yarn.security.AdminACLsManager; import org.apache.hadoop.yarn.util.Log4jWarningErrorMetricsAppender; import org.apache.hadoop.yarn.util.Times; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import java.util.ArrayList; @@ -74,19 +74,19 @@ public class ErrorsAndWarningsBlock extends HtmlBlock { } if (!isAdmin) { - html.div().p()._("This page is for admins only.")._()._(); + html.div().p().__("This page is for admins only.").__().__(); return; } if (log instanceof Log4JLogger) { - html._(ErrorMetrics.class); - html._(WarningMetrics.class); + html.__(ErrorMetrics.class); + html.__(WarningMetrics.class); html.div().button().$onclick("reloadPage()").b("View data for the last ") - ._().select().$id("cutoff").option().$value("60")._("1 min")._() - .option().$value("300")._("5 min")._().option().$value("900") - ._("15 min")._().option().$value("3600")._("1 hour")._().option() - .$value("21600")._("6 hours")._().option().$value("43200") - ._("12 hours")._().option().$value("86400")._("24 hours")._()._()._(); + .__().select().$id("cutoff").option().$value("60").__("1 min").__() + .option().$value("300").__("5 min").__().option().$value("900") + .__("15 min").__().option().$value("3600").__("1 hour").__().option() + .$value("21600").__("6 hours").__().option().$value("43200") + .__("12 hours").__().option().$value("86400").__("24 hours").__().__().__(); String script = "function reloadPage() {" + " var timePeriod = $(\"#cutoff\").val();" @@ -97,7 +97,7 @@ public class ErrorsAndWarningsBlock extends HtmlBlock { + " $(element).parent().siblings('.toggle-content').fadeToggle();" + "}"; - html.script().$type("text/javascript")._(script)._(); + html.script().$type("text/javascript").__(script).__(); html.style(".toggle-content { display: none; }"); @@ -110,7 +110,7 @@ public class ErrorsAndWarningsBlock extends HtmlBlock { Hamlet.TBODY> errorsTable = html.table("#messages").thead().tr().th(".message", "Message") .th(".type", "Type").th(".count", "Count") - .th(".lasttime", "Latest Message Time")._()._().tbody(); + .th(".lasttime", "Latest Message Time").__().__().tbody(); // cutoff has to be in seconds cutoff.add((Time.now() - cutoffPeriodSeconds * 1000) / 1000); @@ -145,18 +145,18 @@ public class ErrorsAndWarningsBlock extends HtmlBlock { } cell.pre().a().$href("#").$onclick("toggleContent(this);") - .$style("white-space: pre")._(displayMessage)._()._().div() - .$class("toggle-content").pre()._(message)._()._()._(); + .$style("white-space: pre").__(displayMessage).__().__().div() + .$class("toggle-content").pre().__(message).__().__().__(); } else { - cell.pre()._(message)._()._(); + cell.pre().__(message).__().__(); } Log4jWarningErrorMetricsAppender.Element ele = entry.getValue(); row.td(type).td(String.valueOf(ele.count)) - .td(Times.format(ele.timestampSeconds * 1000))._(); + .td(Times.format(ele.timestampSeconds * 1000)).__(); } } } - errorsTable._()._(); + errorsTable.__().__(); } } @@ -199,19 +199,19 @@ public class ErrorsAndWarningsBlock extends HtmlBlock { html.div().$class("metrics").$style("padding-bottom: 20px"); div.h3(tableHeading).table("#metricsoverview").thead() .$class("ui-widget-header").tr().th().$class("ui-state-default") - ._("Last 1 minute")._().th().$class("ui-state-default") - ._("Last 5 minutes")._().th().$class("ui-state-default") - ._("Last 15 minutes")._().th().$class("ui-state-default") - ._("Last 1 hour")._().th().$class("ui-state-default") - ._("Last 6 hours")._().th().$class("ui-state-default") - ._("Last 12 hours")._().th().$class("ui-state-default") - ._("Last 24 hours")._()._()._().tbody().$class("ui-widget-content") + .__("Last 1 minute").__().th().$class("ui-state-default") + .__("Last 5 minutes").__().th().$class("ui-state-default") + .__("Last 15 minutes").__().th().$class("ui-state-default") + .__("Last 1 hour").__().th().$class("ui-state-default") + .__("Last 6 hours").__().th().$class("ui-state-default") + .__("Last 12 hours").__().th().$class("ui-state-default") + .__("Last 24 hours").__().__().__().tbody().$class("ui-widget-content") .tr().td(String.valueOf(values.get(0))) .td(String.valueOf(values.get(1))).td(String.valueOf(values.get(2))) .td(String.valueOf(values.get(3))).td(String.valueOf(values.get(4))) .td(String.valueOf(values.get(5))).td(String.valueOf(values.get(6))) - ._()._()._(); - div._(); + .__().__().__(); + div.__(); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java index d32b271e46a..6425da64932 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java @@ -31,17 +31,17 @@ import org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Ap import org.apache.hadoop.yarn.server.nodemanager.webapp.dao.AppInfo; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.BODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.BODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; public class AllApplicationsPage extends NMView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setTitle("Applications running on this node"); set(DATATABLES_ID, "applications"); @@ -88,22 +88,22 @@ public class AllApplicationsPage extends NMView { .table("#applications") .thead() .tr() - .td()._("ApplicationId")._() - .td()._("ApplicationState")._() - ._() - ._() + .td().__("ApplicationId").__() + .td().__("ApplicationState").__() + .__() + .__() .tbody(); for (Entry entry : this.nmContext .getApplications().entrySet()) { AppInfo info = new AppInfo(entry.getValue()); tableBody .tr() - .td().a(url("application", info.getId()), info.getId())._() - .td()._(info.getState()) - ._() - ._(); + .td().a(url("application", info.getId()), info.getId()).__() + .td().__(info.getState()) + .__() + .__(); } - tableBody._()._()._(); + tableBody.__().__().__(); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java index 24b85753b18..3fc6f3cb9df 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java @@ -31,17 +31,17 @@ import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Cont import org.apache.hadoop.yarn.server.nodemanager.webapp.dao.ContainerInfo; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.BODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.BODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; public class AllContainersPage extends NMView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); setTitle("All containers running on this node"); set(DATATABLES_ID, "containers"); @@ -82,24 +82,24 @@ public class AllContainersPage extends NMView { .table("#containers") .thead() .tr() - .td()._("ContainerId")._() - .td()._("ContainerState")._() - .td()._("logs")._() - ._() - ._().tbody(); + .td().__("ContainerId").__() + .td().__("ContainerState").__() + .td().__("logs").__() + .__() + .__().tbody(); for (Entry entry : this.nmContext .getContainers().entrySet()) { ContainerInfo info = new ContainerInfo(this.nmContext, entry.getValue()); tableBody .tr() .td().a(url("container", info.getId()), info.getId()) - ._() - .td()._(info.getState())._() + .__() + .td().__(info.getState()).__() .td() - .a(url(info.getShortLogLink()), "logs")._() - ._(); + .a(url(info.getShortLogLink()), "logs").__() + .__(); } - tableBody._()._()._(); + tableBody.__().__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java index 2783b18699c..00f80ef3b88 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java @@ -30,12 +30,11 @@ import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider; import org.apache.hadoop.yarn.server.nodemanager.Context; import org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application; import org.apache.hadoop.yarn.server.nodemanager.webapp.dao.AppInfo; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -43,7 +42,7 @@ import com.google.inject.Inject; public class ApplicationPage extends NMView implements YarnWebParams { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "containers"); @@ -80,30 +79,30 @@ public class ApplicationPage extends NMView implements YarnWebParams { try { applicationID = ApplicationId.fromString($(APPLICATION_ID)); } catch (IllegalArgumentException e) { - html.p()._("Invalid Application Id " + $(APPLICATION_ID))._(); + html.p().__("Invalid Application Id " + $(APPLICATION_ID)).__(); return; } DIV div = html.div("#content"); Application app = this.nmContext.getApplications().get(applicationID); if (app == null) { div.h1("Unknown application with id " + applicationID - + ". Application might have been completed")._(); + + ". Application might have been completed").__(); return; } AppInfo info = new AppInfo(app); info("Application's information") - ._("ApplicationId", info.getId()) - ._("ApplicationState", info.getState()) - ._("User", info.getUser()); - TABLE containersListBody = html._(InfoBlock.class) + .__("ApplicationId", info.getId()) + .__("ApplicationState", info.getState()) + .__("User", info.getUser()); + TABLE containersListBody = html.__(InfoBlock.class) .table("#containers"); for (String containerIdStr : info.getContainers()) { containersListBody .tr().td() .a(url("container", containerIdStr), containerIdStr) - ._()._(); + .__().__(); } - containersListBody._(); + containersListBody.__(); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java index 3e5f4d2e49d..f619e2ff483 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java @@ -37,12 +37,11 @@ import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.server.nodemanager.Context; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.webapp.NotFoundException; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.PRE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.PRE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -51,7 +50,7 @@ public class ContainerLogsPage extends NMView { public static final String REDIRECT_URL = "redirect.url"; - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String redirectUrl = $(REDIRECT_URL); if (redirectUrl == null || redirectUrl.isEmpty()) { set(TITLE, join("Logs for ", $(CONTAINER_ID))); @@ -142,10 +141,10 @@ public class ContainerLogsPage extends NMView { try { long toRead = end - start; if (toRead < logFile.length()) { - html.p()._("Showing " + toRead + " bytes. Click ") + html.p().__("Showing " + toRead + " bytes. Click ") .a(url("containerlogs", $(CONTAINER_ID), $(APP_OWNER), logFile.getName(), "?start=0"), "here"). - _(" for full log")._(); + __(" for full log").__(); } IOUtils.skipFully(logByteStream, start); @@ -160,12 +159,12 @@ public class ContainerLogsPage extends NMView { while ((len = reader.read(cbuf, 0, currentToRead)) > 0 && toRead > 0) { - pre._(new String(cbuf, 0, len)); + pre.__(new String(cbuf, 0, len)); toRead = toRead - len; currentToRead = toRead > bufferSize ? bufferSize : (int) toRead; } - pre._(); + pre.__(); reader.close(); } catch (IOException e) { @@ -199,7 +198,7 @@ public class ContainerLogsPage extends NMView { .a(url("containerlogs", $(CONTAINER_ID), $(APP_OWNER), logFile.getName(), "?start=-4096"), logFile.getName() + " : Total file length is " - + logFile.length() + " bytes.")._(); + + logFile.length() + " bytes.").__(); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java index 4beccc937a4..8117dcad691 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java @@ -25,11 +25,10 @@ import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.server.nodemanager.Context; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container; import org.apache.hadoop.yarn.server.nodemanager.webapp.dao.ContainerInfo; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -38,7 +37,7 @@ import com.google.inject.Inject; public class ContainerPage extends NMView implements YarnWebParams { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); setTitle("Container " + $(CONTAINER_ID)); @@ -65,7 +64,7 @@ public class ContainerPage extends NMView implements YarnWebParams { try { containerID = ContainerId.fromString($(CONTAINER_ID)); } catch (IllegalArgumentException e) { - html.p()._("Invalid containerId " + $(CONTAINER_ID))._(); + html.p().__("Invalid containerId " + $(CONTAINER_ID)).__(); return; } @@ -73,22 +72,22 @@ public class ContainerPage extends NMView implements YarnWebParams { Container container = this.nmContext.getContainers().get(containerID); if (container == null) { div.h1("Unknown Container. Container might have completed, " - + "please go back to the previous page and retry.")._(); + + "please go back to the previous page and retry.").__(); return; } ContainerInfo info = new ContainerInfo(this.nmContext, container); info("Container information") - ._("ContainerID", info.getId()) - ._("ContainerState", info.getState()) - ._("ExitStatus", info.getExitStatus()) - ._("Diagnostics", info.getDiagnostics()) - ._("User", info.getUser()) - ._("TotalMemoryNeeded", info.getMemoryNeeded()) - ._("TotalVCoresNeeded", info.getVCoresNeeded()) - ._("ExecutionType", info.getExecutionType()) - ._("logs", info.getShortLogLink(), "Link to logs"); - html._(InfoBlock.class); + .__("ContainerID", info.getId()) + .__("ContainerState", info.getState()) + .__("ExitStatus", info.getExitStatus()) + .__("Diagnostics", info.getDiagnostics()) + .__("User", info.getUser()) + .__("TotalMemoryNeeded", info.getMemoryNeeded()) + .__("TotalVCoresNeeded", info.getVCoresNeeded()) + .__("ExecutionType", info.getExecutionType()) + .__("logs", info.getShortLogLink(), "Link to logs"); + html.__(InfoBlock.class); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMErrorsAndWarningsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMErrorsAndWarningsPage.java index 7475c4d2f51..5e81ed5f536 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMErrorsAndWarningsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMErrorsAndWarningsPage.java @@ -32,7 +32,7 @@ public class NMErrorsAndWarningsPage extends NMView { } @Override - protected void preHead(HtmlPage.Page.HTML html) { + protected void preHead(HtmlPage.Page.HTML<__> html) { commonPreHead(html); String title = "Errors and Warnings in the NodeManager"; setTitle(title); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java index dc21b4afeab..a76d2eff428 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java @@ -27,11 +27,11 @@ import org.apache.hadoop.yarn.webapp.view.TwoColumnLayout; public class NMView extends TwoColumnLayout { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); } - protected void commonPreHead(Page.HTML<_> html) { + protected void commonPreHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java index 857a4f91292..0a2731eb5fb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java @@ -24,7 +24,7 @@ import org.apache.commons.logging.impl.Log4JLogger; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.util.Log4jWarningErrorMetricsAppender; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; @@ -55,29 +55,29 @@ public class NavBlock extends HtmlBlock implements YarnWebParams { WebAppUtils.getResolvedRMWebAppURLWithScheme(this.conf); Hamlet.UL> ul = html .div("#nav") - .h3()._("ResourceManager")._() + .h3().__("ResourceManager").__() .ul() - .li().a(RMWebAppURL, "RM Home")._()._() - .h3()._("NodeManager")._() // TODO: Problem if no header like this + .li().a(RMWebAppURL, "RM Home").__().__() + .h3().__("NodeManager").__() // TODO: Problem if no header like this .ul() .li() - .a(url("node"), "Node Information")._() + .a(url("node"), "Node Information").__() .li() .a(url("allApplications"), "List of Applications") - ._() + .__() .li() - .a(url("allContainers"), "List of Containers")._() - ._() + .a(url("allContainers"), "List of Containers").__() + .__() .h3("Tools") .ul() - .li().a("/conf", "Configuration")._() - .li().a("/logs", "Local logs")._() - .li().a("/stacks", "Server stacks")._() - .li().a("/jmx?qry=Hadoop:*", "Server metrics")._(); + .li().a("/conf", "Configuration").__() + .li().a("/logs", "Local logs").__() + .li().a("/stacks", "Server stacks").__() + .li().a("/jmx?qry=Hadoop:*", "Server metrics").__(); if (addErrorsAndWarningsLink) { - ul.li().a(url("errors-and-warnings"), "Errors/Warnings")._(); + ul.li().a(url("errors-and-warnings"), "Errors/Warnings").__(); } - ul._()._(); + ul.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java index f51f0c551af..7005f411c5c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java @@ -28,7 +28,7 @@ import org.apache.hadoop.yarn.server.nodemanager.Context; import org.apache.hadoop.yarn.server.nodemanager.ResourceView; import org.apache.hadoop.yarn.server.nodemanager.webapp.dao.NodeInfo; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.HTML; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.HTML; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -39,7 +39,7 @@ public class NodePage extends NMView { private static final long BYTES_IN_MB = 1024 * 1024; @Override - protected void commonPreHead(HTML<_> html) { + protected void commonPreHead(HTML<__> html) { super.commonPreHead(html); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:1}"); @@ -65,29 +65,29 @@ public class NodePage extends NMView { protected void render(Block html) { NodeInfo info = new NodeInfo(this.context, this.resourceView); info("NodeManager information") - ._("Total Vmem allocated for Containers", + .__("Total Vmem allocated for Containers", StringUtils.byteDesc(info.getTotalVmemAllocated() * BYTES_IN_MB)) - ._("Vmem enforcement enabled", + .__("Vmem enforcement enabled", info.isVmemCheckEnabled()) - ._("Total Pmem allocated for Container", + .__("Total Pmem allocated for Container", StringUtils.byteDesc(info.getTotalPmemAllocated() * BYTES_IN_MB)) - ._("Pmem enforcement enabled", + .__("Pmem enforcement enabled", info.isPmemCheckEnabled()) - ._("Total VCores allocated for Containers", + .__("Total VCores allocated for Containers", String.valueOf(info.getTotalVCoresAllocated())) - ._("NodeHealthyStatus", + .__("NodeHealthyStatus", info.getHealthStatus()) - ._("LastNodeHealthTime", new Date( + .__("LastNodeHealthTime", new Date( info.getLastNodeUpdateTime())) - ._("NodeHealthReport", + .__("NodeHealthReport", info.getHealthReport()) - ._("NodeManager started on", new Date( + .__("NodeManager started on", new Date( info.getNMStartupTime())) - ._("NodeManager Version:", info.getNMBuildVersion() + + .__("NodeManager Version:", info.getNMBuildVersion() + " on " + info.getNMVersionBuiltOn()) - ._("Hadoop Version:", info.getHadoopBuildVersion() + + .__("Hadoop Version:", info.getHadoopBuildVersion() + " on " + info.getHadoopVersionBuiltOn()); - html._(InfoBlock.class); + html.__(InfoBlock.class); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutBlock.java index 4225afd31df..b7ce10540e7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutBlock.java @@ -37,22 +37,22 @@ public class AboutBlock extends HtmlBlock { @Override protected void render(Block html) { - html._(MetricsOverviewTable.class); + html.__(MetricsOverviewTable.class); ResourceManager rm = getInstance(ResourceManager.class); ClusterInfo cinfo = new ClusterInfo(rm); info("Cluster overview"). - _("Cluster ID:", cinfo.getClusterId()). - _("ResourceManager state:", cinfo.getState()). - _("ResourceManager HA state:", cinfo.getHAState()). - _("ResourceManager HA zookeeper connection state:", + __("Cluster ID:", cinfo.getClusterId()). + __("ResourceManager state:", cinfo.getState()). + __("ResourceManager HA state:", cinfo.getHAState()). + __("ResourceManager HA zookeeper connection state:", cinfo.getHAZookeeperConnectionState()). - _("ResourceManager RMStateStore:", cinfo.getRMStateStore()). - _("ResourceManager started on:", Times.format(cinfo.getStartedOn())). - _("ResourceManager version:", cinfo.getRMBuildVersion() + + __("ResourceManager RMStateStore:", cinfo.getRMStateStore()). + __("ResourceManager started on:", Times.format(cinfo.getStartedOn())). + __("ResourceManager version:", cinfo.getRMBuildVersion() + " on " + cinfo.getRMVersionBuiltOn()). - _("Hadoop version:", cinfo.getHadoopBuildVersion() + + __("Hadoop version:", cinfo.getHadoopBuildVersion() + " on " + cinfo.getHadoopVersionBuiltOn()); - html._(InfoBlock.class); + html.__(InfoBlock.class); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutPage.java index ef0fdcf1990..f8c04068dde 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AboutPage.java @@ -22,7 +22,7 @@ import org.apache.hadoop.yarn.webapp.SubView; public class AboutPage extends RmView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppAttemptPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppAttemptPage.java index 45f188782d7..89e2decdf24 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppAttemptPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppAttemptPage.java @@ -31,7 +31,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class AppAttemptPage extends RmView { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String appAttemptId = $(YarnWebParams.APPLICATION_ATTEMPT_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppLogAggregationStatusPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppLogAggregationStatusPage.java index ccb53dde2b9..27fb43a0219 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppLogAggregationStatusPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppLogAggregationStatusPage.java @@ -25,7 +25,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class AppLogAggregationStatusPage extends RmView{ @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String appId = $(YarnWebParams.APPLICATION_ID); set( diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppPage.java index 0c5516a304a..7036f33afb2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppPage.java @@ -30,7 +30,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class AppPage extends RmView { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String appId = $(YarnWebParams.APPLICATION_ID); set( diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlockWithMetrics.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlockWithMetrics.java index 29889ecc6e9..fac100fd51d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlockWithMetrics.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlockWithMetrics.java @@ -18,7 +18,6 @@ package org.apache.hadoop.yarn.server.resourcemanager.webapp; -import org.apache.hadoop.yarn.server.webapp.AppsBlock; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; /** @@ -26,7 +25,7 @@ import org.apache.hadoop.yarn.webapp.view.HtmlBlock; */ class AppsBlockWithMetrics extends HtmlBlock { @Override public void render(Block html) { - html._(MetricsOverviewTable.class); - html._(RMAppsBlock.class); + html.__(MetricsOverviewTable.class); + html.__(RMAppsBlock.class); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java index 292c5f37133..f3ab5b0afad 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java @@ -47,12 +47,12 @@ import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.util.resource.Resources; import org.apache.hadoop.yarn.webapp.ResponseInfo; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.UL; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.LI; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -105,7 +105,7 @@ class CapacitySchedulerPage extends RmView { info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status for Partition \'" + nodeLabelDisplay + "\'"); renderQueueCapacityInfo(ri, nodeLabel); - html._(InfoBlock.class); + html.__(InfoBlock.class); // clear the info contents so this queue's info doesn't accumulate into // another queue's info ri.clear(); @@ -113,10 +113,10 @@ class CapacitySchedulerPage extends RmView { // second display the queue specific details : ri = info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status") - ._("Queue State:", lqinfo.getQueueState()); + .__("Queue State:", lqinfo.getQueueState()); renderCommonLeafQueueInfo(ri); - html._(InfoBlock.class); + html.__(InfoBlock.class); // clear the info contents so this queue's info doesn't accumulate into // another queue's info ri.clear(); @@ -125,10 +125,10 @@ class CapacitySchedulerPage extends RmView { private void renderLeafQueueInfoWithoutParition(Block html) { ResponseInfo ri = info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status") - ._("Queue State:", lqinfo.getQueueState()); + .__("Queue State:", lqinfo.getQueueState()); renderQueueCapacityInfo(ri, ""); renderCommonLeafQueueInfo(ri); - html._(InfoBlock.class); + html.__(InfoBlock.class); // clear the info contents so this queue's info doesn't accumulate into // another queue's info ri.clear(); @@ -155,40 +155,40 @@ class CapacitySchedulerPage extends RmView { ? new ResourceInfo(Resources.none()) : resourceUsages.getAmUsed(); ri. - _("Used Capacity:", percent(capacities.getUsedCapacity() / 100)). - _("Configured Capacity:", percent(capacities.getCapacity() / 100)). - _("Configured Max Capacity:", percent(capacities.getMaxCapacity() / 100)). - _("Absolute Used Capacity:", percent(capacities.getAbsoluteUsedCapacity() / 100)). - _("Absolute Configured Capacity:", percent(capacities.getAbsoluteCapacity() / 100)). - _("Absolute Configured Max Capacity:", percent(capacities.getAbsoluteMaxCapacity() / 100)). - _("Used Resources:", resourceUsages.getUsed().toString()). - _("Configured Max Application Master Limit:", StringUtils.format("%.1f", + __("Used Capacity:", percent(capacities.getUsedCapacity() / 100)). + __("Configured Capacity:", percent(capacities.getCapacity() / 100)). + __("Configured Max Capacity:", percent(capacities.getMaxCapacity() / 100)). + __("Absolute Used Capacity:", percent(capacities.getAbsoluteUsedCapacity() / 100)). + __("Absolute Configured Capacity:", percent(capacities.getAbsoluteCapacity() / 100)). + __("Absolute Configured Max Capacity:", percent(capacities.getAbsoluteMaxCapacity() / 100)). + __("Used Resources:", resourceUsages.getUsed().toString()). + __("Configured Max Application Master Limit:", StringUtils.format("%.1f", capacities.getMaxAMLimitPercentage())). - _("Max Application Master Resources:", + __("Max Application Master Resources:", resourceUsages.getAMLimit().toString()). - _("Used Application Master Resources:", + __("Used Application Master Resources:", amUsed.toString()). - _("Max Application Master Resources Per User:", + __("Max Application Master Resources Per User:", userAMResourceLimit.toString()); } private void renderCommonLeafQueueInfo(ResponseInfo ri) { ri. - _("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())). - _("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())). - _("Num Containers:", Integer.toString(lqinfo.getNumContainers())). - _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())). - _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())). - _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%"). - _("Configured User Limit Factor:", lqinfo.getUserLimitFactor()). - _("Accessible Node Labels:", StringUtils.join(",", lqinfo.getNodeLabels())). - _("Ordering Policy: ", lqinfo.getOrderingPolicyInfo()). - _("Preemption:", lqinfo.getPreemptionDisabled() ? "disabled" : "enabled"). - _("Default Node Label Expression:", + __("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())). + __("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())). + __("Num Containers:", Integer.toString(lqinfo.getNumContainers())). + __("Max Applications:", Integer.toString(lqinfo.getMaxApplications())). + __("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())). + __("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%"). + __("Configured User Limit Factor:", lqinfo.getUserLimitFactor()). + __("Accessible Node Labels:", StringUtils.join(",", lqinfo.getNodeLabels())). + __("Ordering Policy: ", lqinfo.getOrderingPolicyInfo()). + __("Preemption:", lqinfo.getPreemptionDisabled() ? "disabled" : "enabled"). + __("Default Node Label Expression:", lqinfo.getDefaultNodeLabelExpression() == null ? NodeLabel.DEFAULT_NODE_LABEL_PARTITION : lqinfo.getDefaultNodeLabelExpression()). - _("Default Application Priority:", + __("Default Application Priority:", Integer.toString(lqinfo.getDefaultApplicationPriority())); } } @@ -208,14 +208,14 @@ class CapacitySchedulerPage extends RmView { protected void render(Block html) { TBODY> tbody = html.table("#userinfo").thead().$class("ui-widget-header").tr().th() - .$class("ui-state-default")._("User Name")._().th() - .$class("ui-state-default")._("Max Resource")._().th() - .$class("ui-state-default")._("Weight")._().th() - .$class("ui-state-default")._("Used Resource")._().th() - .$class("ui-state-default")._("Max AM Resource")._().th() - .$class("ui-state-default")._("Used AM Resource")._().th() - .$class("ui-state-default")._("Schedulable Apps")._().th() - .$class("ui-state-default")._("Non-Schedulable Apps")._()._()._() + .$class("ui-state-default").__("User Name").__().th() + .$class("ui-state-default").__("Max Resource").__().th() + .$class("ui-state-default").__("Weight").__().th() + .$class("ui-state-default").__("Used Resource").__().th() + .$class("ui-state-default").__("Max AM Resource").__().th() + .$class("ui-state-default").__("Used AM Resource").__().th() + .$class("ui-state-default").__("Schedulable Apps").__().th() + .$class("ui-state-default").__("Non-Schedulable Apps").__().__().__() .tbody(); ArrayList users = lqinfo.getUsers().getUsersList(); @@ -240,11 +240,11 @@ class CapacitySchedulerPage extends RmView { .td(resourceUsages.getAMLimit().toString()) .td(amUsed.toString()) .td(Integer.toString(userInfo.getNumActiveApplications())) - .td(Integer.toString(userInfo.getNumPendingApplications()))._(); + .td(Integer.toString(userInfo.getNumPendingApplications())).__(); } - html.div().$class("usersinfo").h5("Active Users Info")._(); - tbody._()._(); + html.div().$class("usersinfo").h5("Active Users Info").__(); + tbody.__().__(); } } @@ -288,25 +288,25 @@ class CapacitySchedulerPage extends RmView { a(_Q).$style(width(absMaxCap * Q_MAX_WIDTH)). $title(join("Absolute Capacity:", percent(absCap))). span().$style(join(Q_GIVEN, ";font-size:1px;", width(absCap/absMaxCap))). - _('.')._(). + __('.').__(). span().$style(join(width(absUsedCap/absMaxCap), ";font-size:1px;left:0%;", absUsedCap > absCap ? Q_OVER : Q_UNDER)). - _('.')._(). - span(".q", "Queue: "+info.getQueuePath().substring(5))._(). + __('.').__(). + span(".q", "Queue: "+info.getQueuePath().substring(5)).__(). span().$class("qstats").$style(left(Q_STATS_POS)). - _(join(percent(used), " used"))._(); + __(join(percent(used), " used")).__(); csqinfo.qinfo = info; if (info.getQueues() == null) { - li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._(); - li.ul("#lq").li()._(QueueUsersInfoBlock.class)._()._(); + li.ul("#lq").li().__(LeafQueueInfoBlock.class).__().__(); + li.ul("#lq").li().__(QueueUsersInfoBlock.class).__().__(); } else { - li._(QueueBlock.class); + li.__(QueueBlock.class); } - li._(); + li.__(); } - ul._(); + ul.__(); } } @@ -327,7 +327,7 @@ class CapacitySchedulerPage extends RmView { @Override public void render(Block html) { - html._(MetricsOverviewTable.class); + html.__(MetricsOverviewTable.class); UserGroupInformation callerUGI = this.getCallerUGI(); boolean isAdmin = false; @@ -347,10 +347,10 @@ class CapacitySchedulerPage extends RmView { .$style( "border-style: solid; border-color: #000000; border-width: 1px;" + " cursor: hand; cursor: pointer; border-radius: 4px") - .$onclick("confirmAction()").b("Dump scheduler logs")._().select() - .$id("time").option().$value("60")._("1 min")._().option() - .$value("300")._("5 min")._().option().$value("600")._("10 min")._() - ._()._(); + .$onclick("confirmAction()").b("Dump scheduler logs").__().select() + .$id("time").option().$value("60").__("1 min").__().option() + .$value("300").__("5 min").__().option().$value("600").__("10 min").__() + .__().__(); StringBuilder script = new StringBuilder(); script @@ -377,36 +377,36 @@ class CapacitySchedulerPage extends RmView { .append(" console.log(data);").append(" });").append(" }") .append("}"); - html.script().$type("text/javascript")._(script.toString())._(); + html.script().$type("text/javascript").__(script.toString()).__(); } UL>> ul = html. div("#cs-wrapper.ui-widget"). div(".ui-widget-header.ui-corner-top"). - _("Application Queues")._(). + __("Application Queues").__(). div("#cs.ui-widget-content.ui-corner-bottom"). ul(); if (cs == null) { ul. li(). a(_Q).$style(width(Q_MAX_WIDTH)). - span().$style(Q_END)._("100% ")._(). - span(".q", "default")._()._(); + span().$style(Q_END).__("100% ").__(). + span(".q", "default").__().__(); } else { ul. li().$style("margin-bottom: 1em"). - span().$style("font-weight: bold")._("Legend:")._(). + span().$style("font-weight: bold").__("Legend:").__(). span().$class("qlegend ui-corner-all").$style(Q_GIVEN). - _("Capacity")._(). + __("Capacity").__(). span().$class("qlegend ui-corner-all").$style(Q_UNDER). - _("Used")._(). + __("Used").__(). span().$class("qlegend ui-corner-all").$style(Q_OVER). - _("Used (over capacity)")._(). + __("Used (over capacity)").__(). span().$class("qlegend ui-corner-all ui-state-default"). - _("Max Capacity")._(). + __("Max Capacity").__(). span().$class("qlegend ui-corner-all").$style(ACTIVE_USER). - _("Users Requesting Resources")._(). - _(); + __("Users Requesting Resources").__(). + __(); float used = 0; @@ -433,11 +433,11 @@ class CapacitySchedulerPage extends RmView { ul.li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(join(width(used), ";left:0%;", - used > 1 ? Q_OVER : Q_UNDER))._(".")._(). - span(".q", "Queue: root")._(). + used > 1 ? Q_OVER : Q_UNDER)).__(".").__(). + span(".q", "Queue: root").__(). span().$class("qstats").$style(left(Q_STATS_POS)). - _(join(percent(used), " used"))._(). - _(QueueBlock.class)._(); + __(join(percent(used), " used")).__(). + __(QueueBlock.class).__(); } else { for (RMNodeLabel label : nodeLabelsInfo) { csqinfo.qinfo = null; @@ -453,29 +453,29 @@ class CapacitySchedulerPage extends RmView { ul.li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(join(width(used), ";left:0%;", - used > 1 ? Q_OVER : Q_UNDER))._(".")._(). - span(".q", partitionUiTag)._(). + used > 1 ? Q_OVER : Q_UNDER)).__(".").__(). + span(".q", partitionUiTag).__(). span().$class("qstats").$style(left(Q_STATS_POS)). - _(join(percent(used), " used"))._()._(); + __(join(percent(used), " used")).__().__(); //for the queue hierarchy under label UL underLabel = html.ul("#pq"); underLabel.li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(join(width(used), ";left:0%;", - used > 1 ? Q_OVER : Q_UNDER))._(".")._(). - span(".q", "Queue: root")._(). + used > 1 ? Q_OVER : Q_UNDER)).__(".").__(). + span(".q", "Queue: root").__(). span().$class("qstats").$style(left(Q_STATS_POS)). - _(join(percent(used), " used"))._(). - _(QueueBlock.class)._()._(); + __(join(percent(used), " used")).__(). + __(QueueBlock.class).__().__(); } } } - ul._()._(). + ul.__().__(). script().$type("text/javascript"). - _("$('#cs').hide();")._()._(). - _(RMAppsBlock.class); - html._(HealthBlock.class); + __("$('#cs').hide();").__().__(). + __(RMAppsBlock.class); + html.__(HealthBlock.class); } } @@ -495,13 +495,13 @@ class CapacitySchedulerPage extends RmView { div.h4("Aggregate scheduler counts"); TBODY>> tbody = div.table("#lastrun").thead().$class("ui-widget-header").tr().th() - .$class("ui-state-default")._("Total Container Allocations(count)") - ._().th().$class("ui-state-default") - ._("Total Container Releases(count)")._().th() + .$class("ui-state-default").__("Total Container Allocations(count)") + .__().th().$class("ui-state-default") + .__("Total Container Releases(count)").__().th() .$class("ui-state-default") - ._("Total Fulfilled Reservations(count)")._().th() - .$class("ui-state-default")._("Total Container Preemptions(count)") - ._()._()._().tbody(); + .__("Total Fulfilled Reservations(count)").__().th() + .$class("ui-state-default").__("Total Container Preemptions(count)") + .__().__().__().tbody(); tbody .$class("ui-widget-content") .tr() @@ -512,15 +512,15 @@ class CapacitySchedulerPage extends RmView { String.valueOf(cs.getRootQueueMetrics() .getAggegatedReleasedContainers())) .td(healthInfo.getAggregateFulFilledReservationsCount().toString()) - .td(healthInfo.getAggregatePreemptionCount().toString())._()._()._(); + .td(healthInfo.getAggregatePreemptionCount().toString()).__().__().__(); div.h4("Last scheduler run"); tbody = div.table("#lastrun").thead().$class("ui-widget-header").tr().th() - .$class("ui-state-default")._("Time")._().th() - .$class("ui-state-default")._("Allocations(count - resources)")._() - .th().$class("ui-state-default")._("Reservations(count - resources)") - ._().th().$class("ui-state-default")._("Releases(count - resources)") - ._()._()._().tbody(); + .$class("ui-state-default").__("Time").__().th() + .$class("ui-state-default").__("Allocations(count - resources)").__() + .th().$class("ui-state-default").__("Reservations(count - resources)") + .__().th().$class("ui-state-default").__("Releases(count - resources)") + .__().__().__().tbody(); tbody .$class("ui-widget-content") .tr() @@ -533,7 +533,7 @@ class CapacitySchedulerPage extends RmView { + healthInfo.getResourcesReserved().toString()) .td( healthInfo.getReleaseCount().toString() + " - " - + healthInfo.getResourcesReleased().toString())._()._()._(); + + healthInfo.getResourcesReleased().toString()).__().__().__(); Map info = new HashMap<>(); info.put("Allocation", healthInfo.getLastAllocationDetails()); info.put("Reservation", healthInfo.getLastReservationDetails()); @@ -549,10 +549,10 @@ class CapacitySchedulerPage extends RmView { div.h4("Last " + entry.getKey()); tbody = div.table(table).thead().$class("ui-widget-header").tr().th() - .$class("ui-state-default")._("Time")._().th() - .$class("ui-state-default")._("Container Id")._().th() - .$class("ui-state-default")._("Node Id")._().th() - .$class("ui-state-default")._("Queue")._()._()._().tbody(); + .$class("ui-state-default").__("Time").__().th() + .$class("ui-state-default").__("Container Id").__().th() + .$class("ui-state-default").__("Node Id").__().th() + .$class("ui-state-default").__("Queue").__().__().__().tbody(); SchedulerHealth.DetailedInformation di = entry.getValue(); if (di.getTimestamp() != 0) { containerId = di.getContainerId().toString(); @@ -561,26 +561,26 @@ class CapacitySchedulerPage extends RmView { } tbody.$class("ui-widget-content").tr() .td(Times.format(di.getTimestamp())).td(containerId).td(nodeId) - .td(queue)._()._()._(); + .td(queue).__().__().__(); } - div._(); + div.__(); } } - @Override protected void postHead(Page.HTML<_> html) { + @Override protected void postHead(Page.HTML<__> html) { html. style().$type("text/css"). - _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", + __("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }", "#cs a { font-weight: normal; margin: 2px; position: relative }", "#cs a span { font-weight: normal; font-size: 80% }", "#cs-wrapper .ui-widget-header { padding: 0.2em 0.5em }", ".qstats { font-weight: normal; font-size: 80%; position: absolute }", ".qlegend { font-weight: normal; padding: 0 1em; margin: 1em }", - "table.info tr th {width: 50%}")._(). // to center info table + "table.info tr th {width: 50%}").__(). // to center info table script("/static/jt/jquery.jstree.js"). script().$type("text/javascript"). - _("$(function() {", + __("$(function() {", " $('#cs a span').addClass('ui-corner-all').css('position', 'absolute');", " $('#cs').bind('loaded.jstree', function (e, data) {", " var callback = { call:reopenQueryNodes }", @@ -603,8 +603,8 @@ class CapacitySchedulerPage extends RmView { " $('#apps').dataTable().fnFilter(q, 4, true);", " });", " $('#cs').show();", - "});")._(). - _(SchedulerPageUtil.QueueBlockUtil.class); + "});").__(). + __(SchedulerPageUtil.QueueBlockUtil.class); } @Override protected Class content() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ContainerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ContainerPage.java index b8cd1adbd58..2cd209b6eae 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ContainerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ContainerPage.java @@ -28,7 +28,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; public class ContainerPage extends RmView { @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String containerId = $(YarnWebParams.CONTAINER_ID); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/DefaultSchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/DefaultSchedulerPage.java index d4420640101..0b0884b3a55 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/DefaultSchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/DefaultSchedulerPage.java @@ -26,9 +26,9 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoSchedule import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FifoSchedulerInfo; import org.apache.hadoop.yarn.server.webapp.AppsBlock; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.UL; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -53,16 +53,16 @@ class DefaultSchedulerPage extends RmView { @Override public void render(Block html) { info("\'" + sinfo.getQueueName() + "\' Queue Status"). - _("Queue State:" , sinfo.getState()). - _("Minimum Queue Memory Capacity:" , Long.toString(sinfo.getMinQueueMemoryCapacity())). - _("Maximum Queue Memory Capacity:" , Long.toString(sinfo.getMaxQueueMemoryCapacity())). - _("Number of Nodes:" , Integer.toString(sinfo.getNumNodes())). - _("Used Node Capacity:" , Integer.toString(sinfo.getUsedNodeCapacity())). - _("Available Node Capacity:" , Integer.toString(sinfo.getAvailNodeCapacity())). - _("Total Node Capacity:" , Integer.toString(sinfo.getTotalNodeCapacity())). - _("Number of Node Containers:" , Integer.toString(sinfo.getNumContainers())); + __("Queue State:" , sinfo.getState()). + __("Minimum Queue Memory Capacity:" , Long.toString(sinfo.getMinQueueMemoryCapacity())). + __("Maximum Queue Memory Capacity:" , Long.toString(sinfo.getMaxQueueMemoryCapacity())). + __("Number of Nodes:" , Integer.toString(sinfo.getNumNodes())). + __("Used Node Capacity:" , Integer.toString(sinfo.getUsedNodeCapacity())). + __("Available Node Capacity:" , Integer.toString(sinfo.getAvailNodeCapacity())). + __("Total Node Capacity:" , Integer.toString(sinfo.getTotalNodeCapacity())). + __("Number of Node Containers:" , Integer.toString(sinfo.getNumContainers())); - html._(InfoBlock.class); + html.__(InfoBlock.class); } } @@ -77,11 +77,11 @@ class DefaultSchedulerPage extends RmView { @Override public void render(Block html) { - html._(MetricsOverviewTable.class); + html.__(MetricsOverviewTable.class); UL>> ul = html. div("#cs-wrapper.ui-widget"). div(".ui-widget-header.ui-corner-top"). - _("FifoScheduler Queue")._(). + __("FifoScheduler Queue").__(). div("#cs.ui-widget-content.ui-corner-bottom"). ul(); @@ -89,8 +89,8 @@ class DefaultSchedulerPage extends RmView { ul. li(). a(_Q).$style(width(WIDTH_F)). - span().$style(Q_END)._("100% ")._(). - span(".q", "default")._()._(); + span().$style(Q_END).__("100% ").__(). + span(".q", "default").__().__(); } else { float used = sinfo.getUsedCapacity(); float set = sinfo.getCapacity(); @@ -99,33 +99,33 @@ class DefaultSchedulerPage extends RmView { li(). a(_Q).$style(width(WIDTH_F)). $title(join("used:", percent(used))). - span().$style(Q_END)._("100%")._(). + span().$style(Q_END).__("100%").__(). span().$style(join(width(delta), ';', used > set ? OVER : UNDER, - ';', used > set ? left(set) : left(used)))._(".")._(). - span(".q", sinfo.getQueueName())._(). - _(QueueInfoBlock.class)._(); + ';', used > set ? left(set) : left(used))).__(".").__(). + span(".q", sinfo.getQueueName()).__(). + __(QueueInfoBlock.class).__(); } - ul._()._(). + ul.__().__(). script().$type("text/javascript"). - _("$('#cs').hide();")._()._(). - _(AppsBlock.class); + __("$('#cs').hide();").__().__(). + __(AppsBlock.class); } } - @Override protected void postHead(Page.HTML<_> html) { + @Override protected void postHead(Page.HTML<__> html) { html. style().$type("text/css"). - _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", + __("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }", "#cs a { font-weight: normal; margin: 2px; position: relative }", "#cs a span { font-weight: normal; font-size: 80% }", "#cs-wrapper .ui-widget-header { padding: 0.2em 0.5em }", - "table.info tr th {width: 50%}")._(). // to center info table + "table.info tr th {width: 50%}").__(). // to center info table script("/static/jt/jquery.jstree.js"). script().$type("text/javascript"). - _("$(function() {", + __("$(function() {", " $('#cs a span').addClass('ui-corner-all').css('position', 'absolute');", " $('#cs').bind('loaded.jstree', function (e, data) {", " data.inst.open_all(); }).", @@ -142,7 +142,7 @@ class DefaultSchedulerPage extends RmView { " $('#apps').dataTable().fnFilter(q, 4);", " });", " $('#cs').show();", - "});")._(); + "});").__(); } @Override protected Class content() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ErrorBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ErrorBlock.java index 963e53f8037..6fe5c3a9798 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ErrorBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/ErrorBlock.java @@ -34,6 +34,6 @@ public class ErrorBlock extends HtmlBlock { @Override protected void render(Block html) { - html.p()._($(ERROR_MESSAGE))._(); + html.p().__($(ERROR_MESSAGE)).__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java index b7a7a9372c8..ac88f861feb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerAppsBlock.java @@ -41,9 +41,9 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppState; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FairSchedulerInfo; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; @@ -98,7 +98,7 @@ public class FairSchedulerAppsBlock extends HtmlBlock { th(".reservedCpu", "Reserved CPU VCores"). th(".reservedMemory", "Reserved Memory MB"). th(".progress", "Progress"). - th(".ui", "Tracking UI")._()._(). + th(".ui", "Tracking UI").__().__(). tbody(); Collection reqAppStates = null; String reqStateString = $(APP_STATE); @@ -168,8 +168,8 @@ public class FairSchedulerAppsBlock extends HtmlBlock { } appsTableData.append("]"); html.script().$type("text/javascript"). - _("var appsTableData=" + appsTableData)._(); + __("var appsTableData=" + appsTableData).__(); - tbody._()._(); + tbody.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java index 5f46841a48f..ffa45940d89 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/FairSchedulerPage.java @@ -31,10 +31,10 @@ import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FairSchedulerQue import org.apache.hadoop.yarn.server.webapp.WebPageUtils; import org.apache.hadoop.yarn.webapp.ResponseInfo; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.UL; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.LI; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -70,21 +70,21 @@ public class FairSchedulerPage extends RmView { @Override protected void render(Block html) { ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status"). - _("Used Resources:", qinfo.getUsedResources().toString()). - _("Demand Resources:", qinfo.getDemandResources().toString()). - _("Num Active Applications:", qinfo.getNumActiveApplications()). - _("Num Pending Applications:", qinfo.getNumPendingApplications()). - _("Min Resources:", qinfo.getMinResources().toString()). - _("Max Resources:", qinfo.getMaxResources().toString()). - _("Reserved Resources:", qinfo.getReservedResources().toString()); + __("Used Resources:", qinfo.getUsedResources().toString()). + __("Demand Resources:", qinfo.getDemandResources().toString()). + __("Num Active Applications:", qinfo.getNumActiveApplications()). + __("Num Pending Applications:", qinfo.getNumPendingApplications()). + __("Min Resources:", qinfo.getMinResources().toString()). + __("Max Resources:", qinfo.getMaxResources().toString()). + __("Reserved Resources:", qinfo.getReservedResources().toString()); int maxApps = qinfo.getMaxApplications(); if (maxApps < Integer.MAX_VALUE) { - ri._("Max Running Applications:", qinfo.getMaxApplications()); + ri.__("Max Running Applications:", qinfo.getMaxApplications()); } - ri._(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString()); - ri._(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString()); - ri._("Preemptable:", qinfo.isPreemptable()); - html._(InfoBlock.class); + ri.__(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString()); + ri.__(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString()); + ri.__("Preemptable:", qinfo.isPreemptable()); + html.__(InfoBlock.class); // clear the info contents so this queue's info doesn't accumulate into another queue's info ri.clear(); @@ -102,17 +102,17 @@ public class FairSchedulerPage extends RmView { @Override protected void render(Block html) { ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status"). - _("Used Resources:", qinfo.getUsedResources().toString()). - _("Min Resources:", qinfo.getMinResources().toString()). - _("Max Resources:", qinfo.getMaxResources().toString()). - _("Reserved Resources:", qinfo.getReservedResources().toString()); + __("Used Resources:", qinfo.getUsedResources().toString()). + __("Min Resources:", qinfo.getMinResources().toString()). + __("Max Resources:", qinfo.getMaxResources().toString()). + __("Reserved Resources:", qinfo.getReservedResources().toString()); int maxApps = qinfo.getMaxApplications(); if (maxApps < Integer.MAX_VALUE) { - ri._("Max Running Applications:", qinfo.getMaxApplications()); + ri.__("Max Running Applications:", qinfo.getMaxApplications()); } - ri._(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString()); - ri._(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString()); - html._(InfoBlock.class); + ri.__(STEADY_FAIR_SHARE + ":", qinfo.getSteadyFairShare().toString()); + ri.__(INSTANTANEOUS_FAIR_SHARE + ":", qinfo.getFairShare().toString()); + html.__(InfoBlock.class); // clear the info contents so this queue's info doesn't accumulate into another queue's info ri.clear(); @@ -141,28 +141,28 @@ public class FairSchedulerPage extends RmView { $title(join(join(STEADY_FAIR_SHARE + ":", percent(steadyFairShare)), join(" " + INSTANTANEOUS_FAIR_SHARE + ":", percent(instantaneousFairShare)))). span().$style(join(Q_GIVEN, ";font-size:1px;", width(steadyFairShare / capacity))). - _('.')._(). + __('.').__(). span().$style(join(Q_INSTANTANEOUS_FS, ";font-size:1px;", width(instantaneousFairShare/capacity))). - _('.')._(). + __('.').__(). span().$style(join(width(used/capacity), ";font-size:1px;left:0%;", used > instantaneousFairShare ? Q_OVER : Q_UNDER)). - _('.')._(). - span(".q", info.getQueueName())._(). + __('.').__(). + span(".q", info.getQueueName()).__(). span().$class("qstats").$style(left(Q_STATS_POS)). - _(join(percent(used), " used"))._(); + __(join(percent(used), " used")).__(); fsqinfo.qinfo = info; if (info instanceof FairSchedulerLeafQueueInfo) { - li.ul("#lq").li()._(LeafQueueBlock.class)._()._(); + li.ul("#lq").li().__(LeafQueueBlock.class).__().__(); } else { - li.ul("#lq").li()._(ParentQueueBlock.class)._()._(); - li._(QueueBlock.class); + li.ul("#lq").li().__(ParentQueueBlock.class).__().__(); + li.__(QueueBlock.class); } - li._(); + li.__(); } - ul._(); + ul.__(); } } @@ -177,19 +177,19 @@ public class FairSchedulerPage extends RmView { @Override public void render(Block html) { - html._(MetricsOverviewTable.class); + html.__(MetricsOverviewTable.class); UL>> ul = html. div("#cs-wrapper.ui-widget"). div(".ui-widget-header.ui-corner-top"). - _("Application Queues")._(). + __("Application Queues").__(). div("#cs.ui-widget-content.ui-corner-bottom"). ul(); if (fs == null) { ul. li(). a(_Q).$style(width(Q_MAX_WIDTH)). - span().$style(Q_END)._("100% ")._(). - span(".q", "default")._()._(); + span().$style(Q_END).__("100% ").__(). + span(".q", "default").__().__(); } else { FairSchedulerInfo sinfo = new FairSchedulerInfo(fs); fsqinfo.qinfo = sinfo.getRootQueueInfo(); @@ -197,52 +197,52 @@ public class FairSchedulerPage extends RmView { ul. li().$style("margin-bottom: 1em"). - span().$style("font-weight: bold")._("Legend:")._(). + span().$style("font-weight: bold").__("Legend:").__(). span().$class("qlegend ui-corner-all").$style(Q_GIVEN). $title("The steady fair shares consider all queues, " + "both active (with running applications) and inactive."). - _(STEADY_FAIR_SHARE)._(). + __(STEADY_FAIR_SHARE).__(). span().$class("qlegend ui-corner-all").$style(Q_INSTANTANEOUS_FS). $title("The instantaneous fair shares consider only active " + "queues (with running applications)."). - _(INSTANTANEOUS_FAIR_SHARE)._(). + __(INSTANTANEOUS_FAIR_SHARE).__(). span().$class("qlegend ui-corner-all").$style(Q_UNDER). - _("Used")._(). + __("Used").__(). span().$class("qlegend ui-corner-all").$style(Q_OVER). - _("Used (over fair share)")._(). + __("Used (over fair share)").__(). span().$class("qlegend ui-corner-all ui-state-default"). - _("Max Capacity")._(). - _(). + __("Max Capacity").__(). + __(). li(). a(_Q).$style(width(Q_MAX_WIDTH)). span().$style(join(width(used), ";left:0%;", - used > 1 ? Q_OVER : Q_UNDER))._(".")._(). - span(".q", "root")._(). + used > 1 ? Q_OVER : Q_UNDER)).__(".").__(). + span(".q", "root").__(). span().$class("qstats").$style(left(Q_STATS_POS)). - _(join(percent(used), " used"))._(). - _(QueueBlock.class)._(); + __(join(percent(used), " used")).__(). + __(QueueBlock.class).__(); } - ul._()._(). + ul.__().__(). script().$type("text/javascript"). - _("$('#cs').hide();")._()._(). - _(FairSchedulerAppsBlock.class); + __("$('#cs').hide();").__().__(). + __(FairSchedulerAppsBlock.class); } } - @Override protected void postHead(Page.HTML<_> html) { + @Override protected void postHead(Page.HTML<__> html) { html. style().$type("text/css"). - _("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", + __("#cs { padding: 0.5em 0 1em 0; margin-bottom: 1em; position: relative }", "#cs ul { list-style: none }", "#cs a { font-weight: normal; margin: 2px; position: relative }", "#cs a span { font-weight: normal; font-size: 80% }", "#cs-wrapper .ui-widget-header { padding: 0.2em 0.5em }", ".qstats { font-weight: normal; font-size: 80%; position: absolute }", ".qlegend { font-weight: normal; padding: 0 1em; margin: 1em }", - "table.info tr th {width: 50%}")._(). // to center info table + "table.info tr th {width: 50%}").__(). // to center info table script("/static/jt/jquery.jstree.js"). script().$type("text/javascript"). - _("$(function() {", + __("$(function() {", " $('#cs a span').addClass('ui-corner-all').css('position', 'absolute');", " $('#cs').bind('loaded.jstree', function (e, data) {", " var callback = { call:reopenQueryNodes }", @@ -262,8 +262,8 @@ public class FairSchedulerPage extends RmView { " $('#apps').dataTable().fnFilter(q, 4, true);", " });", " $('#cs').show();", - "});")._(). - _(SchedulerPageUtil.QueueBlockUtil.class); + "});").__(). + __(SchedulerPageUtil.QueueBlockUtil.class); } @Override protected Class content() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/MetricsOverviewTable.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/MetricsOverviewTable.java index fe7b2470044..f6b1a943a60 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/MetricsOverviewTable.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/MetricsOverviewTable.java @@ -24,8 +24,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsIn import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.SchedulerInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.UserMetricsInfo; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -61,19 +61,19 @@ public class MetricsOverviewTable extends HtmlBlock { table("#metricsoverview"). thead().$class("ui-widget-header"). tr(). - th().$class("ui-state-default")._("Apps Submitted")._(). - th().$class("ui-state-default")._("Apps Pending")._(). - th().$class("ui-state-default")._("Apps Running")._(). - th().$class("ui-state-default")._("Apps Completed")._(). - th().$class("ui-state-default")._("Containers Running")._(). - th().$class("ui-state-default")._("Memory Used")._(). - th().$class("ui-state-default")._("Memory Total")._(). - th().$class("ui-state-default")._("Memory Reserved")._(). - th().$class("ui-state-default")._("VCores Used")._(). - th().$class("ui-state-default")._("VCores Total")._(). - th().$class("ui-state-default")._("VCores Reserved")._(). - _(). - _(). + th().$class("ui-state-default").__("Apps Submitted").__(). + th().$class("ui-state-default").__("Apps Pending").__(). + th().$class("ui-state-default").__("Apps Running").__(). + th().$class("ui-state-default").__("Apps Completed").__(). + th().$class("ui-state-default").__("Containers Running").__(). + th().$class("ui-state-default").__("Memory Used").__(). + th().$class("ui-state-default").__("Memory Total").__(). + th().$class("ui-state-default").__("Memory Reserved").__(). + th().$class("ui-state-default").__("VCores Used").__(). + th().$class("ui-state-default").__("VCores Total").__(). + th().$class("ui-state-default").__("VCores Reserved").__(). + __(). + __(). tbody().$class("ui-widget-content"). tr(). td(String.valueOf(clusterMetrics.getAppsSubmitted())). @@ -92,33 +92,33 @@ public class MetricsOverviewTable extends HtmlBlock { td(String.valueOf(clusterMetrics.getAllocatedVirtualCores())). td(String.valueOf(clusterMetrics.getTotalVirtualCores())). td(String.valueOf(clusterMetrics.getReservedVirtualCores())). - _(). - _()._(); + __(). + __().__(); div.h3("Cluster Nodes Metrics"). table("#nodemetricsoverview"). thead().$class("ui-widget-header"). tr(). - th().$class("ui-state-default")._("Active Nodes")._(). - th().$class("ui-state-default")._("Decommissioning Nodes")._(). - th().$class("ui-state-default")._("Decommissioned Nodes")._(). - th().$class("ui-state-default")._("Lost Nodes")._(). - th().$class("ui-state-default")._("Unhealthy Nodes")._(). - th().$class("ui-state-default")._("Rebooted Nodes")._(). - th().$class("ui-state-default")._("Shutdown Nodes")._(). - _(). - _(). + th().$class("ui-state-default").__("Active Nodes").__(). + th().$class("ui-state-default").__("Decommissioning Nodes").__(). + th().$class("ui-state-default").__("Decommissioned Nodes").__(). + th().$class("ui-state-default").__("Lost Nodes").__(). + th().$class("ui-state-default").__("Unhealthy Nodes").__(). + th().$class("ui-state-default").__("Rebooted Nodes").__(). + th().$class("ui-state-default").__("Shutdown Nodes").__(). + __(). + __(). tbody().$class("ui-widget-content"). tr(). - td().a(url("nodes"),String.valueOf(clusterMetrics.getActiveNodes()))._(). - td().a(url("nodes/decommissioning"), String.valueOf(clusterMetrics.getDecommissioningNodes()))._(). - td().a(url("nodes/decommissioned"),String.valueOf(clusterMetrics.getDecommissionedNodes()))._(). - td().a(url("nodes/lost"),String.valueOf(clusterMetrics.getLostNodes()))._(). - td().a(url("nodes/unhealthy"),String.valueOf(clusterMetrics.getUnhealthyNodes()))._(). - td().a(url("nodes/rebooted"),String.valueOf(clusterMetrics.getRebootedNodes()))._(). - td().a(url("nodes/shutdown"),String.valueOf(clusterMetrics.getShutdownNodes()))._(). - _(). - _()._(); + td().a(url("nodes"), String.valueOf(clusterMetrics.getActiveNodes())).__(). + td().a(url("nodes/decommissioning"), String.valueOf(clusterMetrics.getDecommissioningNodes())).__(). + td().a(url("nodes/decommissioned"), String.valueOf(clusterMetrics.getDecommissionedNodes())).__(). + td().a(url("nodes/lost"), String.valueOf(clusterMetrics.getLostNodes())).__(). + td().a(url("nodes/unhealthy"), String.valueOf(clusterMetrics.getUnhealthyNodes())).__(). + td().a(url("nodes/rebooted"), String.valueOf(clusterMetrics.getRebootedNodes())).__(). + td().a(url("nodes/shutdown"), String.valueOf(clusterMetrics.getShutdownNodes())).__(). + __(). + __().__(); String user = request().getRemoteUser(); if (user != null) { @@ -128,21 +128,21 @@ public class MetricsOverviewTable extends HtmlBlock { table("#usermetricsoverview"). thead().$class("ui-widget-header"). tr(). - th().$class("ui-state-default")._("Apps Submitted")._(). - th().$class("ui-state-default")._("Apps Pending")._(). - th().$class("ui-state-default")._("Apps Running")._(). - th().$class("ui-state-default")._("Apps Completed")._(). - th().$class("ui-state-default")._("Containers Running")._(). - th().$class("ui-state-default")._("Containers Pending")._(). - th().$class("ui-state-default")._("Containers Reserved")._(). - th().$class("ui-state-default")._("Memory Used")._(). - th().$class("ui-state-default")._("Memory Pending")._(). - th().$class("ui-state-default")._("Memory Reserved")._(). - th().$class("ui-state-default")._("VCores Used")._(). - th().$class("ui-state-default")._("VCores Pending")._(). - th().$class("ui-state-default")._("VCores Reserved")._(). - _(). - _(). + th().$class("ui-state-default").__("Apps Submitted").__(). + th().$class("ui-state-default").__("Apps Pending").__(). + th().$class("ui-state-default").__("Apps Running").__(). + th().$class("ui-state-default").__("Apps Completed").__(). + th().$class("ui-state-default").__("Containers Running").__(). + th().$class("ui-state-default").__("Containers Pending").__(). + th().$class("ui-state-default").__("Containers Reserved").__(). + th().$class("ui-state-default").__("Memory Used").__(). + th().$class("ui-state-default").__("Memory Pending").__(). + th().$class("ui-state-default").__("Memory Reserved").__(). + th().$class("ui-state-default").__("VCores Used").__(). + th().$class("ui-state-default").__("VCores Pending").__(). + th().$class("ui-state-default").__("VCores Reserved").__(). + __(). + __(). tbody().$class("ui-widget-content"). tr(). td(String.valueOf(userMetrics.getAppsSubmitted())). @@ -163,8 +163,8 @@ public class MetricsOverviewTable extends HtmlBlock { td(String.valueOf(userMetrics.getAllocatedVirtualCores())). td(String.valueOf(userMetrics.getPendingVirtualCores())). td(String.valueOf(userMetrics.getReservedVirtualCores())). - _(). - _()._(); + __(). + __().__(); } } @@ -175,14 +175,14 @@ public class MetricsOverviewTable extends HtmlBlock { table("#schedulermetricsoverview"). thead().$class("ui-widget-header"). tr(). - th().$class("ui-state-default")._("Scheduler Type")._(). - th().$class("ui-state-default")._("Scheduling Resource Type")._(). - th().$class("ui-state-default")._("Minimum Allocation")._(). - th().$class("ui-state-default")._("Maximum Allocation")._(). + th().$class("ui-state-default").__("Scheduler Type").__(). + th().$class("ui-state-default").__("Scheduling Resource Type").__(). + th().$class("ui-state-default").__("Minimum Allocation").__(). + th().$class("ui-state-default").__("Maximum Allocation").__(). th().$class("ui-state-default") - ._("Maximum Cluster Application Priority")._(). - _(). - _(). + .__("Maximum Cluster Application Priority").__(). + __(). + __(). tbody().$class("ui-widget-content"). tr(). td(String.valueOf(schedulerInfo.getSchedulerType())). @@ -190,9 +190,9 @@ public class MetricsOverviewTable extends HtmlBlock { td(schedulerInfo.getMinAllocation().toString()). td(schedulerInfo.getMaxAllocation().toString()). td(String.valueOf(schedulerInfo.getMaxClusterLevelAppPriority())). - _(). - _()._(); + __(). + __().__(); - div._(); + div.__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NavBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NavBlock.java index ca55175c244..1993f6c0264 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NavBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NavBlock.java @@ -23,10 +23,10 @@ import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.impl.Log4JLogger; import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.util.Log4jWarningErrorMetricsAppender; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.LI; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.UL; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.LI; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; public class NavBlock extends HtmlBlock { @@ -45,29 +45,29 @@ public class NavBlock extends HtmlBlock { div("#nav"). h3("Cluster"). ul(). - li().a(url("cluster"), "About")._(). - li().a(url("nodes"), "Nodes")._(). - li().a(url("nodelabels"), "Node Labels")._(); + li().a(url("cluster"), "About").__(). + li().a(url("nodes"), "Nodes").__(). + li().a(url("nodelabels"), "Node Labels").__(); UL>>> subAppsList = mainList. li().a(url("apps"), "Applications"). ul(); - subAppsList.li()._(); + subAppsList.li().__(); for (YarnApplicationState state : YarnApplicationState.values()) { subAppsList. - li().a(url("apps", state.toString()), state.toString())._(); + li().a(url("apps", state.toString()), state.toString()).__(); } - subAppsList._()._(); + subAppsList.__().__(); UL> tools = mainList. - li().a(url("scheduler"), "Scheduler")._()._(). + li().a(url("scheduler"), "Scheduler").__().__(). h3("Tools").ul(); - tools.li().a("/conf", "Configuration")._(). - li().a("/logs", "Local logs")._(). - li().a("/stacks", "Server stacks")._(). - li().a("/jmx?qry=Hadoop:*", "Server metrics")._(); + tools.li().a("/conf", "Configuration").__(). + li().a("/logs", "Local logs").__(). + li().a("/stacks", "Server stacks").__(). + li().a("/jmx?qry=Hadoop:*", "Server metrics").__(); if (addErrorsAndWarningsLink) { - tools.li().a(url("errors-and-warnings"), "Errors/Warnings")._(); + tools.li().a(url("errors-and-warnings"), "Errors/Warnings").__(); } - tools._()._(); + tools.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java index ea85d13ea5e..6ff76281007 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java @@ -26,10 +26,10 @@ import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager; import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.hadoop.yarn.webapp.YarnWebParams; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TR; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -53,7 +53,7 @@ public class NodeLabelsPage extends RmView { th(".type", "Label Type"). th(".numOfActiveNMs", "Num Of Active NMs"). th(".totalResource", "Total Resource"). - _()._(). + __().__(). tbody(); RMNodeLabelsManager nlm = rm.getRMContext().getNodeLabelManager(); @@ -71,17 +71,17 @@ public class NodeLabelsPage extends RmView { .a(url("nodes", "?" + YarnWebParams.NODE_LABEL + "=" + info.getLabelName()), String.valueOf(nActiveNMs)) - ._(); + .__(); } else { row = row.td(String.valueOf(nActiveNMs)); } - row.td(info.getResource().toString())._(); + row.td(info.getResource().toString()).__(); } - tbody._()._(); + tbody.__().__(); } } - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { commonPreHead(html); String title = "Node labels of the cluster"; setTitle(title); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java index c03df63b27c..d0e384da34f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java @@ -30,9 +30,9 @@ import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeInfo; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.webapp.SubView; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import java.util.Collection; @@ -63,7 +63,7 @@ class NodesPage extends RmView { @Override protected void render(Block html) { - html._(MetricsOverviewTable.class); + html.__(MetricsOverviewTable.class); ResourceScheduler sched = rm.getResourceScheduler(); @@ -98,7 +98,7 @@ class NodesPage extends RmView { } TBODY> tbody = - trbody.th(".nodeManagerVersion", "Version")._()._().tbody(); + trbody.th(".nodeManagerVersion", "Version").__().__().tbody(); NodeState stateFilter = null; if (type != null && !type.isEmpty()) { @@ -201,13 +201,13 @@ class NodesPage extends RmView { } nodeTableData.append("]"); html.script().$type("text/javascript") - ._("var nodeTableData=" + nodeTableData)._(); - tbody._()._(); + .__("var nodeTableData=" + nodeTableData).__(); + tbody.__().__(); } } @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String type = $(NODE_STATE); String title = "Nodes of the cluster"; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java index 40e1e9421ad..82ddb54b70d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java @@ -45,10 +45,10 @@ import org.apache.hadoop.yarn.server.webapp.AppAttemptBlock; import org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.util.resource.Resources; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -86,7 +86,7 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ .th(".resource", "ResourceName").th(".capacity", "Capability") .th(".containers", "NumContainers") .th(".relaxlocality", "RelaxLocality") - .th(".labelexpression", "NodeLabelExpression")._()._().tbody(); + .th(".labelexpression", "NodeLabelExpression").__().__().tbody(); StringBuilder resourceRequestTableData = new StringBuilder("[\n"); for (ResourceRequestInfo resourceRequest : resourceRequests) { @@ -114,9 +114,9 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ } resourceRequestTableData.append("]"); html.script().$type("text/javascript") - ._("var resourceRequestsTableData=" + resourceRequestTableData)._(); - tbody._()._(); - div._(); + .__("var resourceRequestsTableData=" + resourceRequestTableData).__(); + tbody.__().__(); + div.__(); } private Resource getTotalResource(List requests) { @@ -163,7 +163,7 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ th(_TH, "Node Local Request"). th(_TH, "Rack Local Request"). th(_TH, "Off Switch Request"). - _(); + __(); String[] containersType = { "Num Node Local Containers (satisfied by)", "Num Rack Local Containers (satisfied by)", @@ -173,10 +173,10 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ table.tr((odd = !odd) ? _ODD : _EVEN).td(containersType[i]) .td(String.valueOf(attemptMetrics.getLocalityStatistics()[i][0])) .td(i == 0 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][1])) - .td(i <= 1 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][2]))._(); + .td(i <= 1 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][2])).__(); } - table._(); - div._(); + table.__(); + div.__(); } private boolean isApplicationInFinalState(YarnApplicationAttemptState state) { @@ -192,12 +192,12 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ if (!isApplicationInFinalState(YarnApplicationAttemptState .valueOf(attempt.getAppAttemptState().toString()))) { RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics(); - DIV pdiv = html._(InfoBlock.class).div(_INFO_WRAP); + DIV pdiv = html.__(InfoBlock.class).div(_INFO_WRAP); info("Application Attempt Overview").clear(); - info("Application Attempt Metrics")._( + info("Application Attempt Metrics").__( "Application Attempt Headroom : ", metrics == null ? "N/A" : metrics.getApplicationAttemptHeadroom()); - pdiv._(); + pdiv.__(); } } } @@ -226,23 +226,23 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ .getBlacklistUpdates().getBlacklistAdditions()); info("Application Attempt Overview") - ._( + .__( "Application Attempt State:", appAttempt.getAppAttemptState() == null ? UNAVAILABLE : appAttempt .getAppAttemptState()) - ._("Started:", Times.format(appAttempt.getStartedTime())) - ._("Elapsed:", + .__("Started:", Times.format(appAttempt.getStartedTime())) + .__("Elapsed:", org.apache.hadoop.util.StringUtils.formatTime(Times.elapsed( appAttempt.getStartedTime(), appAttempt.getFinishedTime()))) - ._( + .__( "AM Container:", appAttempt.getAmContainerId() == null || containers == null || !hasAMContainer(appAttemptReport.getAMContainerId(), containers) ? null : root_url("container", appAttempt.getAmContainerId()), appAttempt.getAmContainerId() == null ? "N/A" : String.valueOf(appAttempt.getAmContainerId())) - ._("Node:", node) - ._( + .__("Node:", node) + .__( "Tracking URL:", appAttempt.getTrackingUrl() == null || appAttempt.getTrackingUrl().equals(UNAVAILABLE) ? null @@ -254,12 +254,12 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ || appAttempt.getAppAttemptState() == YarnApplicationAttemptState.FAILED || appAttempt.getAppAttemptState() == YarnApplicationAttemptState.KILLED ? "History" : "ApplicationMaster") - ._( + .__( "Diagnostics Info:", appAttempt.getDiagnosticsInfo() == null ? "" : appAttempt .getDiagnosticsInfo()) - ._("Nodes blacklisted by the application:", appBlacklistedNodes) - ._("Nodes blacklisted by the system:", rmBlackListedNodes); + .__("Nodes blacklisted by the application:", appBlacklistedNodes) + .__("Nodes blacklisted by the system:", rmBlackListedNodes); } private String getNodeString(Collection nodes) { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java index e5d6c16a729..cd04264d07c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java @@ -37,8 +37,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptM import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppAttemptInfo; import org.apache.hadoop.yarn.server.webapp.AppBlock; import org.apache.hadoop.yarn.util.resource.Resources; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -82,33 +82,33 @@ public class RMAppBlock extends AppBlock{ attemptMetrics == null ? 0 : attemptMetrics .getNumNonAMContainersPreempted(); DIV pdiv = html. - _(InfoBlock.class). + __(InfoBlock.class). div(_INFO_WRAP); info("Application Overview").clear(); info("Application Metrics") - ._("Total Resource Preempted:", + .__("Total Resource Preempted:", appMetrics == null ? "N/A" : appMetrics.getResourcePreempted()) - ._("Total Number of Non-AM Containers Preempted:", + .__("Total Number of Non-AM Containers Preempted:", appMetrics == null ? "N/A" : appMetrics.getNumNonAMContainersPreempted()) - ._("Total Number of AM Containers Preempted:", + .__("Total Number of AM Containers Preempted:", appMetrics == null ? "N/A" : appMetrics.getNumAMContainersPreempted()) - ._("Resource Preempted from Current Attempt:", + .__("Resource Preempted from Current Attempt:", attemptResourcePreempted) - ._("Number of Non-AM Containers Preempted from Current Attempt:", + .__("Number of Non-AM Containers Preempted from Current Attempt:", attemptNumNonAMContainerPreempted) - ._("Aggregate Resource Allocation:", + .__("Aggregate Resource Allocation:", String.format("%d MB-seconds, %d vcore-seconds", appMetrics == null ? "N/A" : appMetrics.getMemorySeconds(), appMetrics == null ? "N/A" : appMetrics.getVcoreSeconds())) - ._("Aggregate Preempted Resource Allocation:", + .__("Aggregate Preempted Resource Allocation:", String.format("%d MB-seconds, %d vcore-seconds", appMetrics == null ? "N/A" : appMetrics.getPreemptedMemorySeconds(), appMetrics == null ? "N/A" : appMetrics.getPreemptedVcoreSeconds())); - pdiv._(); + pdiv.__(); } @Override @@ -122,7 +122,7 @@ public class RMAppBlock extends AppBlock{ .th(".appBlacklistednodes", "Nodes blacklisted by the application", "Nodes blacklisted by the app") .th(".rmBlacklistednodes", "Nodes blacklisted by the RM for the" - + " app", "Nodes blacklisted by the system")._()._().tbody(); + + " app", "Nodes blacklisted by the system").__().__().tbody(); RMApp rmApp = this.rm.getRMContext().getRMApps().get(this.appID); if (rmApp == null) { @@ -174,9 +174,9 @@ public class RMAppBlock extends AppBlock{ } attemptsTableData.append("]"); html.script().$type("text/javascript") - ._("var attemptsTableData=" + attemptsTableData)._(); + .__("var attemptsTableData=" + attemptsTableData).__(); - tbody._()._(); + tbody.__().__(); } @Override diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java index f7f7c971788..c1f2e5ed109 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java @@ -38,9 +38,9 @@ import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl; import org.apache.hadoop.yarn.util.Apps; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -87,28 +87,28 @@ public class RMAppLogAggregationStatusBlock extends HtmlBlock { tr(). th(_TH, "Log Aggregation Status"). th(_TH, "Description"). - _(); + __(); table_description.tr().td(LogAggregationStatus.DISABLED.name()) - .td("Log Aggregation is Disabled.")._(); + .td("Log Aggregation is Disabled.").__(); table_description.tr().td(LogAggregationStatus.NOT_START.name()) - .td("Log Aggregation does not Start.")._(); + .td("Log Aggregation does not Start.").__(); table_description.tr().td(LogAggregationStatus.RUNNING.name()) - .td("Log Aggregation is Running.")._(); + .td("Log Aggregation is Running.").__(); table_description.tr().td(LogAggregationStatus.RUNNING_WITH_FAILURE.name()) .td("Log Aggregation is Running, but has failures " - + "in previous cycles")._(); + + "in previous cycles").__(); table_description.tr().td(LogAggregationStatus.SUCCEEDED.name()) .td("Log Aggregation is Succeeded. All of the logs have been " - + "aggregated successfully.")._(); + + "aggregated successfully.").__(); table_description.tr().td(LogAggregationStatus.FAILED.name()) .td("Log Aggregation is Failed. At least one of the logs " - + "have not been aggregated.")._(); + + "have not been aggregated.").__(); table_description.tr().td(LogAggregationStatus.TIME_OUT.name()) .td("The application is finished, but the log aggregation status is " + "not updated for a long time. Not sure whether the log aggregation " - + "is finished or not.")._(); - table_description._(); - div_description._(); + + "is finished or not.").__(); + table_description.__(); + div_description.__(); RMApp rmApp = rm.getRMContext().getRMApps().get(appId); // Application Log aggregation status Table @@ -131,7 +131,7 @@ public class RMAppLogAggregationStatusBlock extends HtmlBlock { .th(_TH, "Last " + maxLogAggregationDiagnosticsInMemory + " Diagnostic Messages") .th(_TH, "Last " - + maxLogAggregationDiagnosticsInMemory + " Failure Messages")._(); + + maxLogAggregationDiagnosticsInMemory + " Failure Messages").__(); if (rmApp != null) { Map logAggregationReports = @@ -152,11 +152,11 @@ public class RMAppLogAggregationStatusBlock extends HtmlBlock { .td(report.getKey().toString()) .td(status == null ? "N/A" : status.toString()) .td(message == null ? "N/A" : message) - .td(failureMessage == null ? "N/A" : failureMessage)._(); + .td(failureMessage == null ? "N/A" : failureMessage).__(); } } } - table._(); - div._(); + table.__(); + div.__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java index 61674d2d342..ede71e34378 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java @@ -35,11 +35,10 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; import org.apache.hadoop.yarn.server.webapp.AppsBlock; import org.apache.hadoop.yarn.server.webapp.dao.AppInfo; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.webapp.View; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import com.google.inject.Inject; @@ -72,8 +71,8 @@ public class RMAppsBlock extends AppsBlock { .th(".clusterPercentage", "% of Cluster") .th(".progress", "Progress") .th(".ui", "Tracking UI") - .th(".blacklisted", "Blacklisted Nodes")._() - ._().tbody(); + .th(".blacklisted", "Blacklisted Nodes").__() + .__().tbody(); StringBuilder appsTableData = new StringBuilder("[\n"); for (ApplicationReport appReport : appReports) { @@ -190,8 +189,8 @@ public class RMAppsBlock extends AppsBlock { } appsTableData.append("]"); html.script().$type("text/javascript") - ._("var appsTableData=" + appsTableData)._(); + .__("var appsTableData=" + appsTableData).__(); - tbody._()._(); + tbody.__().__(); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java index 216deeb44ad..c2ac59d20f7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java @@ -31,7 +31,7 @@ public class RMErrorsAndWarningsPage extends RmView { } @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String title = "Errors and Warnings in the ResourceManager"; setTitle(title); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java index beb0cca235d..d81e64ddac7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java @@ -26,7 +26,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; * because of a redirection issue. */ public class RedirectionErrorPage extends RmView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String aid = $(YarnWebParams.APPLICATION_ID); commonPreHead(html); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java index 1a437f834b7..fc844f9e70f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java @@ -33,7 +33,7 @@ public class RmView extends TwoColumnLayout { static final int MAX_FAST_ROWS = 1000; // inline js array @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "apps"); set(initID(DATATABLES, "apps"), initAppsTable()); @@ -45,7 +45,7 @@ public class RmView extends TwoColumnLayout { setTitle(sjoin(reqState, "Applications")); } - protected void commonPreHead(Page.HTML<_> html) { + protected void commonPreHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java index 99c05656f3a..8c2d2711872 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java @@ -27,7 +27,7 @@ public class SchedulerPageUtil { private void reopenQueue(Block html) { html. script().$type("text/javascript"). - _("function reopenQueryNodes() {", + __("function reopenQueryNodes() {", " var currentParam = window.location.href.split('?');", " var tmpCurrentParam = currentParam;", " var queryQueuesString = '';", @@ -52,13 +52,13 @@ public class SchedulerPageUtil { " 'open_node.jstree' :function(e, data) { storeExpandedQueue(e, data); },", " 'close_node.jstree':function(e, data) { storeExpandedQueue(e, data); }", " });", - "}")._(); + "}").__(); } private void storeExpandedQueue (Block html) { html. script().$type("text/javascript"). - _("function storeExpandedQueue(e, data) {", + __("function storeExpandedQueue(e, data) {", " var OPEN_QUEUES = 'openQueues';", " var ACTION_OPEN = 'open';", " var ACTION_CLOSED = 'closed';", @@ -166,7 +166,7 @@ public class SchedulerPageUtil { " queryString = queryString + '#' + queueName;", " }", " return queryString;", - "}")._(); + "}").__(); } @Override protected void render(Block html) { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java index 27944d39192..cec085b3191 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java @@ -43,7 +43,7 @@ import com.google.inject.Inject; @Unstable public class SCMOverviewPage extends TwoColumnLayout { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } @@ -60,9 +60,9 @@ public class SCMOverviewPage extends TwoColumnLayout { static private class SCMOverviewNavBlock extends HtmlBlock { @Override protected void render(Block html) { - html.div("#nav").h3("Tools").ul().li().a("/conf", "Configuration")._() - .li().a("/stacks", "Thread dump")._().li().a("/logs", "Logs")._() - .li().a("/metrics", "Metrics")._()._()._(); + html.div("#nav").h3("Tools").ul().li().a("/conf", "Configuration").__() + .li().a("/stacks", "Thread dump").__().li().a("/logs", "Logs").__() + .li().a("/metrics", "Metrics").__().__().__(); } } @@ -81,15 +81,15 @@ public class SCMOverviewPage extends TwoColumnLayout { CleanerMetrics.getInstance(), ClientSCMMetrics.getInstance(), SharedCacheUploaderMetrics.getInstance()); info("Shared Cache Manager overview"). - _("Started on:", Times.format(scm.getStartTime())). - _("Cache hits: ", metricsInfo.getCacheHits()). - _("Cache misses: ", metricsInfo.getCacheMisses()). - _("Cache releases: ", metricsInfo.getCacheReleases()). - _("Accepted uploads: ", metricsInfo.getAcceptedUploads()). - _("Rejected uploads: ", metricsInfo.getRejectUploads()). - _("Deleted files by the cleaner: ", metricsInfo.getTotalDeletedFiles()). - _("Processed files by the cleaner: ", metricsInfo.getTotalProcessedFiles()); - html._(InfoBlock.class); + __("Started on:", Times.format(scm.getStartTime())). + __("Cache hits: ", metricsInfo.getCacheHits()). + __("Cache misses: ", metricsInfo.getCacheMisses()). + __("Cache releases: ", metricsInfo.getCacheReleases()). + __("Accepted uploads: ", metricsInfo.getAcceptedUploads()). + __("Rejected uploads: ", metricsInfo.getRejectUploads()). + __("Deleted files by the cleaner: ", metricsInfo.getTotalDeletedFiles()). + __("Processed files by the cleaner: ", metricsInfo.getTotalProcessedFiles()); + html.__(InfoBlock.class); } } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java index 7d61f74a207..4886c55aeb4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java @@ -19,7 +19,7 @@ package org.apache.hadoop.yarn.server.webproxy; import org.apache.hadoop.yarn.webapp.MimeType; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +41,7 @@ public class ProxyUtils { "This filter only works for HTTP/HTTPS"; public static final String LOCATION = "Location"; - public static class _ implements Hamlet._ { + public static class __ implements Hamlet.__ { //Empty } @@ -50,7 +50,7 @@ public class ProxyUtils { super(out, 0, false); } - public HTML html() { + public HTML html() { return new HTML<>("html", null, EnumSet.of(EOpt.ENDTAG)); } } @@ -86,13 +86,13 @@ public class ProxyUtils { PrintWriter writer = response.getWriter(); Page p = new Page(writer); p.html() - .head().title("Moved")._() + .head().title("Moved").__() .body() .h1("Moved") .div() - ._("Content has moved ") - .a(location, "here")._() - ._()._(); + .__("Content has moved ") + .a(location, "here").__() + .__().__(); writer.close(); } @@ -110,7 +110,7 @@ public class ProxyUtils { Page p = new Page(resp.getWriter()); p.html(). h1(message). - _(); + __(); } /** diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java index b32ee301554..e1588c115a2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java @@ -58,7 +58,7 @@ import org.apache.hadoop.yarn.util.Apps; import org.apache.hadoop.yarn.util.StringHelper; import org.apache.hadoop.yarn.util.TrackingUriPlugin; import org.apache.hadoop.yarn.webapp.MimeType; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.http.Header; import org.apache.http.HttpResponse; @@ -108,7 +108,7 @@ public class WebAppProxyServlet extends HttpServlet { /** * Empty Hamlet class. */ - private static class _ implements Hamlet._ { + private static class __ implements Hamlet.__ { //Empty } @@ -117,7 +117,7 @@ public class WebAppProxyServlet extends HttpServlet { super(out, 0, false); } - public HTML html() { + public HTML html() { return new HTML<>("html", null, EnumSet.of(EOpt.ENDTAG)); } } @@ -172,10 +172,10 @@ public class WebAppProxyServlet extends HttpServlet { p.html(). h1("WARNING: The following page may not be safe!"). h3(). - _("click ").a(link, "here"). - _(" to continue to an Application Master web interface owned by ", user). - _(). - _(); + __("click ").a(link, "here"). + __(" to continue to an Application Master web interface owned by ", user). + __(). + __(); } /**