juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [05/25] incubator-juneau-website git commit: Update javadocs.
Date Tue, 22 Aug 2017 22:15:45 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/fe5928f7/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html b/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
index 8ef22b3..85d4ff2 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/RestContext.html
@@ -269,1779 +269,1796 @@
 <span class="sourceLineNo">261</span>      paramFormat,<a name="line.261"></a>
 <span class="sourceLineNo">262</span>      clientVersionHeader,<a name="line.262"></a>
 <span class="sourceLineNo">263</span>      fullPath,<a name="line.263"></a>
-<span class="sourceLineNo">264</span>      htmlHeader,<a name="line.264"></a>
-<span class="sourceLineNo">265</span>      htmlNav,<a name="line.265"></a>
-<span class="sourceLineNo">266</span>      htmlAside,<a name="line.266"></a>
-<span class="sourceLineNo">267</span>      htmlStyle,<a name="line.267"></a>
-<span class="sourceLineNo">268</span>      htmlStylesheet,<a name="line.268"></a>
-<span class="sourceLineNo">269</span>      htmlScript,<a name="line.269"></a>
-<span class="sourceLineNo">270</span>      htmlFooter,<a name="line.270"></a>
-<span class="sourceLineNo">271</span>      htmlNoResultsMessage;<a name="line.271"></a>
-<span class="sourceLineNo">272</span>   private final String[]<a name="line.272"></a>
-<span class="sourceLineNo">273</span>      htmlLinks;<a name="line.273"></a>
-<span class="sourceLineNo">274</span>   private final boolean htmlNoWrap;<a name="line.274"></a>
-<span class="sourceLineNo">275</span>   private final HtmlDocTemplate htmlTemplate;<a name="line.275"></a>
-<span class="sourceLineNo">276</span>   private final Map&lt;String,Widget&gt; htmlWidgets;<a name="line.276"></a>
-<span class="sourceLineNo">277</span><a name="line.277"></a>
-<span class="sourceLineNo">278</span>   private final Set&lt;String&gt; allowMethodParams;<a name="line.278"></a>
-<span class="sourceLineNo">279</span><a name="line.279"></a>
-<span class="sourceLineNo">280</span>   private final ObjectMap properties;<a name="line.280"></a>
-<span class="sourceLineNo">281</span>   private final Class&lt;?&gt;[]<a name="line.281"></a>
-<span class="sourceLineNo">282</span>      beanFilters,<a name="line.282"></a>
-<span class="sourceLineNo">283</span>      pojoSwaps;<a name="line.283"></a>
-<span class="sourceLineNo">284</span>   private final Map&lt;Class&lt;?&gt;,RestParam&gt; paramResolvers;<a name="line.284"></a>
-<span class="sourceLineNo">285</span>   private final SerializerGroup serializers;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>   private final ParserGroup parsers;<a name="line.286"></a>
-<span class="sourceLineNo">287</span>   private final UrlEncodingSerializer urlEncodingSerializer;<a name="line.287"></a>
-<span class="sourceLineNo">288</span>   private final UrlEncodingParser urlEncodingParser;<a name="line.288"></a>
-<span class="sourceLineNo">289</span>   private final EncoderGroup encoders;<a name="line.289"></a>
-<span class="sourceLineNo">290</span>   private final MediaType[]<a name="line.290"></a>
-<span class="sourceLineNo">291</span>      supportedContentTypes,<a name="line.291"></a>
-<span class="sourceLineNo">292</span>      supportedAcceptTypes;<a name="line.292"></a>
-<span class="sourceLineNo">293</span>   private final Map&lt;String,String&gt; defaultRequestHeaders;<a name="line.293"></a>
-<span class="sourceLineNo">294</span>   private final Map&lt;String,Object&gt; defaultResponseHeaders;<a name="line.294"></a>
-<span class="sourceLineNo">295</span>   private final BeanContext beanContext;<a name="line.295"></a>
-<span class="sourceLineNo">296</span>   private final RestConverter[] converters;<a name="line.296"></a>
-<span class="sourceLineNo">297</span>   private final RestGuard[] guards;<a name="line.297"></a>
-<span class="sourceLineNo">298</span>   private final ResponseHandler[] responseHandlers;<a name="line.298"></a>
-<span class="sourceLineNo">299</span>   private final MimetypesFileTypeMap mimetypesFileTypeMap;<a name="line.299"></a>
-<span class="sourceLineNo">300</span>   private final StreamResource favIcon;<a name="line.300"></a>
-<span class="sourceLineNo">301</span>   private final Map&lt;String,String&gt; staticFilesMap;<a name="line.301"></a>
-<span class="sourceLineNo">302</span>   private final String[] staticFilesPrefixes;<a name="line.302"></a>
-<span class="sourceLineNo">303</span>   private final MessageBundle msgs;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>   private final ConfigFile configFile;<a name="line.304"></a>
-<span class="sourceLineNo">305</span>   private final VarResolver varResolver;<a name="line.305"></a>
-<span class="sourceLineNo">306</span>   private final Map&lt;String,CallRouter&gt; callRouters;<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   private final Map&lt;String,CallMethod&gt; callMethods;<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   private final Map&lt;String,RestContext&gt; childResources;<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   private final RestLogger logger;<a name="line.309"></a>
-<span class="sourceLineNo">310</span>   private final RestCallHandler callHandler;<a name="line.310"></a>
-<span class="sourceLineNo">311</span>   private final RestInfoProvider infoProvider;<a name="line.311"></a>
-<span class="sourceLineNo">312</span>   private final RestException initException;<a name="line.312"></a>
-<span class="sourceLineNo">313</span>   private final RestContext parentContext;<a name="line.313"></a>
-<span class="sourceLineNo">314</span>   private final RestResourceResolver resourceResolver;<a name="line.314"></a>
-<span class="sourceLineNo">315</span><a name="line.315"></a>
-<span class="sourceLineNo">316</span>   // Lifecycle methods<a name="line.316"></a>
-<span class="sourceLineNo">317</span>   private final Method[]<a name="line.317"></a>
-<span class="sourceLineNo">318</span>      postInitMethods,<a name="line.318"></a>
-<span class="sourceLineNo">319</span>      postInitChildFirstMethods,<a name="line.319"></a>
-<span class="sourceLineNo">320</span>      preCallMethods,<a name="line.320"></a>
-<span class="sourceLineNo">321</span>      postCallMethods,<a name="line.321"></a>
-<span class="sourceLineNo">322</span>      startCallMethods,<a name="line.322"></a>
-<span class="sourceLineNo">323</span>      endCallMethods,<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      destroyMethods;<a name="line.324"></a>
-<span class="sourceLineNo">325</span>   private final RestParam[][]<a name="line.325"></a>
-<span class="sourceLineNo">326</span>      preCallMethodParams,<a name="line.326"></a>
-<span class="sourceLineNo">327</span>      postCallMethodParams;<a name="line.327"></a>
-<span class="sourceLineNo">328</span>   private final Class&lt;?&gt;[][]<a name="line.328"></a>
-<span class="sourceLineNo">329</span>      postInitMethodParams,<a name="line.329"></a>
-<span class="sourceLineNo">330</span>      postInitChildFirstMethodParams,<a name="line.330"></a>
-<span class="sourceLineNo">331</span>      startCallMethodParams,<a name="line.331"></a>
-<span class="sourceLineNo">332</span>      endCallMethodParams,<a name="line.332"></a>
-<span class="sourceLineNo">333</span>      destroyMethodParams;<a name="line.333"></a>
-<span class="sourceLineNo">334</span><a name="line.334"></a>
-<span class="sourceLineNo">335</span>   // In-memory cache of images and stylesheets in the org.apache.juneau.rest.htdocs package.<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   private final Map&lt;String,StreamResource&gt; staticFilesCache = new ConcurrentHashMap&lt;String,StreamResource&gt;();<a name="line.336"></a>
-<span class="sourceLineNo">337</span><a name="line.337"></a>
-<span class="sourceLineNo">338</span>   private final ResourceFinder resourceFinder;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>   private final ConcurrentHashMap&lt;Integer,AtomicInteger&gt; stackTraceHashes = new ConcurrentHashMap&lt;Integer,AtomicInteger&gt;();<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
+<span class="sourceLineNo">264</span>      contextPath,<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      htmlHeader,<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      htmlNav,<a name="line.266"></a>
+<span class="sourceLineNo">267</span>      htmlAside,<a name="line.267"></a>
+<span class="sourceLineNo">268</span>      htmlStyle,<a name="line.268"></a>
+<span class="sourceLineNo">269</span>      htmlStylesheet,<a name="line.269"></a>
+<span class="sourceLineNo">270</span>      htmlScript,<a name="line.270"></a>
+<span class="sourceLineNo">271</span>      htmlFooter,<a name="line.271"></a>
+<span class="sourceLineNo">272</span>      htmlNoResultsMessage;<a name="line.272"></a>
+<span class="sourceLineNo">273</span>   private final String[]<a name="line.273"></a>
+<span class="sourceLineNo">274</span>      htmlLinks;<a name="line.274"></a>
+<span class="sourceLineNo">275</span>   private final boolean htmlNoWrap;<a name="line.275"></a>
+<span class="sourceLineNo">276</span>   private final HtmlDocTemplate htmlTemplate;<a name="line.276"></a>
+<span class="sourceLineNo">277</span>   private final Map&lt;String,Widget&gt; htmlWidgets;<a name="line.277"></a>
+<span class="sourceLineNo">278</span><a name="line.278"></a>
+<span class="sourceLineNo">279</span>   private final Set&lt;String&gt; allowMethodParams;<a name="line.279"></a>
+<span class="sourceLineNo">280</span><a name="line.280"></a>
+<span class="sourceLineNo">281</span>   private final ObjectMap properties;<a name="line.281"></a>
+<span class="sourceLineNo">282</span>   private final Class&lt;?&gt;[]<a name="line.282"></a>
+<span class="sourceLineNo">283</span>      beanFilters,<a name="line.283"></a>
+<span class="sourceLineNo">284</span>      pojoSwaps;<a name="line.284"></a>
+<span class="sourceLineNo">285</span>   private final Map&lt;Class&lt;?&gt;,RestParam&gt; paramResolvers;<a name="line.285"></a>
+<span class="sourceLineNo">286</span>   private final SerializerGroup serializers;<a name="line.286"></a>
+<span class="sourceLineNo">287</span>   private final ParserGroup parsers;<a name="line.287"></a>
+<span class="sourceLineNo">288</span>   private final UrlEncodingSerializer urlEncodingSerializer;<a name="line.288"></a>
+<span class="sourceLineNo">289</span>   private final UrlEncodingParser urlEncodingParser;<a name="line.289"></a>
+<span class="sourceLineNo">290</span>   private final EncoderGroup encoders;<a name="line.290"></a>
+<span class="sourceLineNo">291</span>   private final MediaType[]<a name="line.291"></a>
+<span class="sourceLineNo">292</span>      supportedContentTypes,<a name="line.292"></a>
+<span class="sourceLineNo">293</span>      supportedAcceptTypes;<a name="line.293"></a>
+<span class="sourceLineNo">294</span>   private final Map&lt;String,String&gt; defaultRequestHeaders;<a name="line.294"></a>
+<span class="sourceLineNo">295</span>   private final Map&lt;String,Object&gt; defaultResponseHeaders;<a name="line.295"></a>
+<span class="sourceLineNo">296</span>   private final BeanContext beanContext;<a name="line.296"></a>
+<span class="sourceLineNo">297</span>   private final RestConverter[] converters;<a name="line.297"></a>
+<span class="sourceLineNo">298</span>   private final RestGuard[] guards;<a name="line.298"></a>
+<span class="sourceLineNo">299</span>   private final ResponseHandler[] responseHandlers;<a name="line.299"></a>
+<span class="sourceLineNo">300</span>   private final MimetypesFileTypeMap mimetypesFileTypeMap;<a name="line.300"></a>
+<span class="sourceLineNo">301</span>   private final StreamResource favIcon;<a name="line.301"></a>
+<span class="sourceLineNo">302</span>   private final Map&lt;String,String&gt; staticFilesMap;<a name="line.302"></a>
+<span class="sourceLineNo">303</span>   private final String[] staticFilesPrefixes;<a name="line.303"></a>
+<span class="sourceLineNo">304</span>   private final MessageBundle msgs;<a name="line.304"></a>
+<span class="sourceLineNo">305</span>   private final ConfigFile configFile;<a name="line.305"></a>
+<span class="sourceLineNo">306</span>   private final VarResolver varResolver;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>   private final Map&lt;String,CallRouter&gt; callRouters;<a name="line.307"></a>
+<span class="sourceLineNo">308</span>   private final Map&lt;String,CallMethod&gt; callMethods;<a name="line.308"></a>
+<span class="sourceLineNo">309</span>   private final Map&lt;String,RestContext&gt; childResources;<a name="line.309"></a>
+<span class="sourceLineNo">310</span>   private final RestLogger logger;<a name="line.310"></a>
+<span class="sourceLineNo">311</span>   private final RestCallHandler callHandler;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>   private final RestInfoProvider infoProvider;<a name="line.312"></a>
+<span class="sourceLineNo">313</span>   private final RestException initException;<a name="line.313"></a>
+<span class="sourceLineNo">314</span>   private final RestContext parentContext;<a name="line.314"></a>
+<span class="sourceLineNo">315</span>   private final RestResourceResolver resourceResolver;<a name="line.315"></a>
+<span class="sourceLineNo">316</span><a name="line.316"></a>
+<span class="sourceLineNo">317</span>   // Lifecycle methods<a name="line.317"></a>
+<span class="sourceLineNo">318</span>   private final Method[]<a name="line.318"></a>
+<span class="sourceLineNo">319</span>      postInitMethods,<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      postInitChildFirstMethods,<a name="line.320"></a>
+<span class="sourceLineNo">321</span>      preCallMethods,<a name="line.321"></a>
+<span class="sourceLineNo">322</span>      postCallMethods,<a name="line.322"></a>
+<span class="sourceLineNo">323</span>      startCallMethods,<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      endCallMethods,<a name="line.324"></a>
+<span class="sourceLineNo">325</span>      destroyMethods;<a name="line.325"></a>
+<span class="sourceLineNo">326</span>   private final RestParam[][]<a name="line.326"></a>
+<span class="sourceLineNo">327</span>      preCallMethodParams,<a name="line.327"></a>
+<span class="sourceLineNo">328</span>      postCallMethodParams;<a name="line.328"></a>
+<span class="sourceLineNo">329</span>   private final Class&lt;?&gt;[][]<a name="line.329"></a>
+<span class="sourceLineNo">330</span>      postInitMethodParams,<a name="line.330"></a>
+<span class="sourceLineNo">331</span>      postInitChildFirstMethodParams,<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      startCallMethodParams,<a name="line.332"></a>
+<span class="sourceLineNo">333</span>      endCallMethodParams,<a name="line.333"></a>
+<span class="sourceLineNo">334</span>      destroyMethodParams;<a name="line.334"></a>
+<span class="sourceLineNo">335</span><a name="line.335"></a>
+<span class="sourceLineNo">336</span>   // In-memory cache of images and stylesheets in the org.apache.juneau.rest.htdocs package.<a name="line.336"></a>
+<span class="sourceLineNo">337</span>   private final Map&lt;String,StreamResource&gt; staticFilesCache = new ConcurrentHashMap&lt;String,StreamResource&gt;();<a name="line.337"></a>
+<span class="sourceLineNo">338</span><a name="line.338"></a>
+<span class="sourceLineNo">339</span>   private final ResourceFinder resourceFinder;<a name="line.339"></a>
+<span class="sourceLineNo">340</span>   private final ConcurrentHashMap&lt;Integer,AtomicInteger&gt; stackTraceHashes = new ConcurrentHashMap&lt;Integer,AtomicInteger&gt;();<a name="line.340"></a>
 <span class="sourceLineNo">341</span><a name="line.341"></a>
-<span class="sourceLineNo">342</span>   /**<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    * Constructor.<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    *<a name="line.344"></a>
-<span class="sourceLineNo">345</span>    * @param resource The resource class (a class annotated with {@link RestResource @RestResource}).<a name="line.345"></a>
-<span class="sourceLineNo">346</span>    * @param servletContext<a name="line.346"></a>
-<span class="sourceLineNo">347</span>    *    The servlet context object.<a name="line.347"></a>
-<span class="sourceLineNo">348</span>    *    Can be &lt;jk&gt;null&lt;/jk&gt; if this isn't a<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    * @param config The servlet configuration object.<a name="line.349"></a>
-<span class="sourceLineNo">350</span>    * @throws Exception If any initialization problems were encountered.<a name="line.350"></a>
-<span class="sourceLineNo">351</span>    */<a name="line.351"></a>
-<span class="sourceLineNo">352</span>   @SuppressWarnings("unchecked")<a name="line.352"></a>
-<span class="sourceLineNo">353</span>   public RestContext(Object resource, ServletContext servletContext, RestConfig config) throws Exception {<a name="line.353"></a>
-<span class="sourceLineNo">354</span>      super(null);<a name="line.354"></a>
-<span class="sourceLineNo">355</span>      RestException _initException = null;<a name="line.355"></a>
-<span class="sourceLineNo">356</span>      try {<a name="line.356"></a>
-<span class="sourceLineNo">357</span>         this.resource = resource;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>         this.config = config;<a name="line.358"></a>
-<span class="sourceLineNo">359</span>         this.resourceFinder = new ResourceFinder(resource.getClass());<a name="line.359"></a>
-<span class="sourceLineNo">360</span>         this.parentContext = config.parentContext;<a name="line.360"></a>
-<span class="sourceLineNo">361</span><a name="line.361"></a>
-<span class="sourceLineNo">362</span>         Builder b = new Builder(resource, servletContext, config);<a name="line.362"></a>
-<span class="sourceLineNo">363</span>         this.allowHeaderParams = b.allowHeaderParams;<a name="line.363"></a>
-<span class="sourceLineNo">364</span>         this.allowBodyParam = b.allowBodyParam;<a name="line.364"></a>
-<span class="sourceLineNo">365</span>         this.renderResponseStackTraces = b.renderResponseStackTraces;<a name="line.365"></a>
-<span class="sourceLineNo">366</span>         this.useStackTraceHashes = b.useStackTraceHashes;<a name="line.366"></a>
-<span class="sourceLineNo">367</span>         this.allowMethodParams = Collections.unmodifiableSet(b.allowMethodParams);<a name="line.367"></a>
-<span class="sourceLineNo">368</span>         this.defaultCharset = b.defaultCharset;<a name="line.368"></a>
-<span class="sourceLineNo">369</span>         this.paramFormat = b.paramFormat;<a name="line.369"></a>
-<span class="sourceLineNo">370</span>         this.varResolver = b.varResolver;<a name="line.370"></a>
-<span class="sourceLineNo">371</span>         this.configFile = b.configFile;<a name="line.371"></a>
-<span class="sourceLineNo">372</span>         this.properties = b.properties;<a name="line.372"></a>
-<span class="sourceLineNo">373</span>         this.beanFilters = b.beanFilters;<a name="line.373"></a>
-<span class="sourceLineNo">374</span>         this.pojoSwaps = b.pojoSwaps;<a name="line.374"></a>
-<span class="sourceLineNo">375</span>         this.paramResolvers = Collections.unmodifiableMap(b.paramResolvers);<a name="line.375"></a>
-<span class="sourceLineNo">376</span>         this.serializers = b.serializers;<a name="line.376"></a>
-<span class="sourceLineNo">377</span>         this.parsers = b.parsers;<a name="line.377"></a>
-<span class="sourceLineNo">378</span>         this.urlEncodingSerializer = b.urlEncodingSerializer;<a name="line.378"></a>
-<span class="sourceLineNo">379</span>         this.urlEncodingParser = b.urlEncodingParser;<a name="line.379"></a>
-<span class="sourceLineNo">380</span>         this.encoders = b.encoders;<a name="line.380"></a>
-<span class="sourceLineNo">381</span>         this.supportedContentTypes = toObjectArray(b.supportedContentTypes, MediaType.class);<a name="line.381"></a>
-<span class="sourceLineNo">382</span>         this.supportedAcceptTypes = toObjectArray(b.supportedAcceptTypes, MediaType.class);<a name="line.382"></a>
-<span class="sourceLineNo">383</span>         this.clientVersionHeader = b.clientVersionHeader;<a name="line.383"></a>
-<span class="sourceLineNo">384</span>         this.defaultRequestHeaders = Collections.unmodifiableMap(b.defaultRequestHeaders);<a name="line.384"></a>
-<span class="sourceLineNo">385</span>         this.defaultResponseHeaders = Collections.unmodifiableMap(b.defaultResponseHeaders);<a name="line.385"></a>
-<span class="sourceLineNo">386</span>         this.beanContext = b.beanContext;<a name="line.386"></a>
-<span class="sourceLineNo">387</span>         this.converters = b.converters.toArray(new RestConverter[b.converters.size()]);<a name="line.387"></a>
-<span class="sourceLineNo">388</span>         this.guards = b.guards.toArray(new RestGuard[b.guards.size()]);<a name="line.388"></a>
-<span class="sourceLineNo">389</span>         this.responseHandlers = toObjectArray(b.responseHandlers, ResponseHandler.class);<a name="line.389"></a>
-<span class="sourceLineNo">390</span>         this.mimetypesFileTypeMap = b.mimetypesFileTypeMap;<a name="line.390"></a>
-<span class="sourceLineNo">391</span>         this.favIcon = b.favIcon;<a name="line.391"></a>
-<span class="sourceLineNo">392</span>         this.staticFilesMap = Collections.unmodifiableMap(b.staticFilesMap);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>         this.staticFilesPrefixes = b.staticFilesPrefixes;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>         this.msgs = b.messageBundle;<a name="line.394"></a>
-<span class="sourceLineNo">395</span>         this.childResources = Collections.synchronizedMap(new LinkedHashMap&lt;String,RestContext&gt;());  // Not unmodifiable on purpose so that children can be replaced.<a name="line.395"></a>
-<span class="sourceLineNo">396</span>         this.logger = b.logger;<a name="line.396"></a>
-<span class="sourceLineNo">397</span>         this.fullPath = b.fullPath;<a name="line.397"></a>
-<span class="sourceLineNo">398</span><a name="line.398"></a>
-<span class="sourceLineNo">399</span>         this.htmlWidgets = Collections.unmodifiableMap(b.htmlWidgets);<a name="line.399"></a>
-<span class="sourceLineNo">400</span>         this.htmlHeader = b.htmlHeader;<a name="line.400"></a>
-<span class="sourceLineNo">401</span>         this.htmlLinks = b.htmlLinks;<a name="line.401"></a>
-<span class="sourceLineNo">402</span>         this.htmlNav = b.htmlNav;<a name="line.402"></a>
-<span class="sourceLineNo">403</span>         this.htmlAside = b.htmlAside;<a name="line.403"></a>
-<span class="sourceLineNo">404</span>         this.htmlStyle = b.htmlStyle;<a name="line.404"></a>
-<span class="sourceLineNo">405</span>         this.htmlStylesheet = b.htmlStylesheet;<a name="line.405"></a>
-<span class="sourceLineNo">406</span>         this.htmlScript = b.htmlScript;<a name="line.406"></a>
-<span class="sourceLineNo">407</span>         this.htmlFooter = b.htmlFooter;<a name="line.407"></a>
-<span class="sourceLineNo">408</span>         this.htmlNoWrap = b.htmlNoWrap;<a name="line.408"></a>
-<span class="sourceLineNo">409</span>         this.htmlNoResultsMessage = b.htmlNoResultsMessage;<a name="line.409"></a>
-<span class="sourceLineNo">410</span>         this.htmlTemplate = b.htmlTemplate;<a name="line.410"></a>
-<span class="sourceLineNo">411</span><a name="line.411"></a>
-<span class="sourceLineNo">412</span>         //----------------------------------------------------------------------------------------------------<a name="line.412"></a>
-<span class="sourceLineNo">413</span>         // Initialize the child resources.<a name="line.413"></a>
-<span class="sourceLineNo">414</span>         // Done after initializing fields above since we pass this object to the child resources.<a name="line.414"></a>
-<span class="sourceLineNo">415</span>         //----------------------------------------------------------------------------------------------------<a name="line.415"></a>
-<span class="sourceLineNo">416</span>         List&lt;String&gt; methodsFound = new LinkedList&lt;String&gt;();   // Temporary to help debug transient duplicate method issue.<a name="line.416"></a>
-<span class="sourceLineNo">417</span>         Map&lt;String,CallRouter.Builder&gt; routers = new LinkedHashMap&lt;String,CallRouter.Builder&gt;();<a name="line.417"></a>
-<span class="sourceLineNo">418</span>         Map&lt;String,CallMethod&gt; _javaRestMethods = new LinkedHashMap&lt;String,CallMethod&gt;();<a name="line.418"></a>
-<span class="sourceLineNo">419</span>         Map&lt;String,Method&gt;<a name="line.419"></a>
-<span class="sourceLineNo">420</span>            _startCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.420"></a>
-<span class="sourceLineNo">421</span>            _preCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.421"></a>
-<span class="sourceLineNo">422</span>            _postCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.422"></a>
-<span class="sourceLineNo">423</span>            _endCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.423"></a>
-<span class="sourceLineNo">424</span>            _postInitMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.424"></a>
-<span class="sourceLineNo">425</span>            _postInitChildFirstMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.425"></a>
-<span class="sourceLineNo">426</span>            _destroyMethods = new LinkedHashMap&lt;String,Method&gt;();<a name="line.426"></a>
-<span class="sourceLineNo">427</span>         List&lt;RestParam[]&gt;<a name="line.427"></a>
-<span class="sourceLineNo">428</span>            _preCallMethodParams = new ArrayList&lt;RestParam[]&gt;(),<a name="line.428"></a>
-<span class="sourceLineNo">429</span>            _postCallMethodParams = new ArrayList&lt;RestParam[]&gt;();<a name="line.429"></a>
-<span class="sourceLineNo">430</span>         List&lt;Class&lt;?&gt;[]&gt;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>            _startCallMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.431"></a>
-<span class="sourceLineNo">432</span>            _endCallMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.432"></a>
-<span class="sourceLineNo">433</span>            _postInitMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.433"></a>
-<span class="sourceLineNo">434</span>            _postInitChildFirstMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.434"></a>
-<span class="sourceLineNo">435</span>            _destroyMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;();<a name="line.435"></a>
-<span class="sourceLineNo">436</span><a name="line.436"></a>
-<span class="sourceLineNo">437</span>         for (java.lang.reflect.Method method : resource.getClass().getMethods()) {<a name="line.437"></a>
-<span class="sourceLineNo">438</span>            if (method.isAnnotationPresent(RestMethod.class)) {<a name="line.438"></a>
-<span class="sourceLineNo">439</span>               RestMethod a = method.getAnnotation(RestMethod.class);<a name="line.439"></a>
-<span class="sourceLineNo">440</span>               methodsFound.add(method.getName() + "," + a.name() + "," + a.path());<a name="line.440"></a>
-<span class="sourceLineNo">441</span>               try {<a name="line.441"></a>
-<span class="sourceLineNo">442</span>                  if (! Modifier.isPublic(method.getModifiers()))<a name="line.442"></a>
-<span class="sourceLineNo">443</span>                     throw new RestServletException("@RestMethod method {0}.{1} must be defined as public.", this.getClass().getName(), method.getName());<a name="line.443"></a>
-<span class="sourceLineNo">444</span><a name="line.444"></a>
-<span class="sourceLineNo">445</span>                  CallMethod sm = new CallMethod(resource, method, this);<a name="line.445"></a>
-<span class="sourceLineNo">446</span>                  String httpMethod = sm.getHttpMethod();<a name="line.446"></a>
-<span class="sourceLineNo">447</span><a name="line.447"></a>
-<span class="sourceLineNo">448</span>                  // PROXY is a special case where a method returns an interface that we<a name="line.448"></a>
-<span class="sourceLineNo">449</span>                  // can perform REST calls against.<a name="line.449"></a>
-<span class="sourceLineNo">450</span>                  // We override the CallMethod.invoke() method to insert our logic.<a name="line.450"></a>
-<span class="sourceLineNo">451</span>                  if ("PROXY".equals(httpMethod)) {<a name="line.451"></a>
-<span class="sourceLineNo">452</span><a name="line.452"></a>
-<span class="sourceLineNo">453</span>                     final ClassMeta&lt;?&gt; interfaceClass = beanContext.getClassMeta(method.getGenericReturnType());<a name="line.453"></a>
-<span class="sourceLineNo">454</span>                     final Map&lt;String,Method&gt; remoteableMethods = interfaceClass.getRemoteableMethods();<a name="line.454"></a>
-<span class="sourceLineNo">455</span>                     if (remoteableMethods.isEmpty())<a name="line.455"></a>
-<span class="sourceLineNo">456</span>                        throw new RestException(SC_INTERNAL_SERVER_ERROR, "Method {0} returns an interface {1} that doesn't define any remoteable methods.", getMethodSignature(method), interfaceClass.getReadableName());<a name="line.456"></a>
-<span class="sourceLineNo">457</span><a name="line.457"></a>
-<span class="sourceLineNo">458</span>                     sm = new CallMethod(resource, method, this) {<a name="line.458"></a>
+<span class="sourceLineNo">342</span><a name="line.342"></a>
+<span class="sourceLineNo">343</span>   /**<a name="line.343"></a>
+<span class="sourceLineNo">344</span>    * Constructor.<a name="line.344"></a>
+<span class="sourceLineNo">345</span>    *<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    * @param resource The resource class (a class annotated with {@link RestResource @RestResource}).<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    * @param servletContext<a name="line.347"></a>
+<span class="sourceLineNo">348</span>    *    The servlet context object.<a name="line.348"></a>
+<span class="sourceLineNo">349</span>    *    Can be &lt;jk&gt;null&lt;/jk&gt; if this isn't a<a name="line.349"></a>
+<span class="sourceLineNo">350</span>    * @param config The servlet configuration object.<a name="line.350"></a>
+<span class="sourceLineNo">351</span>    * @throws Exception If any initialization problems were encountered.<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    */<a name="line.352"></a>
+<span class="sourceLineNo">353</span>   @SuppressWarnings("unchecked")<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   public RestContext(Object resource, ServletContext servletContext, RestConfig config) throws Exception {<a name="line.354"></a>
+<span class="sourceLineNo">355</span>      super(null);<a name="line.355"></a>
+<span class="sourceLineNo">356</span>      RestException _initException = null;<a name="line.356"></a>
+<span class="sourceLineNo">357</span>      try {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>         this.resource = resource;<a name="line.358"></a>
+<span class="sourceLineNo">359</span>         this.config = config;<a name="line.359"></a>
+<span class="sourceLineNo">360</span>         this.resourceFinder = new ResourceFinder(resource.getClass());<a name="line.360"></a>
+<span class="sourceLineNo">361</span>         this.parentContext = config.parentContext;<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span>         Builder b = new Builder(resource, servletContext, config);<a name="line.363"></a>
+<span class="sourceLineNo">364</span>         this.allowHeaderParams = b.allowHeaderParams;<a name="line.364"></a>
+<span class="sourceLineNo">365</span>         this.allowBodyParam = b.allowBodyParam;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>         this.renderResponseStackTraces = b.renderResponseStackTraces;<a name="line.366"></a>
+<span class="sourceLineNo">367</span>         this.useStackTraceHashes = b.useStackTraceHashes;<a name="line.367"></a>
+<span class="sourceLineNo">368</span>         this.allowMethodParams = Collections.unmodifiableSet(b.allowMethodParams);<a name="line.368"></a>
+<span class="sourceLineNo">369</span>         this.defaultCharset = b.defaultCharset;<a name="line.369"></a>
+<span class="sourceLineNo">370</span>         this.paramFormat = b.paramFormat;<a name="line.370"></a>
+<span class="sourceLineNo">371</span>         this.varResolver = b.varResolver;<a name="line.371"></a>
+<span class="sourceLineNo">372</span>         this.configFile = b.configFile;<a name="line.372"></a>
+<span class="sourceLineNo">373</span>         this.properties = b.properties;<a name="line.373"></a>
+<span class="sourceLineNo">374</span>         this.beanFilters = b.beanFilters;<a name="line.374"></a>
+<span class="sourceLineNo">375</span>         this.pojoSwaps = b.pojoSwaps;<a name="line.375"></a>
+<span class="sourceLineNo">376</span>         this.paramResolvers = Collections.unmodifiableMap(b.paramResolvers);<a name="line.376"></a>
+<span class="sourceLineNo">377</span>         this.serializers = b.serializers;<a name="line.377"></a>
+<span class="sourceLineNo">378</span>         this.parsers = b.parsers;<a name="line.378"></a>
+<span class="sourceLineNo">379</span>         this.urlEncodingSerializer = b.urlEncodingSerializer;<a name="line.379"></a>
+<span class="sourceLineNo">380</span>         this.urlEncodingParser = b.urlEncodingParser;<a name="line.380"></a>
+<span class="sourceLineNo">381</span>         this.encoders = b.encoders;<a name="line.381"></a>
+<span class="sourceLineNo">382</span>         this.supportedContentTypes = toObjectArray(b.supportedContentTypes, MediaType.class);<a name="line.382"></a>
+<span class="sourceLineNo">383</span>         this.supportedAcceptTypes = toObjectArray(b.supportedAcceptTypes, MediaType.class);<a name="line.383"></a>
+<span class="sourceLineNo">384</span>         this.clientVersionHeader = b.clientVersionHeader;<a name="line.384"></a>
+<span class="sourceLineNo">385</span>         this.defaultRequestHeaders = Collections.unmodifiableMap(b.defaultRequestHeaders);<a name="line.385"></a>
+<span class="sourceLineNo">386</span>         this.defaultResponseHeaders = Collections.unmodifiableMap(b.defaultResponseHeaders);<a name="line.386"></a>
+<span class="sourceLineNo">387</span>         this.beanContext = b.beanContext;<a name="line.387"></a>
+<span class="sourceLineNo">388</span>         this.converters = b.converters.toArray(new RestConverter[b.converters.size()]);<a name="line.388"></a>
+<span class="sourceLineNo">389</span>         this.guards = b.guards.toArray(new RestGuard[b.guards.size()]);<a name="line.389"></a>
+<span class="sourceLineNo">390</span>         this.responseHandlers = toObjectArray(b.responseHandlers, ResponseHandler.class);<a name="line.390"></a>
+<span class="sourceLineNo">391</span>         this.mimetypesFileTypeMap = b.mimetypesFileTypeMap;<a name="line.391"></a>
+<span class="sourceLineNo">392</span>         this.favIcon = b.favIcon;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>         this.staticFilesMap = Collections.unmodifiableMap(b.staticFilesMap);<a name="line.393"></a>
+<span class="sourceLineNo">394</span>         this.staticFilesPrefixes = b.staticFilesPrefixes;<a name="line.394"></a>
+<span class="sourceLineNo">395</span>         this.msgs = b.messageBundle;<a name="line.395"></a>
+<span class="sourceLineNo">396</span>         this.childResources = Collections.synchronizedMap(new LinkedHashMap&lt;String,RestContext&gt;());  // Not unmodifiable on purpose so that children can be replaced.<a name="line.396"></a>
+<span class="sourceLineNo">397</span>         this.logger = b.logger;<a name="line.397"></a>
+<span class="sourceLineNo">398</span>         this.fullPath = b.fullPath;<a name="line.398"></a>
+<span class="sourceLineNo">399</span>         this.contextPath = nullIfEmpty(b.contextPath);<a name="line.399"></a>
+<span class="sourceLineNo">400</span><a name="line.400"></a>
+<span class="sourceLineNo">401</span>         this.htmlWidgets = Collections.unmodifiableMap(b.htmlWidgets);<a name="line.401"></a>
+<span class="sourceLineNo">402</span>         this.htmlHeader = b.htmlHeader;<a name="line.402"></a>
+<span class="sourceLineNo">403</span>         this.htmlLinks = b.htmlLinks;<a name="line.403"></a>
+<span class="sourceLineNo">404</span>         this.htmlNav = b.htmlNav;<a name="line.404"></a>
+<span class="sourceLineNo">405</span>         this.htmlAside = b.htmlAside;<a name="line.405"></a>
+<span class="sourceLineNo">406</span>         this.htmlStyle = b.htmlStyle;<a name="line.406"></a>
+<span class="sourceLineNo">407</span>         this.htmlStylesheet = b.htmlStylesheet;<a name="line.407"></a>
+<span class="sourceLineNo">408</span>         this.htmlScript = b.htmlScript;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>         this.htmlFooter = b.htmlFooter;<a name="line.409"></a>
+<span class="sourceLineNo">410</span>         this.htmlNoWrap = b.htmlNoWrap;<a name="line.410"></a>
+<span class="sourceLineNo">411</span>         this.htmlNoResultsMessage = b.htmlNoResultsMessage;<a name="line.411"></a>
+<span class="sourceLineNo">412</span>         this.htmlTemplate = b.htmlTemplate;<a name="line.412"></a>
+<span class="sourceLineNo">413</span><a name="line.413"></a>
+<span class="sourceLineNo">414</span>         //----------------------------------------------------------------------------------------------------<a name="line.414"></a>
+<span class="sourceLineNo">415</span>         // Initialize the child resources.<a name="line.415"></a>
+<span class="sourceLineNo">416</span>         // Done after initializing fields above since we pass this object to the child resources.<a name="line.416"></a>
+<span class="sourceLineNo">417</span>         //----------------------------------------------------------------------------------------------------<a name="line.417"></a>
+<span class="sourceLineNo">418</span>         List&lt;String&gt; methodsFound = new LinkedList&lt;String&gt;();   // Temporary to help debug transient duplicate method issue.<a name="line.418"></a>
+<span class="sourceLineNo">419</span>         Map&lt;String,CallRouter.Builder&gt; routers = new LinkedHashMap&lt;String,CallRouter.Builder&gt;();<a name="line.419"></a>
+<span class="sourceLineNo">420</span>         Map&lt;String,CallMethod&gt; _javaRestMethods = new LinkedHashMap&lt;String,CallMethod&gt;();<a name="line.420"></a>
+<span class="sourceLineNo">421</span>         Map&lt;String,Method&gt;<a name="line.421"></a>
+<span class="sourceLineNo">422</span>            _startCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.422"></a>
+<span class="sourceLineNo">423</span>            _preCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.423"></a>
+<span class="sourceLineNo">424</span>            _postCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.424"></a>
+<span class="sourceLineNo">425</span>            _endCallMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.425"></a>
+<span class="sourceLineNo">426</span>            _postInitMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.426"></a>
+<span class="sourceLineNo">427</span>            _postInitChildFirstMethods = new LinkedHashMap&lt;String,Method&gt;(),<a name="line.427"></a>
+<span class="sourceLineNo">428</span>            _destroyMethods = new LinkedHashMap&lt;String,Method&gt;();<a name="line.428"></a>
+<span class="sourceLineNo">429</span>         List&lt;RestParam[]&gt;<a name="line.429"></a>
+<span class="sourceLineNo">430</span>            _preCallMethodParams = new ArrayList&lt;RestParam[]&gt;(),<a name="line.430"></a>
+<span class="sourceLineNo">431</span>            _postCallMethodParams = new ArrayList&lt;RestParam[]&gt;();<a name="line.431"></a>
+<span class="sourceLineNo">432</span>         List&lt;Class&lt;?&gt;[]&gt;<a name="line.432"></a>
+<span class="sourceLineNo">433</span>            _startCallMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.433"></a>
+<span class="sourceLineNo">434</span>            _endCallMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.434"></a>
+<span class="sourceLineNo">435</span>            _postInitMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.435"></a>
+<span class="sourceLineNo">436</span>            _postInitChildFirstMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;(),<a name="line.436"></a>
+<span class="sourceLineNo">437</span>            _destroyMethodParams = new ArrayList&lt;Class&lt;?&gt;[]&gt;();<a name="line.437"></a>
+<span class="sourceLineNo">438</span><a name="line.438"></a>
+<span class="sourceLineNo">439</span>         for (java.lang.reflect.Method method : resource.getClass().getMethods()) {<a name="line.439"></a>
+<span class="sourceLineNo">440</span>            if (method.isAnnotationPresent(RestMethod.class)) {<a name="line.440"></a>
+<span class="sourceLineNo">441</span>               RestMethod a = method.getAnnotation(RestMethod.class);<a name="line.441"></a>
+<span class="sourceLineNo">442</span>               methodsFound.add(method.getName() + "," + a.name() + "," + a.path());<a name="line.442"></a>
+<span class="sourceLineNo">443</span>               try {<a name="line.443"></a>
+<span class="sourceLineNo">444</span>                  if (! Modifier.isPublic(method.getModifiers()))<a name="line.444"></a>
+<span class="sourceLineNo">445</span>                     throw new RestServletException("@RestMethod method {0}.{1} must be defined as public.", this.getClass().getName(), method.getName());<a name="line.445"></a>
+<span class="sourceLineNo">446</span><a name="line.446"></a>
+<span class="sourceLineNo">447</span>                  CallMethod sm = new CallMethod(resource, method, this);<a name="line.447"></a>
+<span class="sourceLineNo">448</span>                  String httpMethod = sm.getHttpMethod();<a name="line.448"></a>
+<span class="sourceLineNo">449</span><a name="line.449"></a>
+<span class="sourceLineNo">450</span>                  // PROXY is a special case where a method returns an interface that we<a name="line.450"></a>
+<span class="sourceLineNo">451</span>                  // can perform REST calls against.<a name="line.451"></a>
+<span class="sourceLineNo">452</span>                  // We override the CallMethod.invoke() method to insert our logic.<a name="line.452"></a>
+<span class="sourceLineNo">453</span>                  if ("PROXY".equals(httpMethod)) {<a name="line.453"></a>
+<span class="sourceLineNo">454</span><a name="line.454"></a>
+<span class="sourceLineNo">455</span>                     final ClassMeta&lt;?&gt; interfaceClass = beanContext.getClassMeta(method.getGenericReturnType());<a name="line.455"></a>
+<span class="sourceLineNo">456</span>                     final Map&lt;String,Method&gt; remoteableMethods = interfaceClass.getRemoteableMethods();<a name="line.456"></a>
+<span class="sourceLineNo">457</span>                     if (remoteableMethods.isEmpty())<a name="line.457"></a>
+<span class="sourceLineNo">458</span>                        throw new RestException(SC_INTERNAL_SERVER_ERROR, "Method {0} returns an interface {1} that doesn't define any remoteable methods.", getMethodSignature(method), interfaceClass.getReadableName());<a name="line.458"></a>
 <span class="sourceLineNo">459</span><a name="line.459"></a>
-<span class="sourceLineNo">460</span>                        @Override<a name="line.460"></a>
-<span class="sourceLineNo">461</span>                        int invoke(String pathInfo, RestRequest req, RestResponse res) throws RestException {<a name="line.461"></a>
-<span class="sourceLineNo">462</span><a name="line.462"></a>
-<span class="sourceLineNo">463</span>                           int rc = super.invoke(pathInfo, req, res);<a name="line.463"></a>
-<span class="sourceLineNo">464</span>                           if (rc != SC_OK)<a name="line.464"></a>
-<span class="sourceLineNo">465</span>                              return rc;<a name="line.465"></a>
-<span class="sourceLineNo">466</span><a name="line.466"></a>
-<span class="sourceLineNo">467</span>                           final Object o = res.getOutput();<a name="line.467"></a>
+<span class="sourceLineNo">460</span>                     sm = new CallMethod(resource, method, this) {<a name="line.460"></a>
+<span class="sourceLineNo">461</span><a name="line.461"></a>
+<span class="sourceLineNo">462</span>                        @Override<a name="line.462"></a>
+<span class="sourceLineNo">463</span>                        int invoke(String pathInfo, RestRequest req, RestResponse res) throws RestException {<a name="line.463"></a>
+<span class="sourceLineNo">464</span><a name="line.464"></a>
+<span class="sourceLineNo">465</span>                           int rc = super.invoke(pathInfo, req, res);<a name="line.465"></a>
+<span class="sourceLineNo">466</span>                           if (rc != SC_OK)<a name="line.466"></a>
+<span class="sourceLineNo">467</span>                              return rc;<a name="line.467"></a>
 <span class="sourceLineNo">468</span><a name="line.468"></a>
-<span class="sourceLineNo">469</span>                           if ("GET".equals(req.getMethod())) {<a name="line.469"></a>
-<span class="sourceLineNo">470</span>                              res.setOutput(getMethodInfo(remoteableMethods.values()));<a name="line.470"></a>
-<span class="sourceLineNo">471</span>                              return SC_OK;<a name="line.471"></a>
-<span class="sourceLineNo">472</span><a name="line.472"></a>
-<span class="sourceLineNo">473</span>                           } else if ("POST".equals(req.getMethod())) {<a name="line.473"></a>
-<span class="sourceLineNo">474</span>                              if (pathInfo.indexOf('/') != -1)<a name="line.474"></a>
-<span class="sourceLineNo">475</span>                                 pathInfo = pathInfo.substring(pathInfo.lastIndexOf('/')+1);<a name="line.475"></a>
-<span class="sourceLineNo">476</span>                              pathInfo = urlDecode(pathInfo);<a name="line.476"></a>
-<span class="sourceLineNo">477</span>                              java.lang.reflect.Method m = remoteableMethods.get(pathInfo);<a name="line.477"></a>
-<span class="sourceLineNo">478</span>                              if (m != null) {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>                                 try {<a name="line.479"></a>
-<span class="sourceLineNo">480</span>                                    // Parse the args and invoke the method.<a name="line.480"></a>
-<span class="sourceLineNo">481</span>                                    Parser p = req.getBody().getParser();<a name="line.481"></a>
-<span class="sourceLineNo">482</span>                                    Object input = p.isReaderParser() ? req.getReader() : req.getInputStream();<a name="line.482"></a>
-<span class="sourceLineNo">483</span>                                    Object output = m.invoke(o, p.parseArgs(input, m.getGenericParameterTypes()));<a name="line.483"></a>
-<span class="sourceLineNo">484</span>                                    res.setOutput(output);<a name="line.484"></a>
-<span class="sourceLineNo">485</span>                                    return SC_OK;<a name="line.485"></a>
-<span class="sourceLineNo">486</span>                                 } catch (Exception e) {<a name="line.486"></a>
-<span class="sourceLineNo">487</span>                                    throw new RestException(SC_INTERNAL_SERVER_ERROR, e);<a name="line.487"></a>
-<span class="sourceLineNo">488</span>                                 }<a name="line.488"></a>
-<span class="sourceLineNo">489</span>                              }<a name="line.489"></a>
-<span class="sourceLineNo">490</span>                           }<a name="line.490"></a>
-<span class="sourceLineNo">491</span>                           return SC_NOT_FOUND;<a name="line.491"></a>
-<span class="sourceLineNo">492</span>                        }<a name="line.492"></a>
-<span class="sourceLineNo">493</span>                     };<a name="line.493"></a>
-<span class="sourceLineNo">494</span><a name="line.494"></a>
-<span class="sourceLineNo">495</span>                     _javaRestMethods.put(method.getName(), sm);<a name="line.495"></a>
-<span class="sourceLineNo">496</span>                     addToRouter(routers, "GET", sm);<a name="line.496"></a>
-<span class="sourceLineNo">497</span>                     addToRouter(routers, "POST", sm);<a name="line.497"></a>
-<span class="sourceLineNo">498</span><a name="line.498"></a>
-<span class="sourceLineNo">499</span>                  } else {<a name="line.499"></a>
-<span class="sourceLineNo">500</span>                     _javaRestMethods.put(method.getName(), sm);<a name="line.500"></a>
-<span class="sourceLineNo">501</span>                     addToRouter(routers, httpMethod, sm);<a name="line.501"></a>
-<span class="sourceLineNo">502</span>                  }<a name="line.502"></a>
-<span class="sourceLineNo">503</span>               } catch (RestServletException e) {<a name="line.503"></a>
-<span class="sourceLineNo">504</span>                  throw new RestServletException("Problem occurred trying to serialize methods on class {0}, methods={1}", this.getClass().getName(), JsonSerializer.DEFAULT_LAX.serialize(methodsFound)).initCause(e);<a name="line.504"></a>
-<span class="sourceLineNo">505</span>               }<a name="line.505"></a>
-<span class="sourceLineNo">506</span>            }<a name="line.506"></a>
-<span class="sourceLineNo">507</span>         }<a name="line.507"></a>
-<span class="sourceLineNo">508</span><a name="line.508"></a>
-<span class="sourceLineNo">509</span>         for (Method m : ClassUtils.getAllMethods(resource.getClass(), true)) {<a name="line.509"></a>
-<span class="sourceLineNo">510</span>            if (ClassUtils.isPublic(m) &amp;&amp; m.isAnnotationPresent(RestHook.class)) {<a name="line.510"></a>
-<span class="sourceLineNo">511</span>               HookEvent he = m.getAnnotation(RestHook.class).value();<a name="line.511"></a>
-<span class="sourceLineNo">512</span>               String sig = ClassUtils.getMethodSignature(m);<a name="line.512"></a>
-<span class="sourceLineNo">513</span>               switch(he) {<a name="line.513"></a>
-<span class="sourceLineNo">514</span>                  case PRE_CALL: {<a name="line.514"></a>
-<span class="sourceLineNo">515</span>                     if (! _preCallMethods.containsKey(sig)) {<a name="line.515"></a>
-<span class="sourceLineNo">516</span>                        Visibility.setAccessible(m);<a name="line.516"></a>
-<span class="sourceLineNo">517</span>                        _preCallMethods.put(sig, m);<a name="line.517"></a>
-<span class="sourceLineNo">518</span>                        _preCallMethodParams.add(findParams(m, false, null, true));<a name="line.518"></a>
-<span class="sourceLineNo">519</span>                     }<a name="line.519"></a>
-<span class="sourceLineNo">520</span>                     break;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>                  }<a name="line.521"></a>
-<span class="sourceLineNo">522</span>                  case POST_CALL: {<a name="line.522"></a>
-<span class="sourceLineNo">523</span>                     if (! _postCallMethods.containsKey(sig)) {<a name="line.523"></a>
-<span class="sourceLineNo">524</span>                        Visibility.setAccessible(m);<a name="line.524"></a>
-<span class="sourceLineNo">525</span>                        _postCallMethods.put(sig, m);<a name="line.525"></a>
-<span class="sourceLineNo">526</span>                        _postCallMethodParams.add(findParams(m, false, null, true));<a name="line.526"></a>
-<span class="sourceLineNo">527</span>                     }<a name="line.527"></a>
-<span class="sourceLineNo">528</span>                     break;<a name="line.528"></a>
-<span class="sourceLineNo">529</span>                  }<a name="line.529"></a>
-<span class="sourceLineNo">530</span>                  case START_CALL: {<a name="line.530"></a>
-<span class="sourceLineNo">531</span>                     if (! _startCallMethods.containsKey(sig)) {<a name="line.531"></a>
-<span class="sourceLineNo">532</span>                        Visibility.setAccessible(m);<a name="line.532"></a>
-<span class="sourceLineNo">533</span>                        _startCallMethods.put(sig, m);<a name="line.533"></a>
-<span class="sourceLineNo">534</span>                        _startCallMethodParams.add(m.getParameterTypes());<a name="line.534"></a>
-<span class="sourceLineNo">535</span>                        ClassUtils.assertArgsOfType(m, HttpServletRequest.class, HttpServletResponse.class);<a name="line.535"></a>
-<span class="sourceLineNo">536</span>                     }<a name="line.536"></a>
-<span class="sourceLineNo">537</span>                     break;<a name="line.537"></a>
-<span class="sourceLineNo">538</span>                  }<a name="line.538"></a>
-<span class="sourceLineNo">539</span>                  case END_CALL: {<a name="line.539"></a>
-<span class="sourceLineNo">540</span>                     if (! _endCallMethods.containsKey(sig)) {<a name="line.540"></a>
-<span class="sourceLineNo">541</span>                        Visibility.setAccessible(m);<a name="line.541"></a>
-<span class="sourceLineNo">542</span>                        _endCallMethods.put(sig, m);<a name="line.542"></a>
-<span class="sourceLineNo">543</span>                        _endCallMethodParams.add(m.getParameterTypes());<a name="line.543"></a>
-<span class="sourceLineNo">544</span>                        ClassUtils.assertArgsOfType(m, HttpServletRequest.class, HttpServletResponse.class);<a name="line.544"></a>
-<span class="sourceLineNo">545</span>                     }<a name="line.545"></a>
-<span class="sourceLineNo">546</span>                     break;<a name="line.546"></a>
-<span class="sourceLineNo">547</span>                  }<a name="line.547"></a>
-<span class="sourceLineNo">548</span>                  case POST_INIT: {<a name="line.548"></a>
-<span class="sourceLineNo">549</span>                     if (! _postInitMethods.containsKey(sig)) {<a name="line.549"></a>
-<span class="sourceLineNo">550</span>                        Visibility.setAccessible(m);<a name="line.550"></a>
-<span class="sourceLineNo">551</span>                        _postInitMethods.put(sig, m);<a name="line.551"></a>
-<span class="sourceLineNo">552</span>                        _postInitMethodParams.add(m.getParameterTypes());<a name="line.552"></a>
-<span class="sourceLineNo">553</span>                        ClassUtils.assertArgsOfType(m, RestContext.class);<a name="line.553"></a>
-<span class="sourceLineNo">554</span>                     }<a name="line.554"></a>
-<span class="sourceLineNo">555</span>                     break;<a name="line.555"></a>
-<span class="sourceLineNo">556</span>                  }<a name="line.556"></a>
-<span class="sourceLineNo">557</span>                  case POST_INIT_CHILD_FIRST: {<a name="line.557"></a>
-<span class="sourceLineNo">558</span>                     if (! _postInitChildFirstMethods.containsKey(sig)) {<a name="line.558"></a>
-<span class="sourceLineNo">559</span>                        Visibility.setAccessible(m);<a name="line.559"></a>
-<span class="sourceLineNo">560</span>                        _postInitChildFirstMethods.put(sig, m);<a name="line.560"></a>
-<span class="sourceLineNo">561</span>                        _postInitChildFirstMethodParams.add(m.getParameterTypes());<a name="line.561"></a>
-<span class="sourceLineNo">562</span>                        ClassUtils.assertArgsOfType(m, RestContext.class);<a name="line.562"></a>
-<span class="sourceLineNo">563</span>                     }<a name="line.563"></a>
-<span class="sourceLineNo">564</span>                     break;<a name="line.564"></a>
-<span class="sourceLineNo">565</span>                  }<a name="line.565"></a>
-<span class="sourceLineNo">566</span>                  case DESTROY: {<a name="line.566"></a>
-<span class="sourceLineNo">567</span>                     if (! _destroyMethods.containsKey(sig)) {<a name="line.567"></a>
-<span class="sourceLineNo">568</span>                        Visibility.setAccessible(m);<a name="line.568"></a>
-<span class="sourceLineNo">569</span>                        _destroyMethods.put(sig, m);<a name="line.569"></a>
-<span class="sourceLineNo">570</span>                        _destroyMethodParams.add(m.getParameterTypes());<a name="line.570"></a>
-<span class="sourceLineNo">571</span>                        ClassUtils.assertArgsOfType(m, RestContext.class);<a name="line.571"></a>
-<span class="sourceLineNo">572</span>                     }<a name="line.572"></a>
-<span class="sourceLineNo">573</span>                     break;<a name="line.573"></a>
-<span class="sourceLineNo">574</span>                  }<a name="line.574"></a>
-<span class="sourceLineNo">575</span>                  default: // Ignore INIT<a name="line.575"></a>
-<span class="sourceLineNo">576</span>               }<a name="line.576"></a>
-<span class="sourceLineNo">577</span>            }<a name="line.577"></a>
-<span class="sourceLineNo">578</span>         }<a name="line.578"></a>
-<span class="sourceLineNo">579</span><a name="line.579"></a>
-<span class="sourceLineNo">580</span>         this.callMethods = Collections.unmodifiableMap(_javaRestMethods);<a name="line.580"></a>
-<span class="sourceLineNo">581</span>         this.preCallMethods = _preCallMethods.values().toArray(new Method[_preCallMethods.size()]);<a name="line.581"></a>
-<span class="sourceLineNo">582</span>         this.postCallMethods = _postCallMethods.values().toArray(new Method[_postCallMethods.size()]);<a name="line.582"></a>
-<span class="sourceLineNo">583</span>         this.startCallMethods = _startCallMethods.values().toArray(new Method[_startCallMethods.size()]);<a name="line.583"></a>
-<span class="sourceLineNo">584</span>         this.endCallMethods = _endCallMethods.values().toArray(new Method[_endCallMethods.size()]);<a name="line.584"></a>
-<span class="sourceLineNo">585</span>         this.postInitMethods = _postInitMethods.values().toArray(new Method[_postInitMethods.size()]);<a name="line.585"></a>
-<span class="sourceLineNo">586</span>         this.postInitChildFirstMethods = _postInitChildFirstMethods.values().toArray(new Method[_postInitChildFirstMethods.size()]);<a name="line.586"></a>
-<span class="sourceLineNo">587</span>         this.destroyMethods = _destroyMethods.values().toArray(new Method[_destroyMethods.size()]);<a name="line.587"></a>
-<span class="sourceLineNo">588</span>         this.preCallMethodParams = _preCallMethodParams.toArray(new RestParam[_preCallMethodParams.size()][]);<a name="line.588"></a>
-<span class="sourceLineNo">589</span>         this.postCallMethodParams = _postCallMethodParams.toArray(new RestParam[_postCallMethodParams.size()][]);<a name="line.589"></a>
-<span class="sourceLineNo">590</span>         this.startCallMethodParams = _startCallMethodParams.toArray(new Class[_startCallMethodParams.size()][]);<a name="line.590"></a>
-<span class="sourceLineNo">591</span>         this.endCallMethodParams = _endCallMethodParams.toArray(new Class[_endCallMethodParams.size()][]);<a name="line.591"></a>
-<span class="sourceLineNo">592</span>         this.postInitMethodParams = _postInitMethodParams.toArray(new Class[_postInitMethodParams.size()][]);<a name="line.592"></a>
-<span class="sourceLineNo">593</span>         this.postInitChildFirstMethodParams = _postInitChildFirstMethodParams.toArray(new Class[_postInitChildFirstMethodParams.size()][]);<a name="line.593"></a>
-<span class="sourceLineNo">594</span>         this.destroyMethodParams = _destroyMethodParams.toArray(new Class[_destroyMethodParams.size()][]);<a name="line.594"></a>
-<span class="sourceLineNo">595</span><a name="line.595"></a>
-<span class="sourceLineNo">596</span>         Map&lt;String,CallRouter&gt; _callRouters = new LinkedHashMap&lt;String,CallRouter&gt;();<a name="line.596"></a>
-<span class="sourceLineNo">597</span>         for (CallRouter.Builder crb : routers.values())<a name="line.597"></a>
-<span class="sourceLineNo">598</span>            _callRouters.put(crb.getHttpMethodName(), crb.build());<a name="line.598"></a>
-<span class="sourceLineNo">599</span>         this.callRouters = Collections.unmodifiableMap(_callRouters);<a name="line.599"></a>
-<span class="sourceLineNo">600</span><a name="line.600"></a>
-<span class="sourceLineNo">601</span>         // Initialize our child resources.<a name="line.601"></a>
-<span class="sourceLineNo">602</span>         resourceResolver = resolve(resource, RestResourceResolver.class, b.resourceResolver);<a name="line.602"></a>
-<span class="sourceLineNo">603</span>         for (Object o : config.childResources) {<a name="line.603"></a>
-<span class="sourceLineNo">604</span>            String path = null;<a name="line.604"></a>
-<span class="sourceLineNo">605</span>            Object r = null;<a name="line.605"></a>
-<span class="sourceLineNo">606</span>            if (o instanceof Pair) {<a name="line.606"></a>
-<span class="sourceLineNo">607</span>               Pair&lt;String,Object&gt; p = (Pair&lt;String,Object&gt;)o;<a name="line.607"></a>
-<span class="sourceLineNo">608</span>               path = p.first();<a name="line.608"></a>
-<span class="sourceLineNo">609</span>               r = p.second();<a name="line.609"></a>
-<span class="sourceLineNo">610</span>            } else if (o instanceof Class&lt;?&gt;) {<a name="line.610"></a>
-<span class="sourceLineNo">611</span>               Class&lt;?&gt; c = (Class&lt;?&gt;)o;<a name="line.611"></a>
-<span class="sourceLineNo">612</span>               // Don't allow specifying yourself as a child.  Causes an infinite loop.<a name="line.612"></a>
-<span class="sourceLineNo">613</span>               if (c == config.resourceClass)<a name="line.613"></a>
-<span class="sourceLineNo">614</span>                  continue;<a name="line.614"></a>
-<span class="sourceLineNo">615</span>               r = c;<a name="line.615"></a>
-<span class="sourceLineNo">616</span>            } else {<a name="line.616"></a>
-<span class="sourceLineNo">617</span>               r = o;<a name="line.617"></a>
-<span class="sourceLineNo">618</span>            }<a name="line.618"></a>
-<span class="sourceLineNo">619</span><a name="line.619"></a>
-<span class="sourceLineNo">620</span>            RestConfig childConfig = null;<a name="line.620"></a>
+<span class="sourceLineNo">469</span>                           final Object o = res.getOutput();<a name="line.469"></a>
+<span class="sourceLineNo">470</span><a name="line.470"></a>
+<span class="sourceLineNo">471</span>                           if ("GET".equals(req.getMethod())) {<a name="line.471"></a>
+<span class="sourceLineNo">472</span>                              res.setOutput(getMethodInfo(remoteableMethods.values()));<a name="line.472"></a>
+<span class="sourceLineNo">473</span>                              return SC_OK;<a name="line.473"></a>
+<span class="sourceLineNo">474</span><a name="line.474"></a>
+<span class="sourceLineNo">475</span>                           } else if ("POST".equals(req.getMethod())) {<a name="line.475"></a>
+<span class="sourceLineNo">476</span>                              if (pathInfo.indexOf('/') != -1)<a name="line.476"></a>
+<span class="sourceLineNo">477</span>                                 pathInfo = pathInfo.substring(pathInfo.lastIndexOf('/')+1);<a name="line.477"></a>
+<span class="sourceLineNo">478</span>                              pathInfo = urlDecode(pathInfo);<a name="line.478"></a>
+<span class="sourceLineNo">479</span>                              java.lang.reflect.Method m = remoteableMethods.get(pathInfo);<a name="line.479"></a>
+<span class="sourceLineNo">480</span>                              if (m != null) {<a name="line.480"></a>
+<span class="sourceLineNo">481</span>                                 try {<a name="line.481"></a>
+<span class="sourceLineNo">482</span>                                    // Parse the args and invoke the method.<a name="line.482"></a>
+<span class="sourceLineNo">483</span>                                    Parser p = req.getBody().getParser();<a name="line.483"></a>
+<span class="sourceLineNo">484</span>                                    Object input = p.isReaderParser() ? req.getReader() : req.getInputStream();<a name="line.484"></a>
+<span class="sourceLineNo">485</span>                                    Object output = m.invoke(o, p.parseArgs(input, m.getGenericParameterTypes()));<a name="line.485"></a>
+<span class="sourceLineNo">486</span>                                    res.setOutput(output);<a name="line.486"></a>
+<span class="sourceLineNo">487</span>                                    return SC_OK;<a name="line.487"></a>
+<span class="sourceLineNo">488</span>                                 } catch (Exception e) {<a name="line.488"></a>
+<span class="sourceLineNo">489</span>                                    throw new RestException(SC_INTERNAL_SERVER_ERROR, e);<a name="line.489"></a>
+<span class="sourceLineNo">490</span>                                 }<a name="line.490"></a>
+<span class="sourceLineNo">491</span>                              }<a name="line.491"></a>
+<span class="sourceLineNo">492</span>                           }<a name="line.492"></a>
+<span class="sourceLineNo">493</span>                           return SC_NOT_FOUND;<a name="line.493"></a>
+<span class="sourceLineNo">494</span>                        }<a name="line.494"></a>
+<span class="sourceLineNo">495</span>                     };<a name="line.495"></a>
+<span class="sourceLineNo">496</span><a name="line.496"></a>
+<span class="sourceLineNo">497</span>                     _javaRestMethods.put(method.getName(), sm);<a name="line.497"></a>
+<span class="sourceLineNo">498</span>                     addToRouter(routers, "GET", sm);<a name="line.498"></a>
+<span class="sourceLineNo">499</span>                     addToRouter(routers, "POST", sm);<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>                  } else {<a name="line.501"></a>
+<span class="sourceLineNo">502</span>                     _javaRestMethods.put(method.getName(), sm);<a name="line.502"></a>
+<span class="sourceLineNo">503</span>                     addToRouter(routers, httpMethod, sm);<a name="line.503"></a>
+<span class="sourceLineNo">504</span>                  }<a name="line.504"></a>
+<span class="sourceLineNo">505</span>               } catch (RestServletException e) {<a name="line.505"></a>
+<span class="sourceLineNo">506</span>                  throw new RestServletException("Problem occurred trying to serialize methods on class {0}, methods={1}", this.getClass().getName(), JsonSerializer.DEFAULT_LAX.serialize(methodsFound)).initCause(e);<a name="line.506"></a>
+<span class="sourceLineNo">507</span>               }<a name="line.507"></a>
+<span class="sourceLineNo">508</span>            }<a name="line.508"></a>
+<span class="sourceLineNo">509</span>         }<a name="line.509"></a>
+<span class="sourceLineNo">510</span><a name="line.510"></a>
+<span class="sourceLineNo">511</span>         for (Method m : ClassUtils.getAllMethods(resource.getClass(), true)) {<a name="line.511"></a>
+<span class="sourceLineNo">512</span>            if (ClassUtils.isPublic(m) &amp;&amp; m.isAnnotationPresent(RestHook.class)) {<a name="line.512"></a>
+<span class="sourceLineNo">513</span>               HookEvent he = m.getAnnotation(RestHook.class).value();<a name="line.513"></a>
+<span class="sourceLineNo">514</span>               String sig = ClassUtils.getMethodSignature(m);<a name="line.514"></a>
+<span class="sourceLineNo">515</span>               switch(he) {<a name="line.515"></a>
+<span class="sourceLineNo">516</span>                  case PRE_CALL: {<a name="line.516"></a>
+<span class="sourceLineNo">517</span>                     if (! _preCallMethods.containsKey(sig)) {<a name="line.517"></a>
+<span class="sourceLineNo">518</span>                        Visibility.setAccessible(m);<a name="line.518"></a>
+<span class="sourceLineNo">519</span>                        _preCallMethods.put(sig, m);<a name="line.519"></a>
+<span class="sourceLineNo">520</span>                        _preCallMethodParams.add(findParams(m, false, null, true));<a name="line.520"></a>
+<span class="sourceLineNo">521</span>                     }<a name="line.521"></a>
+<span class="sourceLineNo">522</span>                     break;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>                  }<a name="line.523"></a>
+<span class="sourceLineNo">524</span>                  case POST_CALL: {<a name="line.524"></a>
+<span class="sourceLineNo">525</span>                     if (! _postCallMethods.containsKey(sig)) {<a name="line.525"></a>
+<span class="sourceLineNo">526</span>                        Visibility.setAccessible(m);<a name="line.526"></a>
+<span class="sourceLineNo">527</span>                        _postCallMethods.put(sig, m);<a name="line.527"></a>
+<span class="sourceLineNo">528</span>                        _postCallMethodParams.add(findParams(m, false, null, true));<a name="line.528"></a>
+<span class="sourceLineNo">529</span>                     }<a name="line.529"></a>
+<span class="sourceLineNo">530</span>                     break;<a name="line.530"></a>
+<span class="sourceLineNo">531</span>                  }<a name="line.531"></a>
+<span class="sourceLineNo">532</span>                  case START_CALL: {<a name="line.532"></a>
+<span class="sourceLineNo">533</span>                     if (! _startCallMethods.containsKey(sig)) {<a name="line.533"></a>
+<span class="sourceLineNo">534</span>                        Visibility.setAccessible(m);<a name="line.534"></a>
+<span class="sourceLineNo">535</span>                        _startCallMethods.put(sig, m);<a name="line.535"></a>
+<span class="sourceLineNo">536</span>                        _startCallMethodParams.add(m.getParameterTypes());<a name="line.536"></a>
+<span class="sourceLineNo">537</span>                        ClassUtils.assertArgsOfType(m, HttpServletRequest.class, HttpServletResponse.class);<a name="line.537"></a>
+<span class="sourceLineNo">538</span>                     }<a name="line.538"></a>
+<span class="sourceLineNo">539</span>                     break;<a name="line.539"></a>
+<span class="sourceLineNo">540</span>                  }<a name="line.540"></a>
+<span class="sourceLineNo">541</span>                  case END_CALL: {<a name="line.541"></a>
+<span class="sourceLineNo">542</span>                     if (! _endCallMethods.containsKey(sig)) {<a name="line.542"></a>
+<span class="sourceLineNo">543</span>                        Visibility.setAccessible(m);<a name="line.543"></a>
+<span class="sourceLineNo">544</span>                        _endCallMethods.put(sig, m);<a name="line.544"></a>
+<span class="sourceLineNo">545</span>                        _endCallMethodParams.add(m.getParameterTypes());<a name="line.545"></a>
+<span class="sourceLineNo">546</span>                        ClassUtils.assertArgsOfType(m, HttpServletRequest.class, HttpServletResponse.class);<a name="line.546"></a>
+<span class="sourceLineNo">547</span>                     }<a name="line.547"></a>
+<span class="sourceLineNo">548</span>                     break;<a name="line.548"></a>
+<span class="sourceLineNo">549</span>                  }<a name="line.549"></a>
+<span class="sourceLineNo">550</span>                  case POST_INIT: {<a name="line.550"></a>
+<span class="sourceLineNo">551</span>                     if (! _postInitMethods.containsKey(sig)) {<a name="line.551"></a>
+<span class="sourceLineNo">552</span>                        Visibility.setAccessible(m);<a name="line.552"></a>
+<span class="sourceLineNo">553</span>                        _postInitMethods.put(sig, m);<a name="line.553"></a>
+<span class="sourceLineNo">554</span>                        _postInitMethodParams.add(m.getParameterTypes());<a name="line.554"></a>
+<span class="sourceLineNo">555</span>                        ClassUtils.assertArgsOfType(m, RestContext.class);<a name="line.555"></a>
+<span class="sourceLineNo">556</span>                     }<a name="line.556"></a>
+<span class="sourceLineNo">557</span>                     break;<a name="line.557"></a>
+<span class="sourceLineNo">558</span>                  }<a name="line.558"></a>
+<span class="sourceLineNo">559</span>                  case POST_INIT_CHILD_FIRST: {<a name="line.559"></a>
+<span class="sourceLineNo">560</span>                     if (! _postInitChildFirstMethods.containsKey(sig)) {<a name="line.560"></a>
+<span class="sourceLineNo">561</span>                        Visibility.setAccessible(m);<a name="line.561"></a>
+<span class="sourceLineNo">562</span>                        _postInitChildFirstMethods.put(sig, m);<a name="line.562"></a>
+<span class="sourceLineNo">563</span>                        _postInitChildFirstMethodParams.add(m.getParameterTypes());<a name="line.563"></a>
+<span class="sourceLineNo">564</span>                        ClassUtils.assertArgsOfType(m, RestContext.class);<a name="line.564"></a>
+<span class="sourceLineNo">565</span>                     }<a name="line.565"></a>
+<span class="sourceLineNo">566</span>                     break;<a name="line.566"></a>
+<span class="sourceLineNo">567</span>                  }<a name="line.567"></a>
+<span class="sourceLineNo">568</span>                  case DESTROY: {<a name="line.568"></a>
+<span class="sourceLineNo">569</span>                     if (! _destroyMethods.containsKey(sig)) {<a name="line.569"></a>
+<span class="sourceLineNo">570</span>                        Visibility.setAccessible(m);<a name="line.570"></a>
+<span class="sourceLineNo">571</span>                        _destroyMethods.put(sig, m);<a name="line.571"></a>
+<span class="sourceLineNo">572</span>                        _destroyMethodParams.add(m.getParameterTypes());<a name="line.572"></a>
+<span class="sourceLineNo">573</span>                        ClassUtils.assertArgsOfType(m, RestContext.class);<a name="line.573"></a>
+<span class="sourceLineNo">574</span>                     }<a name="line.574"></a>
+<span class="sourceLineNo">575</span>                     break;<a name="line.575"></a>
+<span class="sourceLineNo">576</span>                  }<a name="line.576"></a>
+<span class="sourceLineNo">577</span>                  default: // Ignore INIT<a name="line.577"></a>
+<span class="sourceLineNo">578</span>               }<a name="line.578"></a>
+<span class="sourceLineNo">579</span>            }<a name="line.579"></a>
+<span class="sourceLineNo">580</span>         }<a name="line.580"></a>
+<span class="sourceLineNo">581</span><a name="line.581"></a>
+<span class="sourceLineNo">582</span>         this.callMethods = Collections.unmodifiableMap(_javaRestMethods);<a name="line.582"></a>
+<span class="sourceLineNo">583</span>         this.preCallMethods = _preCallMethods.values().toArray(new Method[_preCallMethods.size()]);<a name="line.583"></a>
+<span class="sourceLineNo">584</span>         this.postCallMethods = _postCallMethods.values().toArray(new Method[_postCallMethods.size()]);<a name="line.584"></a>
+<span class="sourceLineNo">585</span>         this.startCallMethods = _startCallMethods.values().toArray(new Method[_startCallMethods.size()]);<a name="line.585"></a>
+<span class="sourceLineNo">586</span>         this.endCallMethods = _endCallMethods.values().toArray(new Method[_endCallMethods.size()]);<a name="line.586"></a>
+<span class="sourceLineNo">587</span>         this.postInitMethods = _postInitMethods.values().toArray(new Method[_postInitMethods.size()]);<a name="line.587"></a>
+<span class="sourceLineNo">588</span>         this.postInitChildFirstMethods = _postInitChildFirstMethods.values().toArray(new Method[_postInitChildFirstMethods.size()]);<a name="line.588"></a>
+<span class="sourceLineNo">589</span>         this.destroyMethods = _destroyMethods.values().toArray(new Method[_destroyMethods.size()]);<a name="line.589"></a>
+<span class="sourceLineNo">590</span>         this.preCallMethodParams = _preCallMethodParams.toArray(new RestParam[_preCallMethodParams.size()][]);<a name="line.590"></a>
+<span class="sourceLineNo">591</span>         this.postCallMethodParams = _postCallMethodParams.toArray(new RestParam[_postCallMethodParams.size()][]);<a name="line.591"></a>
+<span class="sourceLineNo">592</span>         this.startCallMethodParams = _startCallMethodParams.toArray(new Class[_startCallMethodParams.size()][]);<a name="line.592"></a>
+<span class="sourceLineNo">593</span>         this.endCallMethodParams = _endCallMethodParams.toArray(new Class[_endCallMethodParams.size()][]);<a name="line.593"></a>
+<span class="sourceLineNo">594</span>         this.postInitMethodParams = _postInitMethodParams.toArray(new Class[_postInitMethodParams.size()][]);<a name="line.594"></a>
+<span class="sourceLineNo">595</span>         this.postInitChildFirstMethodParams = _postInitChildFirstMethodParams.toArray(new Class[_postInitChildFirstMethodParams.size()][]);<a name="line.595"></a>
+<span class="sourceLineNo">596</span>         this.destroyMethodParams = _destroyMethodParams.toArray(new Class[_destroyMethodParams.size()][]);<a name="line.596"></a>
+<span class="sourceLineNo">597</span><a name="line.597"></a>
+<span class="sourceLineNo">598</span>         Map&lt;String,CallRouter&gt; _callRouters = new LinkedHashMap&lt;String,CallRouter&gt;();<a name="line.598"></a>
+<span class="sourceLineNo">599</span>         for (CallRouter.Builder crb : routers.values())<a name="line.599"></a>
+<span class="sourceLineNo">600</span>            _callRouters.put(crb.getHttpMethodName(), crb.build());<a name="line.600"></a>
+<span class="sourceLineNo">601</span>         this.callRouters = Collections.unmodifiableMap(_callRouters);<a name="line.601"></a>
+<span class="sourceLineNo">602</span><a name="line.602"></a>
+<span class="sourceLineNo">603</span>         // Initialize our child resources.<a name="line.603"></a>
+<span class="sourceLineNo">604</span>         resourceResolver = resolve(resource, RestResourceResolver.class, b.resourceResolver);<a name="line.604"></a>
+<span class="sourceLineNo">605</span>         for (Object o : config.childResources) {<a name="line.605"></a>
+<span class="sourceLineNo">606</span>            String path = null;<a name="line.606"></a>
+<span class="sourceLineNo">607</span>            Object r = null;<a name="line.607"></a>
+<span class="sourceLineNo">608</span>            if (o instanceof Pair) {<a name="line.608"></a>
+<span class="sourceLineNo">609</span>               Pair&lt;String,Object&gt; p = (Pair&lt;String,Object&gt;)o;<a name="line.609"></a>
+<span class="sourceLineNo">610</span>               path = p.first();<a name="line.610"></a>
+<span class="sourceLineNo">611</span>               r = p.second();<a name="line.611"></a>
+<span class="sourceLineNo">612</span>            } else if (o instanceof Class&lt;?&gt;) {<a name="line.612"></a>
+<span class="sourceLineNo">613</span>               Class&lt;?&gt; c = (Class&lt;?&gt;)o;<a name="line.613"></a>
+<span class="sourceLineNo">614</span>               // Don't allow specifying yourself as a child.  Causes an infinite loop.<a name="line.614"></a>
+<span class="sourceLineNo">615</span>               if (c == config.resourceClass)<a name="line.615"></a>
+<span class="sourceLineNo">616</span>                  continue;<a name="line.616"></a>
+<span class="sourceLineNo">617</span>               r = c;<a name="line.617"></a>
+<span class="sourceLineNo">618</span>            } else {<a name="line.618"></a>
+<span class="sourceLineNo">619</span>               r = o;<a name="line.619"></a>
+<span class="sourceLineNo">620</span>            }<a name="line.620"></a>
 <span class="sourceLineNo">621</span><a name="line.621"></a>
-<span class="sourceLineNo">622</span>            if (o instanceof Class) {<a name="line.622"></a>
-<span class="sourceLineNo">623</span>               Class&lt;?&gt; oc = (Class&lt;?&gt;)o;<a name="line.623"></a>
-<span class="sourceLineNo">624</span>               childConfig = new RestConfig(config.inner, oc, this);<a name="line.624"></a>
-<span class="sourceLineNo">625</span>               r = resourceResolver.resolve(oc, childConfig);<a name="line.625"></a>
-<span class="sourceLineNo">626</span>            } else {<a name="line.626"></a>
-<span class="sourceLineNo">627</span>               r = o;<a name="line.627"></a>
-<span class="sourceLineNo">628</span>               childConfig = new RestConfig(config.inner, o.getClass(), this);<a name="line.628"></a>
-<span class="sourceLineNo">629</span>            }<a name="line.629"></a>
-<span class="sourceLineNo">630</span><a name="line.630"></a>
-<span class="sourceLineNo">631</span>            childConfig.init(r);<a name="line.631"></a>
-<span class="sourceLineNo">632</span>            if (r instanceof RestServlet)<a name="line.632"></a>
-<span class="sourceLineNo">633</span>               ((RestServlet)r).innerInit(childConfig);<a name="line.633"></a>
-<span class="sourceLineNo">634</span>            RestContext rc2 = new RestContext(r, servletContext, childConfig);<a name="line.634"></a>
-<span class="sourceLineNo">635</span>            if (r instanceof RestServlet)<a name="line.635"></a>
-<span class="sourceLineNo">636</span>               ((RestServlet)r).setContext(rc2);<a name="line.636"></a>
-<span class="sourceLineNo">637</span>            path = childConfig.path;<a name="line.637"></a>
-<span class="sourceLineNo">638</span>            childResources.put(path, rc2);<a name="line.638"></a>
-<span class="sourceLineNo">639</span>         }<a name="line.639"></a>
-<span class="sourceLineNo">640</span><a name="line.640"></a>
-<span class="sourceLineNo">641</span>         callHandler = config.callHandler == null ? new RestCallHandler(this) : resolve(resource, RestCallHandler.class, config.callHandler, this);<a name="line.641"></a>
-<span class="sourceLineNo">642</span>         infoProvider = config.infoProvider == null ? new RestInfoProvider(this) : resolve(resource, RestInfoProvider.class, config.infoProvider, this);<a name="line.642"></a>
-<span class="sourceLineNo">643</span><a name="line.643"></a>
-<span class="sourceLineNo">644</span>      } catch (RestException e) {<a name="line.644"></a>
-<span class="sourceLineNo">645</span>         _initException = e;<a name="line.645"></a>
-<span class="sourceLineNo">646</span>         throw e;<a name="line.646"></a>
-<span class="sourceLineNo">647</span>      } catch (Exception e) {<a name="line.647"></a>
-<span class="sourceLineNo">648</span>         _initException = new RestException(SC_INTERNAL_SERVER_ERROR, e);<a name="line.648"></a>
-<span class="sourceLineNo">649</span>         throw e;<a name="line.649"></a>
-<span class="sourceLineNo">650</span>      } finally {<a name="line.650"></a>
-<span class="sourceLineNo">651</span>         initException = _initException;<a name="line.651"></a>
-<span class="sourceLineNo">652</span>      }<a name="line.652"></a>
-<span class="sourceLineNo">653</span>   }<a name="line.653"></a>
-<span class="sourceLineNo">654</span><a name="line.654"></a>
-<span class="sourceLineNo">655</span>   private static void addToRouter(Map&lt;String, CallRouter.Builder&gt; routers, String httpMethodName, CallMethod cm) throws RestServletException {<a name="line.655"></a>
-<span class="sourceLineNo">656</span>      if (! routers.containsKey(httpMethodName))<a name="line.656"></a>
-<span class="sourceLineNo">657</span>         routers.put(httpMethodName, new CallRouter.Builder(httpMethodName));<a name="line.657"></a>
-<span class="sourceLineNo">658</span>      routers.get(httpMethodName).add(cm);<a name="line.658"></a>
-<span class="sourceLineNo">659</span>   }<a name="line.659"></a>
-<span class="sourceLineNo">660</span><a name="line.660"></a>
-<span class="sourceLineNo">661</span>   private static class Builder {<a name="line.661"></a>
+<span class="sourceLineNo">622</span>            RestConfig childConfig = null;<a name="line.622"></a>
+<span class="sourceLineNo">623</span><a name="line.623"></a>
+<span class="sourceLineNo">624</span>            if (o instanceof Class) {<a name="line.624"></a>
+<span class="sourceLineNo">625</span>               Class&lt;?&gt; oc = (Class&lt;?&gt;)o;<a name="line.625"></a>
+<span class="sourceLineNo">626</span>               childConfig = new RestConfig(config.inner, oc, this);<a name="line.626"></a>
+<span class="sourceLineNo">627</span>               r = resourceResolver.resolve(oc, childConfig);<a name="line.627"></a>
+<span class="sourceLineNo">628</span>            } else {<a name="line.628"></a>
+<span class="sourceLineNo">629</span>               r = o;<a name="line.629"></a>
+<span class="sourceLineNo">630</span>               childConfig = new RestConfig(config.inner, o.getClass(), this);<a name="line.630"></a>
+<span class="sourceLineNo">631</span>            }<a name="line.631"></a>
+<span class="sourceLineNo">632</span><a name="line.632"></a>
+<span class="sourceLineNo">633</span>            childConfig.init(r);<a name="line.633"></a>
+<span class="sourceLineNo">634</span>            if (r instanceof RestServlet)<a name="line.634"></a>
+<span class="sourceLineNo">635</span>               ((RestServlet)r).innerInit(childConfig);<a name="line.635"></a>
+<span class="sourceLineNo">636</span>            RestContext rc2 = new RestContext(r, servletContext, childConfig);<a name="line.636"></a>
+<span class="sourceLineNo">637</span>            if (r instanceof RestServlet)<a name="line.637"></a>
+<span class="sourceLineNo">638</span>               ((RestServlet)r).setContext(rc2);<a name="line.638"></a>
+<span class="sourceLineNo">639</span>            path = childConfig.path;<a name="line.639"></a>
+<span class="sourceLineNo">640</span>            childResources.put(path, rc2);<a name="line.640"></a>
+<span class="sourceLineNo">641</span>         }<a name="line.641"></a>
+<span class="sourceLineNo">642</span><a name="line.642"></a>
+<span class="sourceLineNo">643</span>         callHandler = config.callHandler == null ? new RestCallHandler(this) : resolve(resource, RestCallHandler.class, config.callHandler, this);<a name="line.643"></a>
+<span class="sourceLineNo">644</span>         infoProvider = config.infoProvider == null ? new RestInfoProvider(this) : resolve(resource, RestInfoProvider.class, config.infoProvider, this);<a name="line.644"></a>
+<span class="sourceLineNo">645</span><a name="line.645"></a>
+<span class="sourceLineNo">646</span>      } catch (RestException e) {<a name="line.646"></a>
+<span class="sourceLineNo">647</span>         _initException = e;<a name="line.647"></a>
+<span class="sourceLineNo">648</span>         throw e;<a name="line.648"></a>
+<span class="sourceLineNo">649</span>      } catch (Exception e) {<a name="line.649"></a>
+<span class="sourceLineNo">650</span>         _initException = new RestException(SC_INTERNAL_SERVER_ERROR, e);<a name="line.650"></a>
+<span class="sourceLineNo">651</span>         throw e;<a name="line.651"></a>
+<span class="sourceLineNo">652</span>      } finally {<a name="line.652"></a>
+<span class="sourceLineNo">653</span>         initException = _initException;<a name="line.653"></a>
+<span class="sourceLineNo">654</span>      }<a name="line.654"></a>
+<span class="sourceLineNo">655</span>   }<a name="line.655"></a>
+<span class="sourceLineNo">656</span><a name="line.656"></a>
+<span class="sourceLineNo">657</span>   private static void addToRouter(Map&lt;String, CallRouter.Builder&gt; routers, String httpMethodName, CallMethod cm) throws RestServletException {<a name="line.657"></a>
+<span class="sourceLineNo">658</span>      if (! routers.containsKey(httpMethodName))<a name="line.658"></a>
+<span class="sourceLineNo">659</span>         routers.put(httpMethodName, new CallRouter.Builder(httpMethodName));<a name="line.659"></a>
+<span class="sourceLineNo">660</span>      routers.get(httpM

<TRUNCATED>


Mime
View raw message