http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java b/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java index 2e3bfa4..f646040 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java @@ -35,87 +35,91 @@ import org.apache.juneau.utils.*; * <p> * However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()} method. * - * <a id='ValidDataConversions'></a><h6 class='topic'>Valid data conversions</h6> - * Parsers can parse any parsable POJO types, as specified in the <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>. + * <h6 class='topic'>Valid data conversions</h6> + * Parsers can parse any parsable POJO types, as specified in the <a class="doclink" + * href="../../../../overview-summary.html#Core.PojoCategories">POJO Categories</a>. * <p> * Some examples of conversions are shown below... * </p> - * <table class='styled'> - * <tr> - * <th>Data type</th> - * <th>Class type</th> - * <th>JSON example</th> - * <th>XML example</th> - * <th>Class examples</th> - * </tr> - * <tr> - * <td>object</td> - * <td>Maps, Java beans</td> - * <td class='code'>{name:<js>'John Smith'</js>,age:21}</td> - * <td class='code'><xt><object> + * <table class='styled'> + * <tr> + * <th>Data type</th> + * <th>Class type</th> + * <th>JSON example</th> + * <th>XML example</th> + * <th>Class examples</th> + * </tr> + * <tr> + * <td>object</td> + * <td>Maps, Java beans</td> + * <td class='code'>{name:<js>'John Smith'</js>,age:21}</td> + * <td class='code'><xt><object> * <name</xt> <xa>type</xa>=<xs>'string'</xs><xt>></xt>John Smith<xt></name> * <age</xt> <xa>type</xa>=<xs>'number'</xs><xt>></xt>21<xt></age> * </object></xt></td> - * <td class='code'>HashMap, TreeMap<String,Integer></td> - * </tr> - * <tr> - * <td>array</td> - * <td>Collections, Java arrays</td> - * <td class='code'>[1,2,3]</td> - * <td class='code'><xt><array> + * <td class='code'>HashMap, TreeMap<String,Integer></td> + * </tr> + * <tr> + * <td>array</td> + * <td>Collections, Java arrays</td> + * <td class='code'>[1,2,3]</td> + * <td class='code'><xt><array> * <number></xt>1<xt></number> * <number></xt>2<xt></number> * <number></xt>3<xt></number> * </array></xt></td> - * <td class='code'>List<Integer>, <jk>int</jk>[], Float[], Set<Person></td> - * </tr> - * <tr> - * <td>number</td> - * <td>Numbers</td> - * <td class='code'>123</td> - * <td class='code'><xt><number></xt>123<xt></number></xt></td> - * <td class='code'>Integer, Long, Float, <jk>int</jk></td> - * </tr> - * <tr> - * <td>boolean</td> - * <td>Booleans</td> - * <td class='code'><jk>true</jk></td> - * <td class='code'><xt><boolean></xt>true<xt></boolean></xt></td> - * <td class='code'>Boolean</td> - * </tr> - * <tr> - * <td>string</td> - * <td>CharSequences</td> - * <td class='code'><js>'foobar'</js></td> - * <td class='code'><xt><string></xt>foobar<xt></string></xt></td> - * <td class='code'>String, StringBuilder</td> - * </tr> - * </table> + * <td class='code'>List<Integer>, <jk>int</jk>[], Float[], Set<Person></td> + * </tr> + * <tr> + * <td>number</td> + * <td>Numbers</td> + * <td class='code'>123</td> + * <td class='code'><xt><number></xt>123<xt></number></xt></td> + * <td class='code'>Integer, Long, Float, <jk>int</jk></td> + * </tr> + * <tr> + * <td>boolean</td> + * <td>Booleans</td> + * <td class='code'><jk>true</jk></td> + * <td class='code'><xt><boolean></xt>true<xt></boolean></xt></td> + * <td class='code'>Boolean</td> + * </tr> + * <tr> + * <td>string</td> + * <td>CharSequences</td> + * <td class='code'><js>'foobar'</js></td> + * <td class='code'><xt><string></xt>foobar<xt></string></xt></td> + * <td class='code'>String, StringBuilder</td> + * </tr> + * </table> * <p> * In addition, any class types with {@link PojoSwap PojoSwaps} associated with them on the registered * {@link #getBeanContext() beanContext} can also be passed in. * <p> - * For example, if the {@link CalendarSwap} transform is used to generalize {@code Calendar} objects to {@code String} objects. When registered - * with this parser, you can construct {@code Calendar} objects from {@code Strings} using the following syntax... + * For example, if the {@link CalendarSwap} transform is used to generalize {@code Calendar} objects to {@code String} + * objects. + * When registered with this parser, you can construct {@code Calendar} objects from {@code Strings} using the + * following syntax... * <p class='bcode'> * Calendar c = parser.parse(<js>"'Sun Mar 03 04:05:06 EST 2001'"</js>, GregorianCalendar.<jk>class</jk>); * <p> - * If <code>Object.<jk>class</jk></code> is specified as the target type, then the parser - * automatically determines the data types and generates the following object types... + * If <code>Object.<jk>class</jk></code> is specified as the target type, then the parser automatically determines the + * data types and generates the following object types... * </p> * <table class='styled'> * <tr><th>JSON type</th><th>Class type</th></tr> * <tr><td>object</td><td>{@link ObjectMap}</td></tr> * <tr><td>array</td><td>{@link ObjectList}</td></tr> - * <tr><td>number</td><td>{@link Number} <br>(depending on length and format, could be {@link Integer}, {@link Double}, {@link Float}, etc...)</td></tr> + * <tr><td>number</td><td>{@link Number} <br>(depending on length and format, could be {@link Integer}, + * {@link Double}, {@link Float}, etc...)</td></tr> * <tr><td>boolean</td><td>{@link Boolean}</td></tr> * <tr><td>string</td><td>{@link String}</td></tr> * </table> * * <a id='SupportedTypes'></a><h6 class='topic'>Supported types</h6> * <p> - * Several of the methods below take {@link Type} parameters to identify the type of - * object to create. Any of the following types can be passed in to these methods... + * Several of the methods below take {@link Type} parameters to identify the type of object to create. + * Any of the following types can be passed in to these methods... * </p> * <ul> * <li>{@link ClassMeta} @@ -125,10 +129,10 @@ import org.apache.juneau.utils.*; * </ul> * <p> * However, {@code ParameterizedTypes} and {@code GenericArrayTypes} should not contain - * {@link WildcardType WildcardTypes} or {@link TypeVariable TypeVariables}. + * {@link WildcardType WildcardTypes} or {@link TypeVariable TypeVariables}. * <p> * Passing in <jk>null</jk> or <code>Object.<jk>class</jk></code> typically signifies that it's up to the parser - * to determine what object type is being parsed parsed based on the rules above. + * to determine what object type is being parsed parsed based on the rules above. */ public abstract class Parser extends CoreObject { @@ -163,11 +167,14 @@ public abstract class Parser extends CoreObject { /** * Workhorse method. Subclasses are expected to implement this method. - * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}. + * + * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object, + * Locale, TimeZone, MediaType)}. * If <jk>null</jk>, one will be created using {@link #createSession(Object)}. * @param type The class type of the object to create. * If <jk>null</jk> or <code>Object.<jk>class</jk></code>, object type is based on what's being parsed. - * For example, when parsing JSON text, it may return a <code>String</code>, <code>Number</code>, <code>ObjectMap</code>, etc... + * For example, when parsing JSON text, it may return a <code>String</code>, <code>Number</code>, + * <code>ObjectMap</code>, etc... * @param <T> The class type of the object to create. * @return The parsed object. * @throws Exception If thrown from underlying stream, or if the input contains a syntax error or is malformed. @@ -188,12 +195,16 @@ public abstract class Parser extends CoreObject { /** * Entry point for all parsing calls. * <p> - * Calls the {@link #doParse(ParserSession, ClassMeta)} implementation class and catches/rewraps any exceptions thrown. - * @param session The runtime session returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}. + * Calls the {@link #doParse(ParserSession, ClassMeta)} implementation class and catches/rewraps any exceptions + * thrown. + * + * @param session The runtime session returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale, + * TimeZone, MediaType)}. * @param type The class type of the object to create. * @param <T> The class type of the object to create. * @return The parsed object. - * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. + * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified + * type. */ public final <T> T parseSession(ParserSession session, ClassMeta<T> type) throws ParseException { try { @@ -205,9 +216,11 @@ public abstract class Parser extends CoreObject { } catch (StackOverflowError e) { throw new ParseException(session, "Depth too deep. Stack overflow occurred."); } catch (IOException e) { - throw new ParseException(session, "I/O exception occurred. exception={0}, message={1}.", e.getClass().getSimpleName(), e.getLocalizedMessage()).initCause(e); + throw new ParseException(session, "I/O exception occurred. exception={0}, message={1}.", + e.getClass().getSimpleName(), e.getLocalizedMessage()).initCause(e); } catch (Exception e) { - throw new ParseException(session, "Exception occurred. exception={0}, message={1}.", e.getClass().getSimpleName(), e.getLocalizedMessage()).initCause(e); + throw new ParseException(session, "Exception occurred. exception={0}, message={1}.", + e.getClass().getSimpleName(), e.getLocalizedMessage()).initCause(e); } finally { session.close(); } @@ -250,29 +263,37 @@ public abstract class Parser extends CoreObject { * * @param <T> The class type of the object to create. * @param input The input. - * <br>Character-based parsers can handle the following input class types: - * <ul> - * <li><jk>null</jk> - * <li>{@link Reader} - * <li>{@link CharSequence} - * <li>{@link InputStream} containing UTF-8 encoded text (or charset defined by {@link ParserContext#PARSER_inputStreamCharset} property value). - * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or charset defined by {@link ParserContext#PARSER_inputStreamCharset} property value). - * <li>{@link File} containing system encoded text (or charset defined by {@link ParserContext#PARSER_fileCharset} property value). - * </ul> - * <br>Stream-based parsers can handle the following input class types: - * <ul> - * <li><jk>null</jk> - * <li>{@link InputStream} - * <li><code><jk>byte</jk>[]</code> - * <li>{@link File} - * </ul> + * <br> + * Character-based parsers can handle the following input class types: + * <ul> + * <li><jk>null</jk> + * <li>{@link Reader} + * <li>{@link CharSequence} + * <li>{@link InputStream} containing UTF-8 encoded text (or charset defined by + * {@link ParserContext#PARSER_inputStreamCharset} property value). + * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or charset defined by + * {@link ParserContext#PARSER_inputStreamCharset} property value). + * <li>{@link File} containing system encoded text (or charset defined by + * {@link ParserContext#PARSER_fileCharset} property value). + * </ul> + * <br> + * Stream-based parsers can handle the following input class types: + * <ul> + * <li><jk>null</jk> + * <li>{@link InputStream} + * <li><code><jk>byte</jk>[]</code> + * <li>{@link File} + * </ul> * @param type The object type to create. - * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} + * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, + * {@link GenericArrayType} * @param args The type arguments of the class if it's a collection or map. - * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, {@link GenericArrayType} - * <br>Ignored if the main type is not a map or collection. + * <br>Can be any of the following: {@link ClassMeta}, {@link Class}, {@link ParameterizedType}, + * {@link GenericArrayType} + * <br>Ignored if the main type is not a map or collection. * @return The parsed object. - * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. + * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified + * type. * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections. */ @SuppressWarnings("unchecked") @@ -310,7 +331,8 @@ public abstract class Parser extends CoreObject { * See {@link #parse(Object, Type, Type...)} for details. * @param type The object type to create. * @return The parsed object. - * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. + * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified + * type. */ public final <T> T parse(Object input, Class<T> type) throws ParseException { ParserSession session = createSession(input); @@ -318,7 +340,8 @@ public abstract class Parser extends CoreObject { } /** - * Same as {@link #parse(Object, Type, Type...)} except the type has already been converted into a {@link ClassMeta} object. + * Same as {@link #parse(Object, Type, Type...)} except the type has already been converted into a {@link ClassMeta} + * object. * <p> * This is mostly an internal method used by the framework. * @@ -327,7 +350,8 @@ public abstract class Parser extends CoreObject { * See {@link #parse(Object, Type, Type...)} for details. * @param type The object type to create. * @return The parsed object. - * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. + * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified + * type. */ public final <T> T parse(Object input, ClassMeta<T> type) throws ParseException { return parseSession(createSession(input), type); @@ -336,8 +360,8 @@ public abstract class Parser extends CoreObject { /** * Create the session object that will be passed in to the parse method. * <p> - * It's up to implementers to decide what the session object looks like, although typically - * it's going to be a subclass of {@link ParserSession}. + * It's up to implementers to decide what the session object looks like, although typically it's going to be a + * subclass of {@link ParserSession}. * * @param input The input. See {@link #parse(Object, ClassMeta)} for supported input types. * @param op Optional additional properties. @@ -352,7 +376,8 @@ public abstract class Parser extends CoreObject { * @param mediaType The session media type (e.g. <js>"application/json"</js>). * @return The new session. */ - public ParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) { + public ParserSession createSession(Object input, ObjectMap op, Method javaMethod, Object outer, Locale locale, + TimeZone timeZone, MediaType mediaType) { return new ParserSession(ctx, op, input, javaMethod, outer, locale, timeZone, mediaType); } @@ -380,15 +405,16 @@ public abstract class Parser extends CoreObject { * <p> * Used in the following locations: * <ul class='spaced-list'> - * <li>The various character-based constructors in {@link ObjectMap} (e.g. {@link ObjectMap#ObjectMap(CharSequence,Parser)}). + * <li>The various character-based constructors in {@link ObjectMap} (e.g. + * {@link ObjectMap#ObjectMap(CharSequence,Parser)}). * </ul> * * @param <K> The key class type. * @param <V> The value class type. * @param input The input. See {@link #parse(Object, ClassMeta)} for supported input types. * @param m The map being loaded. - * @param keyType The class type of the keys, or <jk>null</jk> to default to <code>String.<jk>class</jk></code>.<br> - * @param valueType The class type of the values, or <jk>null</jk> to default to whatever is being parsed.<br> + * @param keyType The class type of the keys, or <jk>null</jk> to default to <code>String.<jk>class</jk></code>. + * @param valueType The class type of the values, or <jk>null</jk> to default to whatever is being parsed. * @return The same map that was passed in to allow this method to be chained. * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. * @throws UnsupportedOperationException If not implemented. @@ -409,12 +435,13 @@ public abstract class Parser extends CoreObject { /** * Implementation method. * Default implementation throws an {@link UnsupportedOperationException}. - * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}. + * + * @param session The runtime session object returned by + * {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}. * If <jk>null</jk>, one will be created using {@link #createSession(Object)}. * @param m The map being loaded. - * @param keyType The class type of the keys, or <jk>null</jk> to default to <code>String.<jk>class</jk></code>.<br> - * @param valueType The class type of the values, or <jk>null</jk> to default to whatever is being parsed.<br> - * + * @param keyType The class type of the keys, or <jk>null</jk> to default to <code>String.<jk>class</jk></code>. + * @param valueType The class type of the values, or <jk>null</jk> to default to whatever is being parsed. * @return The same map that was passed in to allow this method to be chained. * @throws Exception If thrown from underlying stream, or if the input contains a syntax error or is malformed. */ @@ -427,7 +454,8 @@ public abstract class Parser extends CoreObject { * <p> * Used in the following locations: * <ul class='spaced-list'> - * <li>The various character-based constructors in {@link ObjectList} (e.g. {@link ObjectList#ObjectList(CharSequence,Parser)}. + * <li>The various character-based constructors in {@link ObjectList} (e.g. + * {@link ObjectList#ObjectList(CharSequence,Parser)}. * </ul> * * @param <E> The element class type. @@ -435,10 +463,12 @@ public abstract class Parser extends CoreObject { * @param c The collection being loaded. * @param elementType The class type of the elements, or <jk>null</jk> to default to whatever is being parsed. * @return The same collection that was passed in to allow this method to be chained. - * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. + * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified + * type. * @throws UnsupportedOperationException If not implemented. */ - public final <E> Collection<E> parseIntoCollection(Object input, Collection<E> c, Type elementType) throws ParseException { + public final <E> Collection<E> parseIntoCollection(Object input, Collection<E> c, Type elementType) + throws ParseException { ParserSession session = createSession(input); try { return doParseIntoCollection(session, c, elementType); @@ -454,11 +484,12 @@ public abstract class Parser extends CoreObject { /** * Implementation method. * Default implementation throws an {@link UnsupportedOperationException}. - * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object, Locale, TimeZone, MediaType)}. + * + * @param session The runtime session object returned by {@link #createSession(Object, ObjectMap, Method, Object, + * Locale, TimeZone, MediaType)}. * If <jk>null</jk>, one will be created using {@link #createSession(Object)}. * @param c The collection being loaded. * @param elementType The class type of the elements, or <jk>null</jk> to default to whatever is being parsed. - * * @return The same collection that was passed in to allow this method to be chained. * @throws Exception If thrown from underlying stream, or if the input contains a syntax error or is malformed. */ @@ -471,7 +502,7 @@ public abstract class Parser extends CoreObject { * argument. * <p> * Used for converting arrays (e.g. <js>"[arg1,arg2,...]"</js>) into an {@code Object[]} that can be passed - * to the {@code Method.invoke(target, args)} method. + * to the {@code Method.invoke(target, args)} method. * <p> * Used in the following locations: * <ul class='spaced-list'> @@ -481,7 +512,8 @@ public abstract class Parser extends CoreObject { * @param input The input. Subclasses can support different input types. * @param argTypes Specifies the type of objects to create for each entry in the array. * @return An array of parsed objects. - * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified type. + * @throws ParseException If the input contains a syntax error or is malformed, or is not valid for the specified + * type. */ public final Object[] parseArgs(Object input, Type[] argTypes) throws ParseException { if (argTypes == null || argTypes.length == 0) @@ -507,7 +539,8 @@ public abstract class Parser extends CoreObject { * Converts the specified string to the specified type. * * @param session The session object. - * @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. + * @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. * @param s The string to convert. * @param type The class type to convert the string to. * @return The string converted as an object of the specified type. @@ -548,8 +581,8 @@ public abstract class Parser extends CoreObject { } /** - * Convenience method for calling the {@link ParentProperty @ParentProperty} method on - * the specified object if it exists. + * Convenience method for calling the {@link ParentProperty @ParentProperty} method on the specified object if it + * exists. * * @param cm The class type of the object. * @param o The object. @@ -563,8 +596,7 @@ public abstract class Parser extends CoreObject { } /** - * Convenience method for calling the {@link NameProperty @NameProperty} method on - * the specified object if it exists. + * Convenience method for calling the {@link NameProperty @NameProperty} method on the specified object if it exists. * * @param cm The class type of the object. * @param o The object. @@ -582,7 +614,7 @@ public abstract class Parser extends CoreObject { /** * Returns the media types handled based on the value of the {@link Consumes} annotation on the parser class. * <p> - * This method can be overridden by subclasses to determine the media types programatically. + * This method can be overridden by subclasses to determine the media types programmatically. * * @return The list of media types. Never <jk>null</jk>. */
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java index b15ab39..9a8ee52 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserBuilder.java @@ -34,6 +34,7 @@ public class ParserBuilder extends CoreObjectBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public ParserBuilder(PropertyStore propertyStore) { @@ -60,7 +61,8 @@ public class ParserBuilder extends CoreObjectBuilder { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to the POJO. + * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to + * the POJO. * <p> * <h5 class='section'>Notes:</h5> * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java index bff9dec..47d2384 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserContext.java @@ -30,7 +30,8 @@ public class ParserContext extends BeanContext { * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> * <p> - * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to the POJO. + * If <jk>true</jk>, string values will be trimmed of whitespace using {@link String#trim()} before being added to + * the POJO. */ public static final String PARSER_trimStrings = "Parser.trimStrings"; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java index 47cfc44..65dcb94 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java @@ -80,8 +80,8 @@ public final class ParserGroup { * @param propertyStore The modifiable properties that were used to initialize the parsers. * A snapshot of these will be made so that we can clone and modify this group. * @param parsers The parsers defined in this group. - * The order is important because they will be tried in reverse order (e.g. - * newer first) in which they will be tried to match against media types. + * The order is important because they will be tried in reverse order (e.g. newer first) in which they will be tried + * to match against media types. */ public ParserGroup(PropertyStore propertyStore, Parser[] parsers) { this.propertyStore = PropertyStore.create(propertyStore); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java index 1731af9..27335a6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroupBuilder.java @@ -52,6 +52,7 @@ public class ParserGroupBuilder { /** * Clone an existing parser group builder. + * * @param copyFrom The parser group that we're copying settings and parsers from. */ public ParserGroupBuilder(ParserGroup copyFrom) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java index dacc587..a870043 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserListener.java @@ -29,24 +29,29 @@ public class ParserListener { * * @param <T> The class type of the bean. * @param session The parser session. - * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through - * {@link ParserSession#getInputAsString()}. + * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through + * {@link ParserSession#getInputAsString()}. * @param propertyName The property name encountered in the document. * @param beanClass The bean class. * @param bean The bean. - * @param line The line number where the unknown property was found (-1 if parser doesn't support line/column indicators). - * @param col The column number where the unknown property was found (-1 if parser doesn't support line/column indicators). + * @param line The line number where the unknown property was found (-1 if parser doesn't support line/column + * indicators). + * @param col The column number where the unknown property was found (-1 if parser doesn't support line/column + * indicators). */ public <T> void onUnknownBeanProperty(ParserSession session, String propertyName, Class<T> beanClass, T bean, int line, int col) { - onError(session, null, format("Unknown property ''{0}'' encountered while trying to parse into class ''{1}'' at line {2} column {3}", propertyName, beanClass, line, col)); + onError(session, null, + format("Unknown property ''{0}'' encountered while trying to parse into class ''{1}'' at line {2} column {3}", + propertyName, beanClass, line, col) + ); } /** * Called when an error occurs during parsing but is ignored. * * @param session The parsers session. - * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through - * {@link ParserSession#getInputAsString()}. + * Note that if {@link BeanContext#BEAN_debug} is enabled on the parser, you can get the input as a string through + * {@link ParserSession#getInputAsString()}. * @param t The throwable that was thrown by the getter method. * @param msg The error message. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java index fa93caa..c15e65f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserReader.java @@ -87,8 +87,8 @@ public class ParserReader extends Reader { /** * Reads a single character. - * Note that this method does NOT process extended unicode characters (i.e. characters - * above 0x10000), but rather returns them as two <jk>char</jk>s. + * Note that this method does NOT process extended unicode characters (i.e. characters above 0x10000), but rather + * returns them as two <jk>char</jk>s. * Use {@link #readCodePoint()} to ensure proper handling of extended unicode. * * @return The character read, or -1 if the end of the stream has been reached. @@ -123,8 +123,7 @@ public class ParserReader extends Reader { } /** - * Same as {@link #read()} but detects and combines extended unicode characters (i.e. characters - * above 0x10000). + * Same as {@link #read()} but detects and combines extended unicode characters (i.e. characters above 0x10000). * * @return The character read, or -1 if the end of the stream has been reached. * @throws IOException If a problem occurred trying to read from the reader. @@ -362,9 +361,8 @@ public class ParserReader extends Reader { /** * Replaces the last character in the marking buffer with the specified character. - * <code>offset</code> must be at least <code>1</code> for normal characters, and - * <code>2</code> for extended unicode characters in order for the replacement - * to fit into the buffer. + * <code>offset</code> must be at least <code>1</code> for normal characters, and <code>2</code> for extended + * unicode characters in order for the replacement to fit into the buffer. * * @param c The new character. * @param offset The offset. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java index 05f2f8b..40d6114 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserSession.java @@ -56,9 +56,12 @@ public class ParserSession extends BeanSession { * <li><jk>null</jk> * <li>{@link Reader} * <li>{@link CharSequence} - * <li>{@link InputStream} containing UTF-8 encoded text (or whatever the encoding specified by {@link ParserContext#PARSER_inputStreamCharset}). - * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by {@link ParserContext#PARSER_inputStreamCharset}). - * <li>{@link File} containing system encoded text (or whatever the encoding specified by {@link ParserContext#PARSER_fileCharset}). + * <li>{@link InputStream} containing UTF-8 encoded text (or whatever the encoding specified by + * {@link ParserContext#PARSER_inputStreamCharset}). + * <li><code><jk>byte</jk>[]</code> containing UTF-8 encoded text (or whatever the encoding specified by + * {@link ParserContext#PARSER_inputStreamCharset}). + * <li>{@link File} containing system encoded text (or whatever the encoding specified by + * {@link ParserContext#PARSER_fileCharset}). * </ul> * <br>For byte-based parsers, this can be any of the following types: * <ul> @@ -67,6 +70,7 @@ public class ParserSession extends BeanSession { * <li><code><jk>byte</jk>[]</code> * <li>{@link File} * </ul> + * * @param op The override properties. * These override any context properties defined in the context. * @param javaMethod The java method that called this parser, usually the method in a REST servlet. @@ -77,7 +81,8 @@ public class ParserSession extends BeanSession { * If <jk>null</jk>, then the timezone defined on the context is used. * @param mediaType The session media type (e.g. <js>"application/json"</js>). */ - public ParserSession(ParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale, TimeZone timeZone, MediaType mediaType) { + public ParserSession(ParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, Locale locale, + TimeZone timeZone, MediaType mediaType) { super(ctx, op, locale, timeZone, mediaType); Class<?> listenerClass; if (op == null || op.isEmpty()) { @@ -167,9 +172,17 @@ public class ParserSession extends BeanSession { return reader; } if (input instanceof InputStream || input instanceof byte[]) { - InputStream is = (input instanceof InputStream ? (InputStream)input : new ByteArrayInputStream((byte[])input)); + InputStream is = ( + input instanceof InputStream + ? (InputStream)input + : new ByteArrayInputStream((byte[])input) + ); if (noCloseReader == null) { - CharsetDecoder cd = ("default".equalsIgnoreCase(inputStreamCharset) ? Charset.defaultCharset() : Charset.forName(inputStreamCharset)).newDecoder(); + CharsetDecoder cd = ( + "default".equalsIgnoreCase(inputStreamCharset) + ? Charset.defaultCharset() + : Charset.forName(inputStreamCharset) + ).newDecoder(); if (strict) { cd.onMalformedInput(CodingErrorAction.REPORT); cd.onUnmappableCharacter(CodingErrorAction.REPORT); @@ -187,7 +200,11 @@ public class ParserSession extends BeanSession { } if (input instanceof File) { if (reader == null) { - CharsetDecoder cd = ("default".equalsIgnoreCase(fileCharset) ? Charset.defaultCharset() : Charset.forName(fileCharset)).newDecoder(); + CharsetDecoder cd = ( + "default".equalsIgnoreCase(fileCharset) + ? Charset.defaultCharset() + : Charset.forName(fileCharset) + ).newDecoder(); if (strict) { cd.onMalformedInput(CodingErrorAction.REPORT); cd.onUnmappableCharacter(CodingErrorAction.REPORT); @@ -253,6 +270,7 @@ public class ParserSession extends BeanSession { /** * Sets the current bean property being parsed for proper error messages. + * * @param currentProperty The current property being parsed. */ public void setCurrentProperty(BeanPropertyMeta currentProperty) { @@ -261,6 +279,7 @@ public class ParserSession extends BeanSession { /** * Sets the current class being parsed for proper error messages. + * * @param currentClass The current class being parsed. */ public void setCurrentClass(ClassMeta<?> currentClass) { @@ -289,7 +308,7 @@ public class ParserSession extends BeanSession { * Trims the specified object if it's a <code>String</code> and {@link #isTrimStrings()} returns <jk>true</jk>. * * @param o The object to trim. - * @return The trimmmed string if it's a string. + * @return The trimmed string if it's a string. */ @SuppressWarnings("unchecked") public final <K> K trim(K o) { @@ -312,14 +331,13 @@ public class ParserSession extends BeanSession { } /** - * Converts the specified <code>ObjectMap</code> into a bean identified by the <js>"_type"</js> - * property in the map. + * Converts the specified <code>ObjectMap</code> into a bean identified by the <js>"_type"</js> property in the map. * * @param m The map to convert to a bean. * @param pMeta The current bean property being parsed. * @param eType The current expected type being parsed. - * @return The converted bean, or the same map if the <js>"_type"</js> entry wasn't found - * or didn't resolve to a bean. + * @return The converted bean, or the same map if the <js>"_type"</js> entry wasn't found or didn't resolve to a + * bean. */ public final Object cast(ObjectMap m, BeanPropertyMeta pMeta, ClassMeta<?> eType) { @@ -390,16 +408,19 @@ public class ParserSession extends BeanSession { * @param line The line number where the property was found. <code>-1</code> if line numbers are not available. * @param col The column number where the property was found. <code>-1</code> if column numbers are not available. * @throws ParseException Automatically thrown if {@link BeanContext#BEAN_ignoreUnknownBeanProperties} setting - * on this parser is <jk>false</jk> + * on this parser is <jk>false</jk> * @param <T> The class type of the bean map that doesn't have the expected property. */ public <T> void onUnknownProperty(String propertyName, BeanMap<T> beanMap, int line, int col) throws ParseException { if (propertyName.equals(getBeanTypePropertyName(beanMap.getClassMeta()))) return; if (! isIgnoreUnknownBeanProperties()) - throw new ParseException(this, "Unknown property ''{0}'' encountered while trying to parse into class ''{1}''", propertyName, beanMap.getClassMeta()); + throw new ParseException(this, + "Unknown property ''{0}'' encountered while trying to parse into class ''{1}''", propertyName, + beanMap.getClassMeta()); if (listener != null) - listener.onUnknownBeanProperty(this, propertyName, beanMap.getClassMeta().getInnerClass(), beanMap.getBean(), line, col); + listener.onUnknownBeanProperty(this, propertyName, beanMap.getClassMeta().getInnerClass(), beanMap.getBean(), + line, col); } /** http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java b/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java index 12d8677..39aa2b3 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ReaderParser.java @@ -36,6 +36,7 @@ public abstract class ReaderParser extends Parser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ protected ReaderParser(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/parser/package.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/package.html b/juneau-core/src/main/java/org/apache/juneau/parser/package.html index ea6b20d..f60953c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/package.html +++ b/juneau-core/src/main/java/org/apache/juneau/parser/package.html @@ -70,9 +70,10 @@ <h2 class='topic' onclick='toggle(this)'>1 - Parser API</h2> <div class='topic'> <p> - The parser API is designed to be easily extensible by developers. <br> - If you are writing your own parser, you will typically subclass directly from either {@link org.apache.juneau.parser.ReaderParser} - or {@link org.apache.juneau.parser.InputStreamParser}.<br> + The parser API is designed to be easily extensible by developers. + <br> + If you are writing your own parser, you will typically subclass directly from either + {@link org.apache.juneau.parser.ReaderParser} or {@link org.apache.juneau.parser.InputStreamParser}. </p> <!-- ======================================================================================================== --> @@ -80,7 +81,8 @@ <h3 class='topic' onclick='toggle(this)'>1.1 - The ParserGroup class</h3> <div class='topic'> <p> - The {@link org.apache.juneau.parser.ParserGroup} class represents a group of parser registered with the media types they handle. + The {@link org.apache.juneau.parser.ParserGroup} class represents a group of parser registered with the + media types they handle. </p> <h6 class='topic'>Features</h6> @@ -106,8 +108,9 @@ <div class='topic'> <p> Defining a new parser is quite simple if you subclass directly from {@link org.apache.juneau.parser.ReaderParser} - or {@link org.apache.juneau.parser.InputStreamParser}. In each case, you simply need to implement a single - method and specify a {@link org.apache.juneau.annotation.Consumes} annotation. + or {@link org.apache.juneau.parser.InputStreamParser}. + In each case, you simply need to implement a single method and specify a + {@link org.apache.juneau.annotation.Consumes} annotation. </p> <p> The following example shows a simple parser that converts input streams to images using standard JRE classes. @@ -123,9 +126,10 @@ } </p> <p> - Parsers that take advantage of the entire {@link org.apache.juneau.CoreObject} interface to be able to parse arbitrary beans and POJOs is - considerably more complex and outside the scope of this document. - If developing such a parser, the best course of action would be to replicate what occurs in the {@link org.apache.juneau.json.JsonParser} class. + Parsers that take advantage of the entire {@link org.apache.juneau.CoreObject} interface to be able to parse + arbitrary beans and POJOs is considerably more complex and outside the scope of this document. + If developing such a parser, the best course of action would be to replicate what occurs in the + {@link org.apache.juneau.json.JsonParser} class. </p> </div> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java index 850d320..c0cc95c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java @@ -20,7 +20,8 @@ import org.apache.juneau.parser.*; import org.apache.juneau.transform.*; /** - * Parsers HTTP plain text request bodies into <a class="doclink" href="../../../../overview-summary.html#Core.PojoCategories">Group 5</a> POJOs. + * Parsers HTTP plain text request bodies into <a class="doclink" + * href="../../../../overview-summary.html#Core.PojoCategories">Group 5</a> POJOs. * * <h5 class='section'>Media types:</h5> * <p> @@ -31,9 +32,10 @@ import org.apache.juneau.transform.*; * <h5 class='section'>Description:</h5> * <p> * Essentially just converts plain text to POJOs via static <code>fromString()</code> or <code>valueOf()</code>, or - * through constructors that take a single string argument. + * through constructors that take a single string argument. * <p> - * Also parses objects using a transform if the object class has an {@link PojoSwap PojoSwap<?,String>} transform defined on it. + * Also parses objects using a transform if the object class has an {@link PojoSwap PojoSwap<?,String>} transform + * defined on it. * * <h5 class='section'>Configurable properties:</h5> * <p> @@ -51,6 +53,7 @@ public class PlainTextParser extends ReaderParser { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public PlainTextParser(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParserBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParserBuilder.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParserBuilder.java index 3540188..1721d0e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParserBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParserBuilder.java @@ -32,6 +32,7 @@ public class PlainTextParserBuilder extends ParserBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public PlainTextParserBuilder(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java index 6c0bd31..4f9dd12 100644 --- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java @@ -30,7 +30,8 @@ import org.apache.juneau.transform.*; * <p> * Essentially converts POJOs to plain text using the <code>toString()</code> method. * <p> - * Also serializes objects using a transform if the object class has an {@link PojoSwap PojoSwap<?,String>} transform defined on it. + * Also serializes objects using a transform if the object class has an {@link PojoSwap PojoSwap<?,String>} + * transform defined on it. * * <h5 class='section'>Configurable properties:</h5> * <p> @@ -49,6 +50,7 @@ public class PlainTextSerializer extends WriterSerializer { /** * Constructor. + * * @param propertyStore The property store containing all the settings for this object. */ public PlainTextSerializer(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializerBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializerBuilder.java index dd61eeb..56b684d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializerBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializerBuilder.java @@ -32,6 +32,7 @@ public class PlainTextSerializerBuilder extends SerializerBuilder { /** * Constructor. + * * @param propertyStore The initial configuration settings for this builder. */ public PlainTextSerializerBuilder(PropertyStore propertyStore) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java index d0e8bf9..c896bf4 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Body.java @@ -21,7 +21,8 @@ import java.lang.annotation.*; import org.apache.juneau.serializer.*; /** - * Annotation applied to Java method arguments of interface proxies to denote that they are the HTTP body of the request. + * Annotation applied to Java method arguments of interface proxies to denote that they are the HTTP body of the + * request. * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -35,7 +36,8 @@ import org.apache.juneau.serializer.*; * <p> * The argument can be any of the following types: * <ul class='spaced-list'> - * <li>Any serializable POJO - Converted to text using the {@link Serializer} registered with the <code>RestClient</code>. + * <li>Any serializable POJO - Converted to text using the {@link Serializer} registered with the + * <code>RestClient</code>. * <li>{@link Reader} - Raw contents of {@code Reader} will be serialized to remote resource. * <li>{@link InputStream} - Raw contents of {@code InputStream} will be serialized to remote resource. * <li><code>HttpEntity</code> - Bypass Juneau serialization and pass HttpEntity directly to HttpClient. @@ -43,7 +45,7 @@ import org.apache.juneau.serializer.*; * </ul> * <p> * The annotation can also be applied to a bean property field or getter when the argument is annotated with - * {@link RequestBean @RequestBean}: + * {@link RequestBean @RequestBean}: * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -62,7 +64,8 @@ import org.apache.juneau.serializer.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java index 396eb6f..1468d12 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormData.java @@ -21,7 +21,8 @@ import org.apache.juneau.serializer.*; import org.apache.juneau.urlencoding.*; /** - * Annotation applied to Java method arguments of interface proxies to denote that they are FORM post parameters on the request. + * Annotation applied to Java method arguments of interface proxies to denote that they are FORM post parameters on the + * request. * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -31,7 +32,8 @@ import org.apache.juneau.urlencoding.*; * <jc>// Explicit names specified for form data parameters.</jc> * <jc>// pojo will be converted to UON notation (unless plain-text parts enabled).</jc> * <ja>@RemoteMethod</ja>(path=<js>"/mymethod1"</js>) - * String myProxyMethod1(<ja>@FormData</ja>(<js>"foo"</js>)</ja> String foo, <ja>@FormData</ja>(<js>"bar"</js>)</ja> MyPojo pojo); + * String myProxyMethod1(<ja>@FormData</ja>(<js>"foo"</js>)</ja> String foo, + * <ja>@FormData</ja>(<js>"bar"</js>)</ja> MyPojo pojo); * * <jc>// Multiple values pulled from a NameValuePairs object.</jc> * <jc>// Same as @FormData("*").</jc> @@ -54,7 +56,7 @@ import org.apache.juneau.urlencoding.*; * String myProxyMethod5(<ja>@FormData</ja> String string); * * <jc>// An entire form-data HTTP body as a Reader.</jc> - * <jc>// Sames as @FormData("*").</jc> + * <jc>// Same as @FormData("*").</jc> * <ja>@RemoteMethod</ja>(path=<js>"/mymethod6"</js>) * String myProxyMethod6(<ja>@FormData</ja> Reader reader); * @@ -62,7 +64,7 @@ import org.apache.juneau.urlencoding.*; * </p> * <p> * The annotation can also be applied to a bean property field or getter when the argument is annotated with - * {@link RequestBean @RequestBean}: + * {@link RequestBean @RequestBean}: * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -112,8 +114,10 @@ import org.apache.juneau.urlencoding.*; * } * </p> * <p> - * The {@link #name()} and {@link #value()} elements are synonyms for specifying the parameter name. Only one should be used. - * <br>The following annotations are fully equivalent: + * The {@link #name()} and {@link #value()} elements are synonyms for specifying the parameter name. + * Only one should be used. + * <br> + * The following annotations are fully equivalent: * <p> * <p class='bcode'> * <ja>@FormData</ja>(name=<js>"foo"</js>) @@ -123,7 +127,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -139,7 +144,7 @@ public @interface FormData { * Note that {@link #name()} and {@link #value()} are synonyms. * <p> * The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the - * form data parameter name. + * form data parameter name. * <p> * A blank value (the default) has the following behavior: * <ul class='spaced-list'> @@ -198,7 +203,7 @@ public @interface FormData { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java index a835ee7..1beafaa 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/FormDataIfNE.java @@ -25,7 +25,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -37,12 +38,14 @@ public @interface FormDataIfNE { /** * The form post parameter name. + * * @see FormData#name() */ String name() default ""; /** * A synonym for {@link #name()}. + * * @see FormData#value() */ String value() default ""; @@ -51,7 +54,7 @@ public @interface FormDataIfNE { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java index 5dba1df..5d2ebee 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Header.java @@ -21,7 +21,8 @@ import org.apache.juneau.serializer.*; import org.apache.juneau.urlencoding.*; /** - * Annotation applied to Java method arguments of interface proxies to denote that they are serialized as an HTTP header value. + * Annotation applied to Java method arguments of interface proxies to denote that they are serialized as an HTTP + * header value. * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -31,7 +32,8 @@ import org.apache.juneau.urlencoding.*; * <jc>// Explicit names specified for HTTP headers.</jc> * <jc>// pojo will be converted to UON notation (unless plain-text parts enabled).</jc> * <ja>@RemoteMethod</ja>(path=<js>"/mymethod1"</js>) - * String myProxyMethod1(<ja>@Header</ja>(<js>"Foo"</js>)</ja> String foo, <ja>@Header</ja>(<js>"Bar"</js>)</ja> MyPojo pojo); + * String myProxyMethod1(<ja>@Header</ja>(<js>"Foo"</js>)</ja> String foo, + * <ja>@Header</ja>(<js>"Bar"</js>)</ja> MyPojo pojo); * * <jc>// Multiple values pulled from a NameValuePairs object.</jc> * <jc>// Same as @Header("*").</jc> @@ -51,7 +53,7 @@ import org.apache.juneau.urlencoding.*; * </p> * <p> * The annotation can also be applied to a bean property field or getter when the argument is annotated with - * {@link RequestBean @RequestBean}: + * {@link RequestBean @RequestBean}: * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -96,8 +98,10 @@ import org.apache.juneau.urlencoding.*; * } * </p> * <p> - * The {@link #name()} and {@link #value()} elements are synonyms for specifying the header name. Only one should be used. - * <br>The following annotations are fully equivalent: + * The {@link #name()} and {@link #value()} elements are synonyms for specifying the header name. + * Only one should be used. + * <br> + * The following annotations are fully equivalent: * <p> * <p class='bcode'> * <ja>@Header</ja>(name=<js>"Foo"</js>) @@ -107,7 +111,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -122,9 +127,8 @@ public @interface Header { * <p> * A blank value (the default) indicates to reuse the bean property name when used on a request bean property. * <p> - * <p> * The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the - * header name. + * header name. * <p> * A blank value (the default) has the following behavior: * <ul class='spaced-list'> @@ -184,7 +188,7 @@ public @interface Header { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java index 7046582..071c076 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/HeaderIfNE.java @@ -25,7 +25,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -37,12 +38,14 @@ public @interface HeaderIfNE { /** * The HTTP header name. + * * @see Header#name() */ String name() default ""; /** * A synonym for {@link #name()}. + * * @see Header#value() */ String value() default ""; @@ -51,7 +54,7 @@ public @interface HeaderIfNE { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java index fa0643f..8144c0b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Path.java @@ -51,7 +51,7 @@ import org.apache.juneau.urlencoding.*; * </p> * <p> * The annotation can also be applied to a bean property field or getter when the argument is annotated with - * {@link RequestBean @RequestBean}: + * {@link RequestBean @RequestBean}: * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -96,8 +96,10 @@ import org.apache.juneau.urlencoding.*; * } * </p> * <p> - * The {@link #name()} and {@link #value()} elements are synonyms for specifying the path variable name. Only one should be used. - * <br>The following annotations are fully equivalent: + * The {@link #name()} and {@link #value()} elements are synonyms for specifying the path variable name. + * Only one should be used. + * <br> + * The following annotations are fully equivalent: * <p> * <p class='bcode'> * <ja>@Path</ja>(name=<js>"foo"</js>) @@ -107,7 +109,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -123,7 +126,7 @@ public @interface Path { * Note that {@link #name()} and {@link #value()} are synonyms. * <p> * The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the - * path variable name. + * path variable name. * <p> * A blank value (the default) has the following behavior: * <ul class='spaced-list'> @@ -173,7 +176,7 @@ public @interface Path { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java index 6126408..97dbfbb 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Query.java @@ -21,7 +21,8 @@ import org.apache.juneau.serializer.*; import org.apache.juneau.urlencoding.*; /** - * Annotation applied to Java method arguments of interface proxies to denote that they are QUERY parameters on the request. + * Annotation applied to Java method arguments of interface proxies to denote that they are QUERY parameters on the + * request. * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -31,7 +32,8 @@ import org.apache.juneau.urlencoding.*; * <jc>// Explicit names specified for query parameters.</jc> * <jc>// pojo will be converted to UON notation (unless plain-text parts enabled).</jc> * <ja>@RemoteMethod</ja>(path=<js>"/mymethod1"</js>) - * String myProxyMethod1(<ja>@Query</ja>(<js>"foo"</js>)</ja> String foo, <ja>@Query</ja>(<js>"bar"</js>)</ja> MyPojo pojo); + * String myProxyMethod1(<ja>@Query</ja>(<js>"foo"</js>)</ja> String foo, + * <ja>@Query</ja>(<js>"bar"</js>)</ja> MyPojo pojo); * * <jc>// Multiple values pulled from a NameValuePairs object.</jc> * <jc>// Same as @Query("*").</jc> @@ -61,7 +63,7 @@ import org.apache.juneau.urlencoding.*; * </p> * <p> * The annotation can also be applied to a bean property field or getter when the argument is annotated with - * {@link RequestBean @RequestBean}: + * {@link RequestBean @RequestBean}: * <p> * <h5 class='section'>Example:</h5> * <p class='bcode'> @@ -111,8 +113,10 @@ import org.apache.juneau.urlencoding.*; * } * </p> * <p> - * The {@link #name()} and {@link #value()} elements are synonyms for specifying the parameter name. Only one should be used. - * <br>The following annotations are fully equivalent: + * The {@link #name()} and {@link #value()} elements are synonyms for specifying the parameter name. + * Only one should be used. + * <br> + * The following annotations are fully equivalent: * <p> * <p class='bcode'> * <ja>@Query</ja>(name=<js>"foo"</js>) @@ -122,7 +126,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -138,7 +143,7 @@ public @interface Query { * Note that {@link #name()} and {@link #value()} are synonyms. * <p> * The value should be either <js>"*"</js> to represent multiple name/value pairs, or a label that defines the - * query parameter name. + * query parameter name. * <p> * A blank value (the default) has the following behavior: * <ul class='spaced-list'> @@ -197,7 +202,7 @@ public @interface Query { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java index 7e8e6a9..cec1aea 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/QueryIfNE.java @@ -25,7 +25,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -37,12 +38,14 @@ public @interface QueryIfNE { /** * The query parameter name. + * * @see Query#name() */ String name() default ""; /** * A synonym for {@link #name()}. + * * @see Query#value() */ String value() default ""; @@ -51,7 +54,7 @@ public @interface QueryIfNE { * Specifies the {@link PartSerializer} class used for serializing values to strings. * <p> * The default value defaults to the using the part serializer defined on the {@link RequestBean} annotation, - * then on the client which by default is {@link UrlEncodingSerializer}. + * then on the client which by default is {@link UrlEncodingSerializer}. * <p> * This annotation is provided to allow values to be custom serialized. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java index 0169033..911f4f7 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethod.java @@ -21,20 +21,22 @@ import java.lang.annotation.*; /** * Annotation applied to Java methods on interface proxy classes. * <p> - * TODO <i>(sorry)</i> - * <p> * The return type on the Java method can be any of the following: * <ul> - * <li><jk>void</jk> - Don't parse any response. Note that the method will still throw an exception if an error HTTP status is returned. - * <li>Any parsable POJO - The body of the response will be converted to the POJO using the parser defined on the <code>RestClient</code>. - * <li><code>HttpResponse</code> - Returns the raw <code>HttpResponse</code> returned by the inner <code>HttpClient</code>. + * <li><jk>void</jk> - Don't parse any response. Note that the method will still throw an exception if an error + * HTTP status is returned. + * <li>Any parsable POJO - The body of the response will be converted to the POJO using the parser defined on the + * <code>RestClient</code>. + * <li><code>HttpResponse</code> - Returns the raw <code>HttpResponse</code> returned by the inner + * <code>HttpClient</code>. * <li>{@link Reader} - Returns access to the raw reader of the response. * <li>{@link InputStream} - Returns access to the raw input stream of the response. * </ul> * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -47,10 +49,10 @@ public @interface RemoteMethod { /** * The path to the REST service for this Java method relative to the parent proxy interface URL. * <p> - * The default value is the Java method name (e.g. <js>"http://localhost/root-url/org.foo.MyInterface/myMethod"</js>) if - * {@link Remoteable#methodPaths() @Remoteable.methodPaths()} is <js>"NAME"</js>, or the Java method signature - * (e.g. <js>"http://localhost/root-url/org.foo.MyInterface/myMethod(int,boolean,java.lang.String)"</js>) if - * it's <js>"SIGNATURE"</js>. + * The default value is the Java method name (e.g. <js>"http://localhost/root-url/org.foo.MyInterface/myMethod"</js>) + * if {@link Remoteable#methodPaths() @Remoteable.methodPaths()} is <js>"NAME"</js>, or the Java method signature + * (e.g. <js>"http://localhost/root-url/org.foo.MyInterface/myMethod(int,boolean,java.lang.String)"</js>) if + * it's <js>"SIGNATURE"</js>. */ String path() default ""; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java index 140d9f8..00f58dd 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteMethodArg.java @@ -22,7 +22,8 @@ import org.apache.juneau.urlencoding.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -47,9 +48,9 @@ public class RemoteMethodArg { * @param name2 The argument name pulled from value(). * @param index The zero-based index of the argument on the Java method. * @param skipIfNE The value is skipped if it's null/empty. - * @param serializer The class to use for serializing headers, query paramters, form-data parameters, and - * path variables. - * If {@link UrlEncodingSerializer}, then the url-encoding serializer defined on the client will be used. + * @param serializer The class to use for serializing headers, query parameters, form-data parameters, and + * path variables. + * If {@link UrlEncodingSerializer}, then the url-encoding serializer defined on the client will be used. */ protected RemoteMethodArg(String name, String name2, int index, boolean skipIfNE, Class<? extends PartSerializer> serializer) { this.name = name.isEmpty() ? name2 : name; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java index 2ee97fd..788a04e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/Remoteable.java @@ -23,7 +23,8 @@ import java.lang.annotation.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */ @@ -39,7 +40,8 @@ public @interface Remoteable { * When a relative path is specified, it's relative to the root-url defined on the <code>RestClient</code> used * to instantiate the interface. * <p> - * When no path is specified, the path is assumed to be the class name (e.g. <js>"http://localhost/root-url/org.foo.MyInterface"</js>) + * When no path is specified, the path is assumed to be the class name (e.g. + * <js>"http://localhost/root-url/org.foo.MyInterface"</js>) */ String path() default ""; @@ -48,7 +50,8 @@ public @interface Remoteable { * <p> * The options are: * <ul> - * <li><js>"DECLARED"</js> (default) - Only methods declared on the immediate interface/class are exposed. Methods on parent interfaces/classes are ignored. + * <li><js>"DECLARED"</js> (default) - Only methods declared on the immediate interface/class are exposed. + * Methods on parent interfaces/classes are ignored. * <li><js>"ANNOTATED"</js> - Only methods annotated with {@link RemoteMethod} are exposed. * <li><js>"ALL"</js> - All methods defined on the interface or class are exposed. * </ul> @@ -56,7 +59,8 @@ public @interface Remoteable { String expose() default "DECLARED"; /** - * Defines the methodology to use for the path names of the methods when not explicitly defined via {@link RemoteMethod#path() @RemoteMethod.path()}. + * Defines the methodology to use for the path names of the methods when not explicitly defined via + * {@link RemoteMethod#path() @RemoteMethod.path()}. * <p> * The options are: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/5c4762ee/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java index 60da20a..461cc1d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java +++ b/juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMeta.java @@ -27,7 +27,8 @@ import java.util.*; * * <h6 class='topic'>Additional Information</h6> * <ul class='doctree'> - * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface proxies against 3rd-party REST interfaces</a> + * <li class='link'><a class='doclink' href='../../../../overview-summary.html#Remoteable.3rdParty'>Interface + * proxies against 3rd-party REST interfaces</a> * <li class='jp'><a class='doclink' href='package-summary.html#TOC'>org.apache.juneau.remoteable</a> * </ul> */
