juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [10/51] [partial] incubator-juneau-website git commit: Javadoc updates.
Date Sat, 01 Apr 2017 23:57:58 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/5aed2f48/content/site/apidocs/src-html/org/apache/juneau/parser/Parser.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/parser/Parser.html b/content/site/apidocs/src-html/org/apache/juneau/parser/Parser.html
index 0c1434b..55d3329 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/parser/Parser.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/parser/Parser.html
@@ -490,12 +490,12 @@
 <span class="sourceLineNo">482</span>    * @return An array of parsed objects.<a
name="line.482"></a>
 <span class="sourceLineNo">483</span>    * @throws ParseException If the input
contains a syntax error or is malformed, or is not valid for the specified type.<a name="line.483"></a>
 <span class="sourceLineNo">484</span>    */<a name="line.484"></a>
-<span class="sourceLineNo">485</span>   public final Object[] parseArgs(Object
input, ClassMeta&lt;?&gt;[] argTypes) throws ParseException {<a name="line.485"></a>
+<span class="sourceLineNo">485</span>   public final Object[] parseArgs(Object
input, Type[] argTypes) throws ParseException {<a name="line.485"></a>
 <span class="sourceLineNo">486</span>      if (argTypes == null || argTypes.length
== 0)<a name="line.486"></a>
 <span class="sourceLineNo">487</span>         return new Object[0];<a name="line.487"></a>
 <span class="sourceLineNo">488</span>      ParserSession session = createSession(input);<a
name="line.488"></a>
 <span class="sourceLineNo">489</span>      try {<a name="line.489"></a>
-<span class="sourceLineNo">490</span>         return doParseArgs(session, argTypes);<a
name="line.490"></a>
+<span class="sourceLineNo">490</span>         return doParse(session, session.getArgsClassMeta(argTypes));<a
name="line.490"></a>
 <span class="sourceLineNo">491</span>      } catch (ParseException e) {<a
name="line.491"></a>
 <span class="sourceLineNo">492</span>         throw e;<a name="line.492"></a>
 <span class="sourceLineNo">493</span>      } catch (Exception e) {<a name="line.493"></a>
@@ -505,187 +505,150 @@
 <span class="sourceLineNo">497</span>      }<a name="line.497"></a>
 <span class="sourceLineNo">498</span>   }<a name="line.498"></a>
 <span class="sourceLineNo">499</span><a name="line.499"></a>
-<span class="sourceLineNo">500</span>   /**<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    * Same as {@link #parseArgs(Object,
ClassMeta[])} except allows you to pass in {@link Class} objects.<a name="line.501"></a>
-<span class="sourceLineNo">502</span>    *<a name="line.502"></a>
-<span class="sourceLineNo">503</span>    * @param input The input.  Subclasses
can support different input types.<a name="line.503"></a>
-<span class="sourceLineNo">504</span>    * @param argTypes Specifies the type
of objects to create for each entry in the array.<a name="line.504"></a>
-<span class="sourceLineNo">505</span>    * @return An array of parsed objects.<a
name="line.505"></a>
-<span class="sourceLineNo">506</span>    * @throws ParseException If the input
contains a syntax error or is malformed, or is not valid for the specified type.<a name="line.506"></a>
-<span class="sourceLineNo">507</span>    */<a name="line.507"></a>
-<span class="sourceLineNo">508</span>   public final Object[] parseArgs(Object
input, Type[] argTypes) throws ParseException {<a name="line.508"></a>
-<span class="sourceLineNo">509</span>      if (argTypes == null || argTypes.length
== 0)<a name="line.509"></a>
-<span class="sourceLineNo">510</span>         return new Object[0];<a name="line.510"></a>
-<span class="sourceLineNo">511</span>      ParserSession session = createSession(input);<a
name="line.511"></a>
-<span class="sourceLineNo">512</span>      try {<a name="line.512"></a>
-<span class="sourceLineNo">513</span>         return doParseArgs(session, session.getClassMetas(argTypes));<a
name="line.513"></a>
-<span class="sourceLineNo">514</span>      } catch (ParseException e) {<a
name="line.514"></a>
-<span class="sourceLineNo">515</span>         throw e;<a name="line.515"></a>
-<span class="sourceLineNo">516</span>      } catch (Exception e) {<a name="line.516"></a>
-<span class="sourceLineNo">517</span>         throw new ParseException(session,
e);<a name="line.517"></a>
-<span class="sourceLineNo">518</span>      } finally {<a name="line.518"></a>
-<span class="sourceLineNo">519</span>         session.close();<a name="line.519"></a>
-<span class="sourceLineNo">520</span>      }<a name="line.520"></a>
-<span class="sourceLineNo">521</span>   }<a name="line.521"></a>
-<span class="sourceLineNo">522</span><a name="line.522"></a>
-<span class="sourceLineNo">523</span>   /**<a name="line.523"></a>
-<span class="sourceLineNo">524</span>    * Implementation method.<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    * Default implementation throws an {@link
UnsupportedOperationException}.<a name="line.525"></a>
-<span class="sourceLineNo">526</span>    * @param session The runtime session
object returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone,
MediaType)}.<a name="line.526"></a>
-<span class="sourceLineNo">527</span>    * If &lt;jk&gt;null&lt;/jk&gt;,
one will be created using {@link #createSession(Object)}.<a name="line.527"></a>
-<span class="sourceLineNo">528</span>    * @param argTypes Specifies the type
of objects to create for each entry in the array.<a name="line.528"></a>
-<span class="sourceLineNo">529</span>    *<a name="line.529"></a>
-<span class="sourceLineNo">530</span>    * @return An array of parsed objects.<a
name="line.530"></a>
-<span class="sourceLineNo">531</span>    * @throws Exception If thrown from underlying
stream, or if the input contains a syntax error or is malformed.<a name="line.531"></a>
-<span class="sourceLineNo">532</span>    */<a name="line.532"></a>
-<span class="sourceLineNo">533</span>   protected Object[] doParseArgs(ParserSession
session, ClassMeta&lt;?&gt;[] argTypes) throws Exception {<a name="line.533"></a>
-<span class="sourceLineNo">534</span>      throw new UnsupportedOperationException("Parser
'"+getClass().getName()+"' does not support this method.");<a name="line.534"></a>
-<span class="sourceLineNo">535</span>   }<a name="line.535"></a>
-<span class="sourceLineNo">536</span><a name="line.536"></a>
-<span class="sourceLineNo">537</span><a name="line.537"></a>
-<span class="sourceLineNo">538</span>   //--------------------------------------------------------------------------------<a
name="line.538"></a>
-<span class="sourceLineNo">539</span>   // Other methods<a name="line.539"></a>
-<span class="sourceLineNo">540</span>   //--------------------------------------------------------------------------------<a
name="line.540"></a>
-<span class="sourceLineNo">541</span><a name="line.541"></a>
-<span class="sourceLineNo">542</span>   /**<a name="line.542"></a>
-<span class="sourceLineNo">543</span>    * Adds a {@link ParserListener} to this
parser to listen for parse events.<a name="line.543"></a>
-<span class="sourceLineNo">544</span>    *<a name="line.544"></a>
-<span class="sourceLineNo">545</span>    * @param listener The listener to associate
with this parser.<a name="line.545"></a>
-<span class="sourceLineNo">546</span>    * @return This object (for method chaining).<a
name="line.546"></a>
-<span class="sourceLineNo">547</span>    */<a name="line.547"></a>
-<span class="sourceLineNo">548</span>   public Parser addListener(ParserListener
listener) {<a name="line.548"></a>
-<span class="sourceLineNo">549</span>      this.listeners.add(listener);<a
name="line.549"></a>
-<span class="sourceLineNo">550</span>      return this;<a name="line.550"></a>
-<span class="sourceLineNo">551</span>   }<a name="line.551"></a>
-<span class="sourceLineNo">552</span><a name="line.552"></a>
-<span class="sourceLineNo">553</span>   /**<a name="line.553"></a>
-<span class="sourceLineNo">554</span>    * Returns the current parser listeners
associated with this parser.<a name="line.554"></a>
-<span class="sourceLineNo">555</span>    *<a name="line.555"></a>
-<span class="sourceLineNo">556</span>    * @return The current list of parser
listeners.<a name="line.556"></a>
-<span class="sourceLineNo">557</span>    */<a name="line.557"></a>
-<span class="sourceLineNo">558</span>   public List&lt;ParserListener&gt;
getListeners() {<a name="line.558"></a>
-<span class="sourceLineNo">559</span>      return listeners;<a name="line.559"></a>
-<span class="sourceLineNo">560</span>   }<a name="line.560"></a>
-<span class="sourceLineNo">561</span><a name="line.561"></a>
-<span class="sourceLineNo">562</span>   /**<a name="line.562"></a>
-<span class="sourceLineNo">563</span>    * Converts the specified string to the
specified type.<a name="line.563"></a>
-<span class="sourceLineNo">564</span>    *<a name="line.564"></a>
-<span class="sourceLineNo">565</span>    * @param session The session object.<a
name="line.565"></a>
-<span class="sourceLineNo">566</span>    * @param outer The outer object if we're
converting to an inner object that needs to be created within the context of an outer object.<a
name="line.566"></a>
-<span class="sourceLineNo">567</span>    * @param s The string to convert.<a
name="line.567"></a>
-<span class="sourceLineNo">568</span>    * @param type The class type to convert
the string to.<a name="line.568"></a>
-<span class="sourceLineNo">569</span>    * @return The string converted as an
object of the specified type.<a name="line.569"></a>
-<span class="sourceLineNo">570</span>    * @throws Exception If the input contains
a syntax error or is malformed, or is not valid for the specified type.<a name="line.570"></a>
-<span class="sourceLineNo">571</span>    * @param &lt;T&gt; The class
type to convert the string to.<a name="line.571"></a>
-<span class="sourceLineNo">572</span>    */<a name="line.572"></a>
-<span class="sourceLineNo">573</span>   @SuppressWarnings({ "unchecked", "rawtypes"
})<a name="line.573"></a>
-<span class="sourceLineNo">574</span>   protected &lt;T&gt; T convertAttrToType(ParserSession
session, Object outer, String s, ClassMeta&lt;T&gt; type) throws Exception {<a
name="line.574"></a>
-<span class="sourceLineNo">575</span>      if (s == null)<a name="line.575"></a>
-<span class="sourceLineNo">576</span>         return null;<a name="line.576"></a>
-<span class="sourceLineNo">577</span><a name="line.577"></a>
-<span class="sourceLineNo">578</span>      if (type == null)<a name="line.578"></a>
-<span class="sourceLineNo">579</span>         type = (ClassMeta&lt;T&gt;)object();<a
name="line.579"></a>
-<span class="sourceLineNo">580</span>      PojoSwap transform = type.getPojoSwap();<a
name="line.580"></a>
-<span class="sourceLineNo">581</span>      ClassMeta&lt;?&gt; sType =
type.getSerializedClassMeta();<a name="line.581"></a>
-<span class="sourceLineNo">582</span><a name="line.582"></a>
-<span class="sourceLineNo">583</span>      Object o = s;<a name="line.583"></a>
-<span class="sourceLineNo">584</span>      if (sType.isChar())<a name="line.584"></a>
-<span class="sourceLineNo">585</span>         o = s.charAt(0);<a name="line.585"></a>
-<span class="sourceLineNo">586</span>      else if (sType.isNumber())<a name="line.586"></a>
-<span class="sourceLineNo">587</span>         if (type.canCreateNewInstanceFromNumber(outer))<a
name="line.587"></a>
-<span class="sourceLineNo">588</span>            o = type.newInstanceFromNumber(session,
outer, parseNumber(s, type.getNewInstanceFromNumberClass()));<a name="line.588"></a>
-<span class="sourceLineNo">589</span>         else<a name="line.589"></a>
-<span class="sourceLineNo">590</span>            o = parseNumber(s, (Class&lt;?
extends Number&gt;)sType.getInnerClass());<a name="line.590"></a>
-<span class="sourceLineNo">591</span>      else if (sType.isBoolean())<a name="line.591"></a>
-<span class="sourceLineNo">592</span>         o = Boolean.parseBoolean(s);<a
name="line.592"></a>
-<span class="sourceLineNo">593</span>      else if (! (sType.isCharSequence()
|| sType.isObject())) {<a name="line.593"></a>
-<span class="sourceLineNo">594</span>         if (sType.canCreateNewInstanceFromString(outer))<a
name="line.594"></a>
-<span class="sourceLineNo">595</span>            o = sType.newInstanceFromString(outer,
s);<a name="line.595"></a>
-<span class="sourceLineNo">596</span>         else<a name="line.596"></a>
-<span class="sourceLineNo">597</span>            throw new ParseException(session,
"Invalid conversion from string to class ''{0}''", type);<a name="line.597"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>   //--------------------------------------------------------------------------------<a
name="line.501"></a>
+<span class="sourceLineNo">502</span>   // Other methods<a name="line.502"></a>
+<span class="sourceLineNo">503</span>   //--------------------------------------------------------------------------------<a
name="line.503"></a>
+<span class="sourceLineNo">504</span><a name="line.504"></a>
+<span class="sourceLineNo">505</span>   /**<a name="line.505"></a>
+<span class="sourceLineNo">506</span>    * Adds a {@link ParserListener} to this
parser to listen for parse events.<a name="line.506"></a>
+<span class="sourceLineNo">507</span>    *<a name="line.507"></a>
+<span class="sourceLineNo">508</span>    * @param listener The listener to associate
with this parser.<a name="line.508"></a>
+<span class="sourceLineNo">509</span>    * @return This object (for method chaining).<a
name="line.509"></a>
+<span class="sourceLineNo">510</span>    */<a name="line.510"></a>
+<span class="sourceLineNo">511</span>   public Parser addListener(ParserListener
listener) {<a name="line.511"></a>
+<span class="sourceLineNo">512</span>      this.listeners.add(listener);<a
name="line.512"></a>
+<span class="sourceLineNo">513</span>      return this;<a name="line.513"></a>
+<span class="sourceLineNo">514</span>   }<a name="line.514"></a>
+<span class="sourceLineNo">515</span><a name="line.515"></a>
+<span class="sourceLineNo">516</span>   /**<a name="line.516"></a>
+<span class="sourceLineNo">517</span>    * Returns the current parser listeners
associated with this parser.<a name="line.517"></a>
+<span class="sourceLineNo">518</span>    *<a name="line.518"></a>
+<span class="sourceLineNo">519</span>    * @return The current list of parser
listeners.<a name="line.519"></a>
+<span class="sourceLineNo">520</span>    */<a name="line.520"></a>
+<span class="sourceLineNo">521</span>   public List&lt;ParserListener&gt;
getListeners() {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>      return listeners;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>   }<a name="line.523"></a>
+<span class="sourceLineNo">524</span><a name="line.524"></a>
+<span class="sourceLineNo">525</span>   /**<a name="line.525"></a>
+<span class="sourceLineNo">526</span>    * Converts the specified string to the
specified type.<a name="line.526"></a>
+<span class="sourceLineNo">527</span>    *<a name="line.527"></a>
+<span class="sourceLineNo">528</span>    * @param session The session object.<a
name="line.528"></a>
+<span class="sourceLineNo">529</span>    * @param outer The outer object if we're
converting to an inner object that needs to be created within the context of an outer object.<a
name="line.529"></a>
+<span class="sourceLineNo">530</span>    * @param s The string to convert.<a
name="line.530"></a>
+<span class="sourceLineNo">531</span>    * @param type The class type to convert
the string to.<a name="line.531"></a>
+<span class="sourceLineNo">532</span>    * @return The string converted as an
object of the specified type.<a name="line.532"></a>
+<span class="sourceLineNo">533</span>    * @throws Exception If the input contains
a syntax error or is malformed, or is not valid for the specified type.<a name="line.533"></a>
+<span class="sourceLineNo">534</span>    * @param &lt;T&gt; The class
type to convert the string to.<a name="line.534"></a>
+<span class="sourceLineNo">535</span>    */<a name="line.535"></a>
+<span class="sourceLineNo">536</span>   @SuppressWarnings({ "unchecked", "rawtypes"
})<a name="line.536"></a>
+<span class="sourceLineNo">537</span>   protected &lt;T&gt; T convertAttrToType(ParserSession
session, Object outer, String s, ClassMeta&lt;T&gt; type) throws Exception {<a
name="line.537"></a>
+<span class="sourceLineNo">538</span>      if (s == null)<a name="line.538"></a>
+<span class="sourceLineNo">539</span>         return null;<a name="line.539"></a>
+<span class="sourceLineNo">540</span><a name="line.540"></a>
+<span class="sourceLineNo">541</span>      if (type == null)<a name="line.541"></a>
+<span class="sourceLineNo">542</span>         type = (ClassMeta&lt;T&gt;)object();<a
name="line.542"></a>
+<span class="sourceLineNo">543</span>      PojoSwap transform = type.getPojoSwap();<a
name="line.543"></a>
+<span class="sourceLineNo">544</span>      ClassMeta&lt;?&gt; sType =
type.getSerializedClassMeta();<a name="line.544"></a>
+<span class="sourceLineNo">545</span><a name="line.545"></a>
+<span class="sourceLineNo">546</span>      Object o = s;<a name="line.546"></a>
+<span class="sourceLineNo">547</span>      if (sType.isChar())<a name="line.547"></a>
+<span class="sourceLineNo">548</span>         o = s.charAt(0);<a name="line.548"></a>
+<span class="sourceLineNo">549</span>      else if (sType.isNumber())<a name="line.549"></a>
+<span class="sourceLineNo">550</span>         if (type.canCreateNewInstanceFromNumber(outer))<a
name="line.550"></a>
+<span class="sourceLineNo">551</span>            o = type.newInstanceFromNumber(session,
outer, parseNumber(s, type.getNewInstanceFromNumberClass()));<a name="line.551"></a>
+<span class="sourceLineNo">552</span>         else<a name="line.552"></a>
+<span class="sourceLineNo">553</span>            o = parseNumber(s, (Class&lt;?
extends Number&gt;)sType.getInnerClass());<a name="line.553"></a>
+<span class="sourceLineNo">554</span>      else if (sType.isBoolean())<a name="line.554"></a>
+<span class="sourceLineNo">555</span>         o = Boolean.parseBoolean(s);<a
name="line.555"></a>
+<span class="sourceLineNo">556</span>      else if (! (sType.isCharSequence()
|| sType.isObject())) {<a name="line.556"></a>
+<span class="sourceLineNo">557</span>         if (sType.canCreateNewInstanceFromString(outer))<a
name="line.557"></a>
+<span class="sourceLineNo">558</span>            o = sType.newInstanceFromString(outer,
s);<a name="line.558"></a>
+<span class="sourceLineNo">559</span>         else<a name="line.559"></a>
+<span class="sourceLineNo">560</span>            throw new ParseException(session,
"Invalid conversion from string to class ''{0}''", type);<a name="line.560"></a>
+<span class="sourceLineNo">561</span>      }<a name="line.561"></a>
+<span class="sourceLineNo">562</span><a name="line.562"></a>
+<span class="sourceLineNo">563</span>      if (transform != null)<a name="line.563"></a>
+<span class="sourceLineNo">564</span>         o = transform.unswap(session, o,
type);<a name="line.564"></a>
+<span class="sourceLineNo">565</span><a name="line.565"></a>
+<span class="sourceLineNo">566</span>      return (T)o;<a name="line.566"></a>
+<span class="sourceLineNo">567</span>   }<a name="line.567"></a>
+<span class="sourceLineNo">568</span><a name="line.568"></a>
+<span class="sourceLineNo">569</span>   /**<a name="line.569"></a>
+<span class="sourceLineNo">570</span>    * Convenience method for calling the
{@link ParentProperty @ParentProperty} method on<a name="line.570"></a>
+<span class="sourceLineNo">571</span>    * the specified object if it exists.<a
name="line.571"></a>
+<span class="sourceLineNo">572</span>    *<a name="line.572"></a>
+<span class="sourceLineNo">573</span>    * @param cm The class type of the object.<a
name="line.573"></a>
+<span class="sourceLineNo">574</span>    * @param o The object.<a name="line.574"></a>
+<span class="sourceLineNo">575</span>    * @param parent The parent to set.<a
name="line.575"></a>
+<span class="sourceLineNo">576</span>    * @throws Exception<a name="line.576"></a>
+<span class="sourceLineNo">577</span>    */<a name="line.577"></a>
+<span class="sourceLineNo">578</span>   protected void setParent(ClassMeta&lt;?&gt;
cm, Object o, Object parent) throws Exception {<a name="line.578"></a>
+<span class="sourceLineNo">579</span>      Method m = cm.getParentProperty();<a
name="line.579"></a>
+<span class="sourceLineNo">580</span>      if (m != null)<a name="line.580"></a>
+<span class="sourceLineNo">581</span>         m.invoke(o, parent);<a name="line.581"></a>
+<span class="sourceLineNo">582</span>   }<a name="line.582"></a>
+<span class="sourceLineNo">583</span><a name="line.583"></a>
+<span class="sourceLineNo">584</span>   /**<a name="line.584"></a>
+<span class="sourceLineNo">585</span>    * Convenience method for calling the
{@link NameProperty @NameProperty} method on<a name="line.585"></a>
+<span class="sourceLineNo">586</span>    * the specified object if it exists.<a
name="line.586"></a>
+<span class="sourceLineNo">587</span>    *<a name="line.587"></a>
+<span class="sourceLineNo">588</span>    * @param cm The class type of the object.<a
name="line.588"></a>
+<span class="sourceLineNo">589</span>    * @param o The object.<a name="line.589"></a>
+<span class="sourceLineNo">590</span>    * @param name The name to set.<a
name="line.590"></a>
+<span class="sourceLineNo">591</span>    * @throws Exception<a name="line.591"></a>
+<span class="sourceLineNo">592</span>    */<a name="line.592"></a>
+<span class="sourceLineNo">593</span>   protected void setName(ClassMeta&lt;?&gt;
cm, Object o, Object name) throws Exception {<a name="line.593"></a>
+<span class="sourceLineNo">594</span>      if (cm != null) {<a name="line.594"></a>
+<span class="sourceLineNo">595</span>         Method m = cm.getNameProperty();<a
name="line.595"></a>
+<span class="sourceLineNo">596</span>         if (m != null)<a name="line.596"></a>
+<span class="sourceLineNo">597</span>            m.invoke(o, name);<a name="line.597"></a>
 <span class="sourceLineNo">598</span>      }<a name="line.598"></a>
-<span class="sourceLineNo">599</span><a name="line.599"></a>
-<span class="sourceLineNo">600</span>      if (transform != null)<a name="line.600"></a>
-<span class="sourceLineNo">601</span>         o = transform.unswap(session, o,
type);<a name="line.601"></a>
-<span class="sourceLineNo">602</span><a name="line.602"></a>
-<span class="sourceLineNo">603</span>      return (T)o;<a name="line.603"></a>
-<span class="sourceLineNo">604</span>   }<a name="line.604"></a>
-<span class="sourceLineNo">605</span><a name="line.605"></a>
-<span class="sourceLineNo">606</span>   /**<a name="line.606"></a>
-<span class="sourceLineNo">607</span>    * Convenience method for calling the
{@link ParentProperty @ParentProperty} method on<a name="line.607"></a>
-<span class="sourceLineNo">608</span>    * the specified object if it exists.<a
name="line.608"></a>
-<span class="sourceLineNo">609</span>    *<a name="line.609"></a>
-<span class="sourceLineNo">610</span>    * @param cm The class type of the object.<a
name="line.610"></a>
-<span class="sourceLineNo">611</span>    * @param o The object.<a name="line.611"></a>
-<span class="sourceLineNo">612</span>    * @param parent The parent to set.<a
name="line.612"></a>
-<span class="sourceLineNo">613</span>    * @throws Exception<a name="line.613"></a>
-<span class="sourceLineNo">614</span>    */<a name="line.614"></a>
-<span class="sourceLineNo">615</span>   protected void setParent(ClassMeta&lt;?&gt;
cm, Object o, Object parent) throws Exception {<a name="line.615"></a>
-<span class="sourceLineNo">616</span>      Method m = cm.getParentProperty();<a
name="line.616"></a>
-<span class="sourceLineNo">617</span>      if (m != null)<a name="line.617"></a>
-<span class="sourceLineNo">618</span>         m.invoke(o, parent);<a name="line.618"></a>
-<span class="sourceLineNo">619</span>   }<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>    * Convenience method for calling the
{@link NameProperty @NameProperty} method on<a name="line.622"></a>
-<span class="sourceLineNo">623</span>    * the specified object if it exists.<a
name="line.623"></a>
-<span class="sourceLineNo">624</span>    *<a name="line.624"></a>
-<span class="sourceLineNo">625</span>    * @param cm The class type of the object.<a
name="line.625"></a>
-<span class="sourceLineNo">626</span>    * @param o The object.<a name="line.626"></a>
-<span class="sourceLineNo">627</span>    * @param name The name to set.<a
name="line.627"></a>
-<span class="sourceLineNo">628</span>    * @throws Exception<a name="line.628"></a>
-<span class="sourceLineNo">629</span>    */<a name="line.629"></a>
-<span class="sourceLineNo">630</span>   protected void setName(ClassMeta&lt;?&gt;
cm, Object o, Object name) throws Exception {<a name="line.630"></a>
-<span class="sourceLineNo">631</span>      if (cm != null) {<a name="line.631"></a>
-<span class="sourceLineNo">632</span>         Method m = cm.getNameProperty();<a
name="line.632"></a>
-<span class="sourceLineNo">633</span>         if (m != null)<a name="line.633"></a>
-<span class="sourceLineNo">634</span>            m.invoke(o, name);<a name="line.634"></a>
-<span class="sourceLineNo">635</span>      }<a name="line.635"></a>
-<span class="sourceLineNo">636</span>   }<a name="line.636"></a>
-<span class="sourceLineNo">637</span><a name="line.637"></a>
-<span class="sourceLineNo">638</span>   /**<a name="line.638"></a>
-<span class="sourceLineNo">639</span>    * Method that gets called when an unknown
bean property name is encountered.<a name="line.639"></a>
-<span class="sourceLineNo">640</span>    *<a name="line.640"></a>
-<span class="sourceLineNo">641</span>    * @param session The parser session.<a
name="line.641"></a>
-<span class="sourceLineNo">642</span>    * @param propertyName The unknown bean
property name.<a name="line.642"></a>
-<span class="sourceLineNo">643</span>    * @param beanMap The bean that doesn't
have the expected property.<a name="line.643"></a>
-<span class="sourceLineNo">644</span>    * @param line The line number where
the property was found.  &lt;code&gt;-1&lt;/code&gt; if line numbers are not
available.<a name="line.644"></a>
-<span class="sourceLineNo">645</span>    * @param col The column number where
the property was found.  &lt;code&gt;-1&lt;/code&gt; if column numbers are
not available.<a name="line.645"></a>
-<span class="sourceLineNo">646</span>    * @throws ParseException Automatically
thrown if {@link BeanContext#BEAN_ignoreUnknownBeanProperties} setting<a name="line.646"></a>
-<span class="sourceLineNo">647</span>    *    on this parser is &lt;jk&gt;false&lt;/jk&gt;<a
name="line.647"></a>
-<span class="sourceLineNo">648</span>    * @param &lt;T&gt; The class
type of the bean map that doesn't have the expected property.<a name="line.648"></a>
-<span class="sourceLineNo">649</span>    */<a name="line.649"></a>
-<span class="sourceLineNo">650</span>   protected &lt;T&gt; void onUnknownProperty(ParserSession
session, String propertyName, BeanMap&lt;T&gt; beanMap, int line, int col) throws
ParseException {<a name="line.650"></a>
-<span class="sourceLineNo">651</span>      if (propertyName.equals("type") ||
propertyName.equals(session.getBeanTypePropertyName()))<a name="line.651"></a>
-<span class="sourceLineNo">652</span>         return;<a name="line.652"></a>
-<span class="sourceLineNo">653</span>      if (! session.isIgnoreUnknownBeanProperties())<a
name="line.653"></a>
-<span class="sourceLineNo">654</span>         throw new ParseException(session,
"Unknown property ''{0}'' encountered while trying to parse into class ''{1}''", propertyName,
beanMap.getClassMeta());<a name="line.654"></a>
-<span class="sourceLineNo">655</span>      if (listeners.size() &gt; 0)<a
name="line.655"></a>
-<span class="sourceLineNo">656</span>         for (ParserListener listener :
listeners)<a name="line.656"></a>
-<span class="sourceLineNo">657</span>            listener.onUnknownProperty(propertyName,
beanMap.getClassMeta().getInnerClass(), beanMap.getBean(), line, col);<a name="line.657"></a>
-<span class="sourceLineNo">658</span>   }<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>   /**<a name="line.661"></a>
-<span class="sourceLineNo">662</span>    * Returns the media types handled based
on the value of the {@link Consumes} annotation on the parser class.<a name="line.662"></a>
-<span class="sourceLineNo">663</span>    * &lt;p&gt;<a name="line.663"></a>
-<span class="sourceLineNo">664</span>    * This method can be overridden by subclasses
to determine the media types programatically.<a name="line.664"></a>
-<span class="sourceLineNo">665</span>    *<a name="line.665"></a>
-<span class="sourceLineNo">666</span>    * @return The list of media types. 
Never &lt;jk&gt;null&lt;/jk&gt;.<a name="line.666"></a>
-<span class="sourceLineNo">667</span>    */<a name="line.667"></a>
-<span class="sourceLineNo">668</span>   public MediaType[] getMediaTypes() {<a
name="line.668"></a>
-<span class="sourceLineNo">669</span>      return mediaTypes;<a name="line.669"></a>
-<span class="sourceLineNo">670</span>   }<a name="line.670"></a>
-<span class="sourceLineNo">671</span><a name="line.671"></a>
-<span class="sourceLineNo">672</span>   /**<a name="line.672"></a>
-<span class="sourceLineNo">673</span>    * Returns the first media type specified
on this parser via the {@link Consumes} annotation.<a name="line.673"></a>
-<span class="sourceLineNo">674</span>    *<a name="line.674"></a>
-<span class="sourceLineNo">675</span>    * @return The media type.<a name="line.675"></a>
-<span class="sourceLineNo">676</span>    */<a name="line.676"></a>
-<span class="sourceLineNo">677</span>   public MediaType getPrimaryMediaType()
{<a name="line.677"></a>
-<span class="sourceLineNo">678</span>      return mediaTypes == null || mediaTypes.length
== 0 ? null : mediaTypes[0];<a name="line.678"></a>
-<span class="sourceLineNo">679</span>   }<a name="line.679"></a>
-<span class="sourceLineNo">680</span>}<a name="line.680"></a>
+<span class="sourceLineNo">599</span>   }<a name="line.599"></a>
+<span class="sourceLineNo">600</span><a name="line.600"></a>
+<span class="sourceLineNo">601</span>   /**<a name="line.601"></a>
+<span class="sourceLineNo">602</span>    * Method that gets called when an unknown
bean property name is encountered.<a name="line.602"></a>
+<span class="sourceLineNo">603</span>    *<a name="line.603"></a>
+<span class="sourceLineNo">604</span>    * @param session The parser session.<a
name="line.604"></a>
+<span class="sourceLineNo">605</span>    * @param propertyName The unknown bean
property name.<a name="line.605"></a>
+<span class="sourceLineNo">606</span>    * @param beanMap The bean that doesn't
have the expected property.<a name="line.606"></a>
+<span class="sourceLineNo">607</span>    * @param line The line number where
the property was found.  &lt;code&gt;-1&lt;/code&gt; if line numbers are not
available.<a name="line.607"></a>
+<span class="sourceLineNo">608</span>    * @param col The column number where
the property was found.  &lt;code&gt;-1&lt;/code&gt; if column numbers are
not available.<a name="line.608"></a>
+<span class="sourceLineNo">609</span>    * @throws ParseException Automatically
thrown if {@link BeanContext#BEAN_ignoreUnknownBeanProperties} setting<a name="line.609"></a>
+<span class="sourceLineNo">610</span>    *    on this parser is &lt;jk&gt;false&lt;/jk&gt;<a
name="line.610"></a>
+<span class="sourceLineNo">611</span>    * @param &lt;T&gt; The class
type of the bean map that doesn't have the expected property.<a name="line.611"></a>
+<span class="sourceLineNo">612</span>    */<a name="line.612"></a>
+<span class="sourceLineNo">613</span>   protected &lt;T&gt; void onUnknownProperty(ParserSession
session, String propertyName, BeanMap&lt;T&gt; beanMap, int line, int col) throws
ParseException {<a name="line.613"></a>
+<span class="sourceLineNo">614</span>      if (propertyName.equals("type") ||
propertyName.equals(session.getBeanTypePropertyName()))<a name="line.614"></a>
+<span class="sourceLineNo">615</span>         return;<a name="line.615"></a>
+<span class="sourceLineNo">616</span>      if (! session.isIgnoreUnknownBeanProperties())<a
name="line.616"></a>
+<span class="sourceLineNo">617</span>         throw new ParseException(session,
"Unknown property ''{0}'' encountered while trying to parse into class ''{1}''", propertyName,
beanMap.getClassMeta());<a name="line.617"></a>
+<span class="sourceLineNo">618</span>      if (listeners.size() &gt; 0)<a
name="line.618"></a>
+<span class="sourceLineNo">619</span>         for (ParserListener listener :
listeners)<a name="line.619"></a>
+<span class="sourceLineNo">620</span>            listener.onUnknownProperty(propertyName,
beanMap.getClassMeta().getInnerClass(), beanMap.getBean(), line, col);<a name="line.620"></a>
+<span class="sourceLineNo">621</span>   }<a name="line.621"></a>
+<span class="sourceLineNo">622</span><a name="line.622"></a>
+<span class="sourceLineNo">623</span><a name="line.623"></a>
+<span class="sourceLineNo">624</span>   /**<a name="line.624"></a>
+<span class="sourceLineNo">625</span>    * Returns the media types handled based
on the value of the {@link Consumes} annotation on the parser class.<a name="line.625"></a>
+<span class="sourceLineNo">626</span>    * &lt;p&gt;<a name="line.626"></a>
+<span class="sourceLineNo">627</span>    * This method can be overridden by subclasses
to determine the media types programatically.<a name="line.627"></a>
+<span class="sourceLineNo">628</span>    *<a name="line.628"></a>
+<span class="sourceLineNo">629</span>    * @return The list of media types. 
Never &lt;jk&gt;null&lt;/jk&gt;.<a name="line.629"></a>
+<span class="sourceLineNo">630</span>    */<a name="line.630"></a>
+<span class="sourceLineNo">631</span>   public MediaType[] getMediaTypes() {<a
name="line.631"></a>
+<span class="sourceLineNo">632</span>      return mediaTypes;<a name="line.632"></a>
+<span class="sourceLineNo">633</span>   }<a name="line.633"></a>
+<span class="sourceLineNo">634</span><a name="line.634"></a>
+<span class="sourceLineNo">635</span>   /**<a name="line.635"></a>
+<span class="sourceLineNo">636</span>    * Returns the first media type specified
on this parser via the {@link Consumes} annotation.<a name="line.636"></a>
+<span class="sourceLineNo">637</span>    *<a name="line.637"></a>
+<span class="sourceLineNo">638</span>    * @return The media type.<a name="line.638"></a>
+<span class="sourceLineNo">639</span>    */<a name="line.639"></a>
+<span class="sourceLineNo">640</span>   public MediaType getPrimaryMediaType()
{<a name="line.640"></a>
+<span class="sourceLineNo">641</span>      return mediaTypes == null || mediaTypes.length
== 0 ? null : mediaTypes[0];<a name="line.641"></a>
+<span class="sourceLineNo">642</span>   }<a name="line.642"></a>
+<span class="sourceLineNo">643</span>}<a name="line.643"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/5aed2f48/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.Builder.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.Builder.html
b/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.Builder.html
index 10bb134..8b57c5c 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.Builder.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.Builder.html
@@ -75,13 +75,13 @@
 <span class="sourceLineNo">067</span>    * &lt;/ul&gt;<a name="line.67"></a>
 <span class="sourceLineNo">068</span>    * @throws IOException<a name="line.68"></a>
 <span class="sourceLineNo">069</span>    */<a name="line.69"></a>
-<span class="sourceLineNo">070</span>   public ReaderResource(MediaType mediaType,
Map&lt;String,Object&gt; headers, VarResolverSession varSession, Object...contents)
throws IOException {<a name="line.70"></a>
+<span class="sourceLineNo">070</span>   public ReaderResource(MediaType mediaType,
Map&lt;String,String&gt; headers, VarResolverSession varSession, Object...contents)
throws IOException {<a name="line.70"></a>
 <span class="sourceLineNo">071</span>      this.mediaType = mediaType;<a name="line.71"></a>
 <span class="sourceLineNo">072</span>      this.varSession = varSession;<a
name="line.72"></a>
 <span class="sourceLineNo">073</span><a name="line.73"></a>
 <span class="sourceLineNo">074</span>      Map&lt;String,String&gt; m
= new LinkedHashMap&lt;String,String&gt;();<a name="line.74"></a>
 <span class="sourceLineNo">075</span>      if (headers != null)<a name="line.75"></a>
-<span class="sourceLineNo">076</span>         for (Map.Entry&lt;String,Object&gt;
e : headers.entrySet())<a name="line.76"></a>
+<span class="sourceLineNo">076</span>         for (Map.Entry&lt;String,String&gt;
e : headers.entrySet())<a name="line.76"></a>
 <span class="sourceLineNo">077</span>            m.put(e.getKey(), StringUtils.toString(e.getValue()));<a
name="line.77"></a>
 <span class="sourceLineNo">078</span>      this.headers = Collections.unmodifiableMap(m);<a
name="line.78"></a>
 <span class="sourceLineNo">079</span><a name="line.79"></a>

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/5aed2f48/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.html b/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.html
index 10bb134..8b57c5c 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/ReaderResource.html
@@ -75,13 +75,13 @@
 <span class="sourceLineNo">067</span>    * &lt;/ul&gt;<a name="line.67"></a>
 <span class="sourceLineNo">068</span>    * @throws IOException<a name="line.68"></a>
 <span class="sourceLineNo">069</span>    */<a name="line.69"></a>
-<span class="sourceLineNo">070</span>   public ReaderResource(MediaType mediaType,
Map&lt;String,Object&gt; headers, VarResolverSession varSession, Object...contents)
throws IOException {<a name="line.70"></a>
+<span class="sourceLineNo">070</span>   public ReaderResource(MediaType mediaType,
Map&lt;String,String&gt; headers, VarResolverSession varSession, Object...contents)
throws IOException {<a name="line.70"></a>
 <span class="sourceLineNo">071</span>      this.mediaType = mediaType;<a name="line.71"></a>
 <span class="sourceLineNo">072</span>      this.varSession = varSession;<a
name="line.72"></a>
 <span class="sourceLineNo">073</span><a name="line.73"></a>
 <span class="sourceLineNo">074</span>      Map&lt;String,String&gt; m
= new LinkedHashMap&lt;String,String&gt;();<a name="line.74"></a>
 <span class="sourceLineNo">075</span>      if (headers != null)<a name="line.75"></a>
-<span class="sourceLineNo">076</span>         for (Map.Entry&lt;String,Object&gt;
e : headers.entrySet())<a name="line.76"></a>
+<span class="sourceLineNo">076</span>         for (Map.Entry&lt;String,String&gt;
e : headers.entrySet())<a name="line.76"></a>
 <span class="sourceLineNo">077</span>            m.put(e.getKey(), StringUtils.toString(e.getValue()));<a
name="line.77"></a>
 <span class="sourceLineNo">078</span>      this.headers = Collections.unmodifiableMap(m);<a
name="line.78"></a>
 <span class="sourceLineNo">079</span><a name="line.79"></a>



Mime
View raw message