[shrinkwrap-issues] [JBoss JIRA] (SHRINKDESC-119) Create a Builder SPI
Andrew Rubinger (JIRA)
jira-events at lists.jboss.org
Mon Apr 23 11:07:19 EDT 2012
Andrew Rubinger created SHRINKDESC-119:
------------------------------------------
Summary: Create a Builder SPI
Key: SHRINKDESC-119
URL: https://issues.jboss.org/browse/SHRINKDESC-119
Project: ShrinkWrap Descriptors
Issue Type: Feature Request
Reporter: Andrew Rubinger
Apart from the SWD object model, we could make it much easier to populate the metadata by introducing a "Builder" (name to be discussed) SPI. The purpose here would be a pluggable mechanism to accomplish code like the following:
{code}WebAppDescriptor desc = create(WebAppDescriptor.class)
.add(type(Servlet.class)
.className("com.acme.MyServlet")
.name("MyServletName"))
.add(build(Servlet.class)
.from(MyServlet.class));{code}
Here the WepAppDescriptor gets data added by scanning in annotations observed on the user's MyServlet, relieving the user of supplying the configuration manually.
A more full example is detailed in this Gist contributed by Aslak:
https://gist.github.com/1025597
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the shrinkwrap-issues
mailing list