http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java index 6c12246..ce3bccf 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/CollectionUtils.java @@ -55,6 +55,7 @@ public class CollectionUtils { /** * Adds the contents of one list to the other in reverse order. + * * <p> * i.e. add values from 2nd list from end-to-start order to the end of the 1st list. * @@ -71,6 +72,7 @@ public class CollectionUtils { /** * Adds the contents of the array to the list in reverse order. + * * <p> * i.e. add values from the array from end-to-start order to the end of the list. *
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java index 73b8583..c0d4f3d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/DateUtils.java @@ -19,9 +19,11 @@ import java.util.*; import javax.xml.bind.*; /** - * A utility class for parsing and formatting HTTP dates as used in cookies and - * other headers. This class handles dates as defined by RFC 2616 section - * 3.3.1 as well as some other common non-standard formats. + * A utility class for parsing and formatting HTTP dates as used in cookies and other headers. + * + * <p> + * This class handles dates as defined by RFC 2616 section 3.3.1 as well as some other common non-standard formats. + * * <p> * This class was copied from HttpClient 4.3. */ @@ -78,9 +80,10 @@ public final class DateUtils { * * @param dateValue the date value to parse * @param dateFormats the date formats to use - * @param startDate During parsing, two digit years will be placed in the range <code>startDate</code> to - * <code>startDate + 100 years</code>. This value may be <code>null</code>. When - * <code>null</code> is given as a parameter, year <code>2000</code> will be used. + * @param startDate + * During parsing, two digit years will be placed in the range <code>startDate</code> to + * <code>startDate + 100 years</code>. This value may be <code>null</code>. When + * <code>null</code> is given as a parameter, year <code>2000</code> will be used. * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue, final String[] dateFormats, final Date startDate) { @@ -128,8 +131,10 @@ public final class DateUtils { } /** - * Formats the given date according to the specified pattern. The pattern must conform to that used by the - * {@link SimpleDateFormat simple date format} class. + * Formats the given date according to the specified pattern. + * + * <p> + * The pattern must conform to that used by the {@link SimpleDateFormat simple date format} class. * * @param date The date to format. * @param pattern The pattern to use for formatting the date. @@ -150,9 +155,11 @@ public final class DateUtils { } /** - * A factory for {@link SimpleDateFormat}s. The instances are stored in a thread-local way because SimpleDateFormat - * is not thread-safe as noted in {@link SimpleDateFormat its javadoc}. + * A factory for {@link SimpleDateFormat}s. * + * <p> + * The instances are stored in a thread-local way because SimpleDateFormat is not thread-safe as noted in + * {@link SimpleDateFormat its javadoc}. */ final static class DateFormatHolder { private static final ThreadLocal<SoftReference<Map<String,SimpleDateFormat>>> THREADLOCAL_FORMATS = @@ -166,10 +173,13 @@ public final class DateUtils { /** * Creates a {@link SimpleDateFormat} for the requested format string. * - * @param pattern a non-<code>null</code> format String according to {@link SimpleDateFormat}. The format is not - * checked against <code>null</code> since all paths go through {@link DateUtils}. - * @return the requested format. This simple date-format should not be used to - * {@link SimpleDateFormat#applyPattern(String) apply} to a different pattern. + * @param pattern + * A non-<code>null</code> format String according to {@link SimpleDateFormat}. + * The format is not checked against <code>null</code> since all paths go through {@link DateUtils}. + * @return + * The requested format. + * This simple date-format should not be used to {@link SimpleDateFormat#applyPattern(String) apply} to a + * different pattern. */ public static SimpleDateFormat formatFor(final String pattern) { final SoftReference<Map<String,SimpleDateFormat>> ref = THREADLOCAL_FORMATS.get(); @@ -194,6 +204,7 @@ public final class DateUtils { /** * Pads out an ISO8601 string so that it can be parsed using {@link DatatypeConverter#parseDateTime(String)}. + * * <ul> * <li><js>"2001-07-04T15:30:45-05:00"</js> --> <js>"2001-07-04T15:30:45-05:00"</js> * <li><js>"2001-07-04T15:30:45Z"</js> --> <js>"2001-07-04T15:30:45Z"</js> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java index cdf4291..1e0c9fe 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java @@ -19,6 +19,7 @@ import org.apache.juneau.*; /** * Represents a wrapped {@link BeanMap} where property values can be overridden, removed, or reordered without * affecting the underlying bean. + * * <p> * Provides the {@link #filterKeys(List)} method for specifying the keys to keep in the bean map and in what order * they should appear. @@ -73,6 +74,7 @@ public class DelegateBeanMap<T> extends BeanMap<T> { /** * Remove all but the specified properties from this bean map. + * * <p> * This does not affect the underlying bean. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java index 3c0e59f..83d7440 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/DelegateMap.java @@ -42,6 +42,7 @@ public class DelegateMap<T> extends ObjectMap implements Delegate<T> { /** * Remove all but the specified keys from this map. + * * <p> * This does not affect the underlying map. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java index 6580275..f2c3000 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/FileUtils.java @@ -81,6 +81,8 @@ public class FileUtils { /** * Creates a file if it doesn't already exist using {@link File#createNewFile()}. + * + * <p> * Throws a {@link RuntimeException} if the file could not be created. * * @param f The file to create. @@ -98,6 +100,8 @@ public class FileUtils { /** * Updates the modified timestamp on the specified file. + * + * <p> * Method ensures that the timestamp changes even if it's been modified within the past millisecond. * * @param f The file to modify the modified timestamp on. @@ -120,9 +124,11 @@ public class FileUtils { /** * Create a temporary file with the specified name. + * * <p> * The name is broken into file name and suffix, and the parts are passed to * {@link File#createTempFile(String, String)}. + * * <p> * {@link File#deleteOnExit()} is called on the resulting file before being returned by this method. * @@ -169,6 +175,7 @@ public class FileUtils { /** * Returns the candidate file names for the specified file name in the specified locale. + * * <p> * For example, if looking for the <js>"MyResource.txt"</js> file in the Japanese locale, the iterator will return * names in the following order: @@ -177,6 +184,7 @@ public class FileUtils { * <li><js>"MyResource_ja.txt"</js> * <li><js>"MyResource.txt"</js> * </ol> + * * <p> * If the locale is null, then it will only return <js>"MyResource.txt"</js>. * @@ -220,6 +228,7 @@ public class FileUtils { /** * Returns the candidate locales for the specified locale. + * * <p> * For example, if <code>locale</code> is <js>"ja_JP"</js>, then this method will return: * <ol> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java b/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java index d0f46e1..8e76000 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java @@ -14,6 +14,7 @@ package org.apache.juneau.internal; /** * Utility class for generating integer hash codes. + * * <p> * General usage: * <p class='bcode'> @@ -47,6 +48,7 @@ public class HashCode { /** * Hashes the hashcode into this object. + * * <p> * The formula is simply <code>hashCode = 31*hashCode + i;</code> * @@ -69,9 +71,12 @@ public class HashCode { /** * Converts the object to a normalized form before grabbing it's hashcode. - * Subclasses can override this method to provide specialized handling - * (e.g. converting numbers to strings so that <code>123</code> and <js>"123"</js> - * end up creating the same hashcode.) + * + * <p> + * Subclasses can override this method to provide specialized handling (e.g. converting numbers to strings so that + * <code>123</code> and <js>"123"</js> end up creating the same hashcode.) + * + * <p> * Default implementation does nothing. * * @param o The object to normalize before getting it's hashcode. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java index 4e680ac..b2da86a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/IOUtils.java @@ -54,6 +54,7 @@ public final class IOUtils { /** * Reads the specified object to a <code>String</code>. + * * <p> * Can be any of the following object types: * <ul> @@ -205,8 +206,10 @@ public final class IOUtils { /** * Reads the specified input into a {@link String} until the end of the input is reached. + * * <p> * The {@code Reader} is automatically closed. + * * <p> * If the {@code Reader} is not an instance of a {@code BufferedReader}, then it gets wrapped in a * {@code BufferedReader}. @@ -235,6 +238,8 @@ public final class IOUtils { /** * Pipes the contents of the specified reader into the writer. + * + * <p> * The reader is closed, the writer is not. * * @param in The reader to pipe from. @@ -251,8 +256,9 @@ public final class IOUtils { * Wraps the specified reader in a buffered reader. * * @param r The reader being wrapped. - * @return The reader wrapped in a {@link BufferedReader}, or the original {@link Reader} if it's already a buffered - * reader. + * @return + * The reader wrapped in a {@link BufferedReader}, or the original {@link Reader} if it's already a buffered + * reader. */ public static Reader getBufferedReader(Reader r) { if (r instanceof BufferedReader || r instanceof StringReader) @@ -302,6 +308,8 @@ public final class IOUtils { /** * Given the specified <js>"Content-Length"</js> header value, return an appropriate buffer size. + * + * <p> * The maximum buffer size is 1MB. * * @param contentLength The value of the <js>"Content-Length"</js> header. @@ -325,6 +333,8 @@ public final class IOUtils { /** * Close input stream and ignore any exceptions. + * + * <p> * No-op if input stream is <jk>null</jk>. * * @param is The input stream to close. @@ -338,6 +348,8 @@ public final class IOUtils { /** * Close output stream and ignore any exceptions. + * + * <p> * No-op if output stream is <jk>null</jk>. * * @param os The output stream to close. @@ -351,6 +363,8 @@ public final class IOUtils { /** * Close reader and ignore any exceptions. + * + * <p> * No-op if reader is <jk>null</jk>. * * @param r The reader to close. @@ -364,6 +378,8 @@ public final class IOUtils { /** * Close writer and ignore any exceptions. + * + * <p> * No-op if writer is <jk>null</jk>. * * @param w The writer to close. @@ -396,16 +412,17 @@ public final class IOUtils { /** * Converts an object to an <code>InputStream</code>. * - * @param o The object to convert to an input stream. - * Can be any of the following: - * <ul> - * <li>{@link InputStream} - * <li>{@link Reader} - * <li>{@link File} - * <li>{@link CharSequence} - Converted to UTF-8 stream. - * <li><code><jk>byte</jk>[]</code> - * <li><code><jk>null</jk></code> - Returns null. - * </ul> + * @param o + * The object to convert to an input stream. + * Can be any of the following: + * <ul> + * <li>{@link InputStream} + * <li>{@link Reader} + * <li>{@link File} + * <li>{@link CharSequence} - Converted to UTF-8 stream. + * <li><code><jk>byte</jk>[]</code> + * <li><code><jk>null</jk></code> - Returns null. + * </ul> * @return The object converted to an input stream. * @throws IOException If invalid object passed in or file could not be read. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java b/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java index 7ddf361..5feb470 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/IdentityList.java @@ -16,6 +16,7 @@ import java.util.*; /** * Combination of a {@link LinkedList} and <code>IdentitySet</code>. + * * <ul class='spaced-list'> * <li> * Duplicate objects (by identity) will be skipped during insertion. @@ -27,6 +28,7 @@ import java.util.*; * <ul> * <li>This class is NOT thread safe, and is intended for use on small lists. * </ul> + * * @param <T> Entry type. */ public class IdentityList<T> extends LinkedList<T> { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java b/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java index c4f3c73..cb2344f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java @@ -58,13 +58,14 @@ public class JuneauLogger extends java.util.logging.Logger { * Get logger for specified class using the specified resource bundle name. * * @param forClass The class to create a logger for. - * @param resourceBundleName The name of the resource bundle. - * Can be any of the following formats: - * <ol> - * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>. - * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>. - * </ol> - * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters. + * @param resourceBundleName + * The name of the resource bundle. + * Can be any of the following formats: + * <ol> + * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>. + * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>. + * </ol> + * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters. * @return A new <l>Logger</l>. */ public static JuneauLogger getLogger(Class<?> forClass, String resourceBundleName) { @@ -75,13 +76,14 @@ public class JuneauLogger extends java.util.logging.Logger { * Get logger with specified name using the specified resource bundle name. * * @param name The name of the logger to use. - * @param resourceBundleName The name of the resource bundle. - * Can be any of the following formats: - * <ol> - * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>. - * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>. - * </ol> - * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters. + * @param resourceBundleName + * The name of the resource bundle. + * Can be any of the following formats: + * <ol> + * <li>An absolute path. E.g. <js>"com/foo/nls/Messages"</js>. + * <li>A path relative to the package of the class. E.g. <js>"nls/Messages"</js>. + * </ol> + * Both <js>'.'</js> and <js>'/'</js> can be used as path delimiters. * @return A new <l>Logger</l>. */ public static synchronized JuneauLogger getLogger(String name, String resourceBundleName) { @@ -245,6 +247,8 @@ public class JuneauLogger extends java.util.logging.Logger { /** * Similar to {@link #log(Level, String, Object[])}, except arguments are converted to objects * that are serialized using the {@link JsonSerializer#toStringObject(Object)} method. + * + * <p> * This allows arbitrary POJOs to be serialized as message parameters. * * @param level The level of the given message. @@ -292,5 +296,4 @@ public class JuneauLogger extends java.util.logging.Logger { } return ("".equals(rb) ? null : rb); } - } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java b/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java index 831efbc..15ebd33 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/KeywordSet.java @@ -16,6 +16,7 @@ import static org.apache.juneau.internal.ThrowableUtils.*; /** * Stores a set of language keywords for quick lookup. + * * <p> * Keywords must be: * <ul class='spaced-list'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java b/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java index 9cff585..194bffd 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/MultiIterable.java @@ -18,6 +18,7 @@ import java.util.*; /** * Utility class for defining an iterator over one or more iterables. + * * @param <E> The element class type. */ public class MultiIterable<E> implements Iterable<E> { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java index 73f73d4..7aac560 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/ObjectUtils.java @@ -22,6 +22,7 @@ public class ObjectUtils { /** * Returns <jk>true</jk> if the specified objects are equal. + * * <p> * Gracefully handles <jk>null</jk>s. * @@ -39,6 +40,7 @@ public class ObjectUtils { /** * Returns <jk>true</jk> if the specified object is empty. + * * <p> * Return <jk>true</jk> if the value is any of the following: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java index 451ae2c..cc4effb 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/ReflectionUtils.java @@ -53,6 +53,7 @@ public final class ReflectionUtils { /** * Returns the specified annotation only if it's been declared on the specified class. + * * <p> * More efficient than calling {@link Class#getAnnotation(Class)} since it doesn't recursively look for the class * up the parent chain. @@ -72,9 +73,9 @@ public final class ReflectionUtils { /** * Returns all instances of the specified annotation on the specified class. + * * <p> * Searches all superclasses and superinterfaces. - * <p> * Results are ordered child-to-parent. * * @param <T> The annotation class type. @@ -102,8 +103,9 @@ public final class ReflectionUtils { } /** - * Same as {@link #findAnnotations(Class, Class)} except returns the annotations as a map - * with the keys being the class on which the annotation was found. + * Same as {@link #findAnnotations(Class, Class)} except returns the annotations as a map with the keys being the + * class on which the annotation was found. + * * <p> * Results are ordered child-to-parent. * @@ -189,6 +191,7 @@ public final class ReflectionUtils { /** * Similar to {@link #getResource(Class, String)} except looks for localized versions of the specified resource. + * * <p> * For example, if looking in the Japanese locale, the order of lookup on the <js>"MyResource.txt"</js> file is: * <ol> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java b/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java index 8a36771..e2faec7 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/SimpleMap.java @@ -22,10 +22,13 @@ import org.apache.juneau.*; /** * An instance of a <code>Map</code> where the keys and values are simple <code>String[]</code> and * <code>Object[]</code> arrays. + * * <p> * Typically more efficient than <code>HashMaps</code> for small maps (e.g. <10 entries). + * * <p> * Does not support adding or removing entries. + * * <p> * Setting values overwrites the value on the underlying value array. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java b/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java index 6fc902c..e83a85e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/StringBuilderWriter.java @@ -16,6 +16,7 @@ import java.io.*; /** * Similar to {@link StringWriter}, but uses a {@link StringBuilder} instead to avoid synchronization overhead. + * * <p> * Note that this class is NOT thread safe. */ @@ -34,9 +35,9 @@ public final class StringBuilderWriter extends Writer { /** * Create a new string writer using the specified initial string-builder size. * - * @param initialSize The number of <tt>char</tt> values that will fit into this buffer before it is automatically - * expanded - * @throws IllegalArgumentException If <tt>initialSize</tt> is negative + * @param initialSize + * The number of <tt>char</tt> values that will fit into this buffer before it is automatically expanded. + * @throws IllegalArgumentException If <tt>initialSize</tt> is negative. */ public StringBuilderWriter(int initialSize) { sb = new StringBuilder(initialSize); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java index 14d5345..72ffcc8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/StringUtils.java @@ -60,19 +60,20 @@ public final class StringUtils { * Parses a number from the specified reader stream. * * @param r The reader to parse the string from. - * @param type The number type to created. - * Can be any of the following: - * <ul> - * <li> Integer - * <li> Double - * <li> Float - * <li> Long - * <li> Short - * <li> Byte - * <li> BigInteger - * <li> BigDecimal - * </ul> - * If <jk>null</jk>, uses the best guess. + * @param type + * The number type to created. + * Can be any of the following: + * <ul> + * <li> Integer + * <li> Double + * <li> Float + * <li> Long + * <li> Short + * <li> Byte + * <li> BigInteger + * <li> BigDecimal + * </ul> + * If <jk>null</jk>, uses the best guess. * @throws IOException If a problem occurred trying to read from the reader. * @return The parsed number. * @throws Exception @@ -107,19 +108,20 @@ public final class StringUtils { * Parses a number from the specified string. * * @param s The string to parse the number from. - * @param type The number type to created. - * Can be any of the following: - * <ul> - * <li> Integer - * <li> Double - * <li> Float - * <li> Long - * <li> Short - * <li> Byte - * <li> BigInteger - * <li> BigDecimal - * </ul> - * If <jk>null</jk>, uses the best guess. + * @param type + * The number type to created. + * Can be any of the following: + * <ul> + * <li> Integer + * <li> Double + * <li> Float + * <li> Long + * <li> Short + * <li> Byte + * <li> BigInteger + * <li> BigDecimal + * </ul> + * If <jk>null</jk>, uses the best guess. * @return The parsed number. * @throws ParseException */ @@ -470,8 +472,12 @@ public final class StringUtils { /** * Splits a character-delimited string into a string array. + * + * <p> * Does not split on escaped-delimiters (e.g. "\,"); * Resulting tokens are trimmed of whitespace. + * + * <p> * <b>NOTE:</b> This behavior is different than the Jakarta equivalent. * split("a,b,c",',') -> {"a","b","c"} * split("a, b ,c ",',') -> {"a","b","c"} @@ -540,6 +546,7 @@ public final class StringUtils { /** * Splits a list of key-value pairs into an ordered map. + * * <p> * Example: * <p class='bcode'> @@ -630,8 +637,8 @@ public final class StringUtils { * string. * * @param s The string to check. - * @return <jk>true</jk> if specified string is <jk>null</jk> or it's {@link #toString()} method returns an empty - * string. + * @return + * <jk>true</jk> if specified string is <jk>null</jk> or it's {@link #toString()} method returns an empty string. */ public static boolean isEmpty(Object s) { return s == null || s.toString().isEmpty(); @@ -854,8 +861,7 @@ public final class StringUtils { } /** - * Shortcut for calling <code>base64Decode(String)</code> and converting the - * result to a UTF-8 encoded string. + * Shortcut for calling <code>base64Decode(String)</code> and converting the result to a UTF-8 encoded string. * * @param in The BASE-64 encoded string to decode. * @return The decoded string. @@ -914,7 +920,11 @@ public final class StringUtils { /** * Generated a random UUID with the specified number of characters. + * + * <p> * Characters are composed of lower-case ASCII letters and numbers only. + * + * <p> * This method conforms to the restrictions for hostnames as specified in <a class="doclink" * href="https://tools.ietf.org/html/rfc952">RFC 952</a> * Since each character has 36 possible values, the square approximation formula for the number of generated IDs @@ -922,6 +932,8 @@ public final class StringUtils { * <code>sqrt(36^N)</code>. * Dividing this number by 10 gives you an approximation of the number of generated IDs needed to produce a * <1% chance of collision. + * + * <p> * For example, given 5 characters, the number of generated IDs need to produce a <1% chance of collision would * be: * <code>sqrt(36^5)/10=777</code> @@ -982,10 +994,13 @@ public final class StringUtils { /** * Simple utility for replacing variables of the form <js>"{key}"</js> with values in the specified map. + * * <p> * Nested variables are supported in both the input string and map values. + * * <p> * If the map does not contain the specified value, the variable is not replaced. + * * <p> * <jk>null</jk> values in the map are treated as blank strings. * @@ -1106,6 +1121,7 @@ public final class StringUtils { /** * Returns the specified field in a delimited string without splitting the string. + * * <p> * Equivalent to the following: * <p class='bcode'> @@ -1250,10 +1266,12 @@ public final class StringUtils { /** * Returns <jk>true</jk> if the specified string is one of the specified values. * - * @param s The string to test. - * Can be <jk>null</jk>. - * @param values The values to test. - * Can contain <jk>null</jk>. + * @param s + * The string to test. + * Can be <jk>null</jk>. + * @param values + * The values to test. + * Can contain <jk>null</jk>. * @return <jk>true</jk> if the specified string is one of the specified values. */ public static boolean isOneOf(String s, String...values) { @@ -1353,8 +1371,9 @@ public final class StringUtils { * Returns the first non-whitespace character in the string. * * @param s The string to check. - * @return The first non-whitespace character, or <code>0</code> if the string is <jk>null</jk>, empty, or composed - * of only whitespace. + * @return + * The first non-whitespace character, or <code>0</code> if the string is <jk>null</jk>, empty, or composed + * of only whitespace. */ public static char firstNonWhitespaceChar(String s) { if (s != null) @@ -1369,7 +1388,8 @@ public final class StringUtils { * * @param s The string. * @param i The index position. - * @return The character at the specified index, or <code>0</code> if the index is out-of-range or the string + * @return + * The character at the specified index, or <code>0</code> if the index is out-of-range or the string * is <jk>null</jk>. */ public static char charAt(String s, int i) { @@ -1431,8 +1451,10 @@ public final class StringUtils { /** * Efficiently determines whether a URL is of the pattern "xxx:/xxx". + * * <p> * The pattern matched is: <code>[a-z]{2,}\:\/.*</code> + * * <p> * Note that this excludes filesystem paths such as <js>"C:/temp"</js>. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java b/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java index 507abbb..96dfe73 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/TeeOutputStream.java @@ -44,8 +44,8 @@ public class TeeOutputStream extends OutputStream { * Adds an output stream to this tee output stream. * * @param os The output stream to add to this tee output stream. - * @param close If <jk>false</jk>, then calling {@link #close()} on this stream will not filter to the specified - * output stream. + * @param close + * If <jk>false</jk>, then calling {@link #close()} on this stream will not filter to the specified output stream. * @return This object (for method chaining). */ public TeeOutputStream add(OutputStream os, boolean close) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java b/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java index dd1dee5..be48416 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/TeeWriter.java @@ -44,8 +44,8 @@ public class TeeWriter extends Writer { * Adds a writer to this tee writer. * * @param w The writer to add to this tee writer. - * @param close If <jk>false</jk>, then calling {@link #close()} on this tee writer will not filter to the - * specified writer. + * @param close + * If <jk>false</jk>, then calling {@link #close()} on this tee writer will not filter to the specified writer. * @return This object (for method chaining). */ public TeeWriter add(Writer w, boolean close) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java b/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java index 2aeb77a..5c40951 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/Utils.java @@ -22,9 +22,10 @@ public class Utils { * * @param i1 Integer #1 * @param i2 Integer #2 - * @return The value <code>0</code> if Integer #1 is equal to Integer #2; a value less than <code>0</code> if - * Integer #1 numerically less than Integer #2; and a value greater than <code>0</code> if Integer #1 is numerically - * greater than Integer #2 (signed comparison). + * @return + * The value <code>0</code> if Integer #1 is equal to Integer #2; a value less than <code>0</code> if + * Integer #1 numerically less than Integer #2; and a value greater than <code>0</code> if Integer #1 is + * numerically greater than Integer #2 (signed comparison). */ public static final int compare(int i1, int i2) { return (i1<i2 ? -1 : (i1==i2 ? 0 : 1)); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/Version.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/Version.java b/juneau-core/src/main/java/org/apache/juneau/internal/Version.java index 4630c37..375f1f9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/Version.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/Version.java @@ -16,6 +16,7 @@ import static org.apache.juneau.internal.StringUtils.*; /** * Represents a version string such as <js>"1.2"</js> or <js>"1.2.3"</js> + * * <p> * Used to compare version numbers. */ @@ -26,15 +27,16 @@ public class Version { /** * Constructor * - * @param versionString A string of the form <js>"#.#..."</js> where there can be any number of parts. - * <br>Valid values: - * <ul> - * <li><js>"1.2"</js> - * <li><js>"1.2.3"</js> - * <li><js>"0.1"</js> - * <li><js>".1"</js> - * </ul> - * Any parts that are not numeric are interpreted as {@link Integer#MAX_VALUE} + * @param versionString + * A string of the form <js>"#.#..."</js> where there can be any number of parts. + * <br>Valid values: + * <ul> + * <li><js>"1.2"</js> + * <li><js>"1.2.3"</js> + * <li><js>"0.1"</js> + * <li><js>".1"</js> + * </ul> + * Any parts that are not numeric are interpreted as {@link Integer#MAX_VALUE} */ public Version(String versionString) { if (isEmpty(versionString)) @@ -52,6 +54,7 @@ public class Version { /** * Returns <jk>true</jk> if the specified version is at least this version. + * * <p> * Note that the following is true: * <p class='bcode'> @@ -80,6 +83,7 @@ public class Version { /** * Returns <jk>true</jk> if the specified version is at most this version. + * * <p> * Note that the following is true: * <p class='bcode'> @@ -108,6 +112,7 @@ public class Version { /** * Returns <jk>true</jk> if the specified version is equal to this version. + * * <p> * Note that the following is true: * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java b/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java index 3321f2d..16d6294 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/VersionRange.java @@ -14,6 +14,7 @@ package org.apache.juneau.internal; /** * Represents an OSGi-style version range like <js>"1.2"</js> or <js>"[1.0,2.0)"</js>. + * * <p> * The range can be any of the following formats: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java b/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java index ca975d0..67a302f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/jso/JsoParser.java @@ -22,7 +22,7 @@ import org.apache.juneau.parser.*; * Parses POJOs from HTTP responses as Java {@link ObjectInputStream ObjectInputStreams}. * * <h5 class='section'>Media types:</h5> - * <p> + * * Consumes <code>Content-Type</code> types: <code>application/x-java-serialized-object</code> */ @Consumes("application/x-java-serialized-object") http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java b/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java index 6989905..92cde21 100644 --- a/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/jso/JsoSerializer.java @@ -22,8 +22,9 @@ import org.apache.juneau.serializer.*; * Serializes POJOs to HTTP responses as Java Serialized Object {@link ObjectOutputStream ObjectOutputStreams}. * * <h5 class='section'>Media types:</h5> - * <p> + * * Handles <code>Accept</code> types: <code>application/x-java-serialized-object</code> + * * <p> * Produces <code>Content-Type</code> types: <code>application/x-java-serialized-object</code> */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java index e18a513..e2aab27 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java @@ -30,13 +30,14 @@ import org.apache.juneau.transform.*; * Parses any valid JSON text into a POJO model. * * <h5 class='section'>Media types:</h5> - * <p> + * * Handles <code>Content-Type</code> types: <code>application/json, text/json</code> * * <h5 class='section'>Description:</h5> - * <p> + * * This parser uses a state machine, which makes it very fast and efficient. It parses JSON in about 70% of the * time that it takes the built-in Java DOM parsers to parse equivalent XML. + * * <p> * This parser handles all valid JSON syntax. * In addition, when strict mode is disable, the parser also handles the following: @@ -50,7 +51,10 @@ import org.apache.juneau.transform.*; * <li> * Unquoted attributes. * </ul> + * + * <p> * Also handles negative, decimal, hexadecimal, octal, and double numbers, including exponential notation. + * * <p> * This parser handles the following input, and automatically returns the corresponding Java class. * <ul class='spaced-list'> @@ -75,6 +79,7 @@ import org.apache.juneau.transform.*; * <li> * Input consisting of only whitespace or JSON comments are converted to <jk>null</jk>. * </ul> + * * <p> * Input can be any of the following: * <ul class='spaced-list'> @@ -97,6 +102,7 @@ import org.apache.juneau.transform.*; * <li> * <js>"'xxx' + \"yyy\""</js> - Converted to a concatenated {@link String}. * </ul> + * * <p> * TIP: If you know you're parsing a JSON object or array, it can be easier to parse it using the * {@link ObjectMap#ObjectMap(CharSequence) ObjectMap(CharSequence)} or {@link ObjectList#ObjectList(CharSequence) @@ -104,7 +110,7 @@ import org.apache.juneau.transform.*; * The end result should be the same. * * <h5 class='section'>Configurable properties:</h5> - * <p> + * * This class has the following properties associated with it: * <ul> * <li>{@link JsonParserContext} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java index a498f9e..66977f3 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserContext.java @@ -17,9 +17,11 @@ import org.apache.juneau.parser.*; /** * Configurable properties on the {@link JsonParser} class. + * * <p> * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store * passed into the constructor. + * * <p> * See {@link PropertyStore} for more information about context properties. * @@ -40,6 +42,7 @@ public final class JsonParserContext extends ParserContext { /** * Constructor. + * * <p> * Typically only called from {@link PropertyStore#getContext(Class)}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java index 34128be..17571c0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParserSession.java @@ -22,6 +22,7 @@ import org.apache.juneau.parser.*; /** * Session object that lives for the duration of a single use of {@link JsonParser}. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -32,24 +33,30 @@ public final class JsonParserSession extends ParserSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. - * The context contains all the configuration settings for this object. - * @param input The input. Can be any of the following types: - * <ul> - * <li><jk>null</jk> - * <li>{@link Reader} - * <li>{@link CharSequence} - * <li>{@link InputStream} containing UTF-8 encoded text. - * <li>{@link File} containing system encoded text. - * </ul> - * @param op The override properties. - * These override any context properties defined in the context. + * @param ctx + * The context creating this session object. + * The context contains all the configuration settings for this object. + * @param input + * The input. + * Can be any of the following types: + * <ul> + * <li><jk>null</jk> + * <li>{@link Reader} + * <li>{@link CharSequence} + * <li>{@link InputStream} containing UTF-8 encoded text. + * <li>{@link File} containing system encoded text. + * </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. * @param outer The outer object for instantiating top-level non-static inner classes. - * @param locale The session locale. - * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. - * If <jk>null</jk>, then the timezone defined on the context is used. + * @param locale + * The session locale. + * If <jk>null</jk>, then the locale defined on the context is used. + * @param timeZone + * The session timezone. + * 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 JsonParserSession(JsonParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, @@ -73,6 +80,7 @@ public final class JsonParserSession extends ParserSession { /** * Returns <jk>true</jk> if the specified character is whitespace. + * * <p> * The definition of whitespace is different for strict vs lax mode. * Strict mode only interprets 0x20 (space), 0x09 (tab), 0x0A (line feed) and 0x0D (carriage return) as whitespace. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java index 0c43381..f4fda17 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java @@ -28,13 +28,13 @@ import org.apache.juneau.transform.*; * Serializes POJO metadata to HTTP responses as JSON. * * <h5 class='section'>Media types:</h5> - * <p> + * * Handles <code>Accept</code> types: <code>application/json+schema, text/json+schema</code> * <p> * Produces <code>Content-Type</code> types: <code>application/json</code> * * <h5 class='section'>Description:</h5> - * <p> + * * Produces the JSON-schema for the JSON produced by the {@link JsonSerializer} class with the same properties. */ @Produces(value="application/json+schema,text/json+schema",contentType="application/json") http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java index e97e64f..5c6449e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java @@ -27,13 +27,13 @@ import org.apache.juneau.transform.*; * Serializes POJO models to JSON. * * <h5 class='section'>Media types:</h5> - * <p> + * * Handles <code>Accept</code> types: <code>application/json, text/json</code> * <p> * Produces <code>Content-Type</code> types: <code>application/json</code> * * <h5 class='section'>Description:</h5> - * <p> + * * The conversion is as follows... * <ul class='spaced-list'> * <li> @@ -54,18 +54,21 @@ import org.apache.juneau.transform.*; * <li> * {@code beans} are converted to JSON objects. * </ul> + * * <p> - * The types above are considered "JSON-primitive" object types. Any non-JSON-primitive object types are transformed - * into JSON-primitive object types through {@link org.apache.juneau.transform.PojoSwap PojoSwaps} associated - * through the {@link CoreObjectBuilder#pojoSwaps(Class...)} method. + * The types above are considered "JSON-primitive" object types. + * Any non-JSON-primitive object types are transformed into JSON-primitive object types through + * {@link org.apache.juneau.transform.PojoSwap PojoSwaps} associated through the + * {@link CoreObjectBuilder#pojoSwaps(Class...)} method. * Several default transforms are provided for transforming Dates, Enums, Iterators, etc... + * * <p> - * This serializer provides several serialization options. Typically, one of the predefined DEFAULT serializers will - * be sufficient. + * This serializer provides several serialization options. + * Typically, one of the predefined DEFAULT serializers will be sufficient. * However, custom serializers can be constructed to fine-tune behavior. * * <h5 class='section'>Configurable properties:</h5> - * <p> + * * This class has the following properties associated with it: * <ul> * <li>{@link JsonSerializerContext} @@ -74,7 +77,7 @@ import org.apache.juneau.transform.*; * </ul> * * <h6 class='topic'>Behavior-specific subclasses</h6> - * <p> + * * The following direct subclasses are provided for convenience: * <ul class='spaced-list'> * <li> @@ -218,8 +221,10 @@ public class JsonSerializer extends WriterSerializer { } /** - * Workhorse method. Determines the type of object, and then calls the - * appropriate type-specific serialization method. + * Workhorse method. + * + * <p> + * Determines the type of object, and then calls the appropriate type-specific serialization method. */ @SuppressWarnings({ "rawtypes", "unchecked" }) SerializerWriter serializeAnything(JsonSerializerSession session, JsonWriter out, Object o, ClassMeta<?> eType, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java index a75e895..14393cc 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerBuilder.java @@ -53,13 +53,14 @@ public class JsonSerializerBuilder extends SerializerBuilder { /** * <b>Configuration property:</b> Simple JSON mode. - * <p> + * * <ul> * <li><b>Name:</b> <js>"JsonSerializer.simpleMode"</js> * <li><b>Data type:</b> <code>Boolean</code> * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, JSON attribute names will only be quoted when necessary. * Otherwise, they are always quoted. @@ -88,13 +89,14 @@ public class JsonSerializerBuilder extends SerializerBuilder { /** * <b>Configuration property:</b> Prefix solidus <js>'/'</js> characters with escapes. - * <p> + * * <ul> * <li><b>Name:</b> <js>"JsonSerializer.escapeSolidus"</js> * <li><b>Data type:</b> <code>Boolean</code> * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, solidus (e.g. slash) characters should be escaped. * The JSON specification allows for either format. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java index f15f6ce..3e07022 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerContext.java @@ -17,9 +17,11 @@ import org.apache.juneau.serializer.*; /** * Configurable properties on the {@link JsonSerializer} class. + * * <p> * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store * passed into the constructor. + * * <p> * See {@link PropertyStore} for more information about context properties. * @@ -40,13 +42,14 @@ public final class JsonSerializerContext extends SerializerContext { /** * <b>Configuration property:</b> Simple JSON mode. - * <p> + * * <ul> * <li><b>Name:</b> <js>"JsonSerializer.simpleMode"</js> * <li><b>Data type:</b> <code>Boolean</code> * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, JSON attribute names will only be quoted when necessary. * Otherwise, they are always quoted. @@ -55,36 +58,39 @@ public final class JsonSerializerContext extends SerializerContext { /** * <b>Configuration property:</b> Prefix solidus <js>'/'</js> characters with escapes. - * <p> + * * <ul> * <li><b>Name:</b> <js>"JsonSerializer.escapeSolidus"</js> * <li><b>Data type:</b> <code>Boolean</code> * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, solidus (e.g. slash) characters should be escaped. * The JSON specification allows for either format. - * However, if you're embedding JSON in an HTML script tag, this setting prevents confusion when trying to - * serialize <xt><\/script></xt>. + * However, if you're embedding JSON in an HTML script tag, this setting prevents confusion when trying to serialize + * <xt><\/script></xt>. */ public static final String JSON_escapeSolidus = "JsonSerializer.escapeSolidus"; /** * <b>Configuration property:</b> Add <js>"_type"</js> properties when needed. - * <p> + * * <ul> * <li><b>Name:</b> <js>"JsonSerializer.addBeanTypeProperties"</js> * <li><b>Data type:</b> <code>Boolean</code> * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred * through reflection. * This is used to recreate the correct objects during parsing if the object types cannot be inferred. * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from * the value type. + * * <p> * When present, this value overrides the {@link SerializerContext#SERIALIZER_addBeanTypeProperties} setting and is * provided to customize the behavior of specific serializers in a {@link SerializerGroup}. @@ -98,6 +104,7 @@ public final class JsonSerializerContext extends SerializerContext { /** * Constructor. + * * <p> * Typically only called from {@link PropertyStore#getContext(Class)}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java index 3f21ab2..a4beae0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializerSession.java @@ -23,6 +23,7 @@ import org.apache.juneau.serializer.*; /** * Session object that lives for the duration of a single use of {@link JsonSerializer}. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -36,19 +37,26 @@ public final class JsonSerializerSession extends SerializerSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. - * The context contains all the configuration settings for this object. - * @param output The output object. See {@link JsonSerializerSession#getWriter()} for valid class types. - * @param op The override properties. - * These override any context properties defined in the context. + * @param ctx + * The context creating this session object. + * The context contains all the configuration settings for this object. + * @param output + * The output object. + * See {@link JsonSerializerSession#getWriter()} for valid class types. + * @param op + * The override properties. + * These override any context properties defined in the context. * @param javaMethod The java method that called this serializer, usually the method in a REST servlet. - * @param locale The session locale. - * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. - * If <jk>null</jk>, then the timezone defined on the context is used. + * @param locale + * The session locale. + * If <jk>null</jk>, then the locale defined on the context is used. + * @param timeZone + * The session timezone. + * 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>). - * @param uriContext The URI context. - * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. + * @param uriContext + * The URI context. + * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ protected JsonSerializerSession(JsonSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java b/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java index 451d236..6d91626 100644 --- a/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java +++ b/juneau-core/src/main/java/org/apache/juneau/json/annotation/Json.java @@ -19,8 +19,10 @@ import java.lang.annotation.*; /** * Annotation for specifying various JSON options for the JSON serializers and parsers. + * * <p> * Can be applied to Java types. + * * <p> * Can be used for the following: * <ul class='spaced-list'> @@ -36,8 +38,10 @@ public @interface Json { /** * Wraps beans in a JSON object with the specified attribute name. + * * <p> * Applies only to {@link ElementType#TYPE}. + * * <p> * This annotation can be applied to beans as well as other objects serialized to other types (e.g. strings). * @@ -48,17 +52,17 @@ public @interface Json { * <jk>public int</jk> f1 = 123; * } * </p> + * * <p> * Without the <ja>@Xml</ja> annotations, serializing this bean as JSON would have produced the following... - * </p> * <p class='bcode'> * { * f1: 123 * } * </p> + * * <p> * With the annotations, serializing this bean as XML produces the following... - * </p> * <p class='bcode'> * { * myWrapper: { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java index 2411636..40a03ec 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackInputStream.java @@ -73,6 +73,8 @@ public final class MsgPackInputStream extends InputStream { /** * Reads the data type flag from the stream. + * + * <p> * This is the byte that indicates what kind of data follows. */ DataType readDataType() throws IOException { @@ -376,6 +378,8 @@ public final class MsgPackInputStream extends InputStream { /** * Returns the length value for the field. + * + * <p> * For ints/floats/bins/strings, this is the number of bytes that the field takes up (minus the data-type flag). * For arrays, it's the number of array entries. * For maps, it's the number of map entries. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java index 1eb1a92..727b465 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java @@ -27,11 +27,11 @@ import org.apache.juneau.transform.*; * Parses a MessagePack stream into a POJO model. * * <h5 class='section'>Media types:</h5> - * <p> + * * Handles <code>Content-Type</code> types: <code>octal/msgpack</code> * * <h5 class='section'>Configurable properties:</h5> - * <p> + * * This class has the following properties associated with it: * <ul> * <li>{@link MsgPackParserContext} http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java index e221779..dc56d25 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserContext.java @@ -17,9 +17,11 @@ import org.apache.juneau.parser.*; /** * Configurable properties on the {@link MsgPackParser} class. + * * <p> * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store * passed into the constructor. + * * <p> * See {@link PropertyStore} for more information about context properties. * @@ -40,6 +42,7 @@ public final class MsgPackParserContext extends ParserContext { /** * Constructor. + * * <p> * Typically only called from {@link PropertyStore#getContext(Class)}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java index 170e165..93f16e6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParserSession.java @@ -22,6 +22,7 @@ import org.apache.juneau.parser.*; /** * Session object that lives for the duration of a single use of {@link MsgPackParser}. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -32,24 +33,30 @@ public final class MsgPackParserSession extends ParserSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. - * The context contains all the configuration settings for this object. - * @param input The input. Can be any of the following types: - * <ul> - * <li><jk>null</jk> - * <li>{@link Reader} - * <li>{@link CharSequence} - * <li>{@link InputStream} containing UTF-8 encoded text. - * <li>{@link File} containing system encoded text. - * </ul> - * @param op The override properties. - * These override any context properties defined in the context. + * @param ctx + * The context creating this session object. + * The context contains all the configuration settings for this object. + * @param input + * The input. + * Can be any of the following types: + * <ul> + * <li><jk>null</jk> + * <li>{@link Reader} + * <li>{@link CharSequence} + * <li>{@link InputStream} containing UTF-8 encoded text. + * <li>{@link File} containing system encoded text. + * </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. * @param outer The outer object for instantiating top-level non-static inner classes. - * @param locale The session locale. - * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. - * If <jk>null</jk>, then the timezone defined on the context is used. + * @param locale + * The session locale. + * If <jk>null</jk>, then the locale defined on the context is used. + * @param timeZone + * The session timezone. + * 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 MsgPackParserSession(MsgPackParserContext ctx, ObjectMap op, Object input, Method javaMethod, Object outer, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java index 85f6708..b301fa0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java @@ -25,13 +25,13 @@ import org.apache.juneau.transform.*; * Serializes POJO models to MessagePack. * * <h5 class='section'>Media types:</h5> - * <p> + * * Handles <code>Accept</code> types: <code>octal/msgpack</code> * <p> * Produces <code>Content-Type</code> types: <code>octal/msgpack</code> * * <h5 class='section'>Configurable properties:</h5> - * <p> + * * This class has the following properties associated with it: * <ul> * <li>{@link MsgPackSerializerContext} @@ -64,8 +64,10 @@ public class MsgPackSerializer extends OutputStreamSerializer { } /** - * Workhorse method. Determines the type of object, and then calls the appropriate type-specific serialization - * method. + * Workhorse method. + * + * <p> + * Determines the type of object, and then calls the appropriate type-specific serialization method. */ @SuppressWarnings({ "rawtypes", "unchecked" }) MsgPackOutputStream serializeAnything(MsgPackSerializerSession session, MsgPackOutputStream out, Object o, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java index f0c6bb0..f1365e1 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerContext.java @@ -17,9 +17,11 @@ import org.apache.juneau.serializer.*; /** * Configurable properties on the {@link MsgPackSerializer} class. + * * <p> * Context properties are set by calling {@link PropertyStore#setProperty(String, Object)} on the property store * passed into the constructor. + * * <p> * See {@link PropertyStore} for more information about context properties. * @@ -40,19 +42,21 @@ public final class MsgPackSerializerContext extends SerializerContext { /** * <b>Configuration property:</b> Add <js>"_type"</js> properties when needed. - * <p> + * * <ul> * <li><b>Name:</b> <js>"MsgPackSerializer.addBeanTypeProperties"</js> * <li><b>Data type:</b> <code>Boolean</code> * <li><b>Default:</b> <jk>false</jk> * <li><b>Session-overridable:</b> <jk>true</jk> * </ul> + * * <p> * If <jk>true</jk>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred * through reflection. * This is used to recreate the correct objects during parsing if the object types cannot be inferred. * For example, when serializing a {@code Map<String,Object>} field, where the bean class cannot be determined from * the value type. + * * <p> * When present, this value overrides the {@link SerializerContext#SERIALIZER_addBeanTypeProperties} setting and is * provided to customize the behavior of specific serializers in a {@link SerializerGroup}. @@ -64,6 +68,7 @@ public final class MsgPackSerializerContext extends SerializerContext { /** * Constructor. + * * <p> * Typically only called from {@link PropertyStore#getContext(Class)}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java index 9a489d8..860989a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializerSession.java @@ -24,6 +24,7 @@ import org.apache.juneau.serializer.*; /** * Session object that lives for the duration of a single use of {@link MsgPackSerializer}. + * * <p> * This class is NOT thread safe. It is meant to be discarded after one-time use. */ @@ -35,19 +36,26 @@ public final class MsgPackSerializerSession extends SerializerSession { /** * Create a new session using properties specified in the context. * - * @param ctx The context creating this session object. - * The context contains all the configuration settings for this object. - * @param output The output object. See {@link JsonSerializerSession#getOutputStream()} for valid class types. - * @param op The override properties. - * These override any context properties defined in the context. + * @param ctx + * The context creating this session object. + * The context contains all the configuration settings for this object. + * @param output + * The output object. + * See {@link JsonSerializerSession#getOutputStream()} for valid class types. + * @param op + * The override properties. + * These override any context properties defined in the context. * @param javaMethod The java method that called this serializer, usually the method in a REST servlet. - * @param locale The session locale. - * If <jk>null</jk>, then the locale defined on the context is used. - * @param timeZone The session timezone. - * If <jk>null</jk>, then the timezone defined on the context is used. + * @param locale + * The session locale. + * If <jk>null</jk>, then the locale defined on the context is used. + * @param timeZone + * The session timezone. + * 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>). - * @param uriContext The URI context. - * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. + * @param uriContext + * The URI context. + * Identifies the current request URI used for resolution of URIs to absolute or root-relative form. */ protected MsgPackSerializerSession(MsgPackSerializerContext ctx, ObjectMap op, Object output, Method javaMethod, Locale locale, TimeZone timeZone, MediaType mediaType, UriContext uriContext) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java b/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java index 622dd35..46b1678 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/InputStreamParser.java @@ -19,7 +19,7 @@ import org.apache.juneau.annotation.*; * Subclass of {@link Parser} for byte-based parsers. * * <h5 class='section'>Description:</h5> - * <p> + * * This class is typically the parent class of all byte-based parsers. * It has 1 abstract method to implement... * <ul> @@ -27,8 +27,9 @@ import org.apache.juneau.annotation.*; * </ul> * * <h6 class='topic'>@Consumes annotation</h6> - * <p> + * * The media types that this parser can handle is specified through the {@link Consumes @Consumes} annotation. + * * <p> * However, the media types can also be specified programmatically by overriding the {@link #getMediaTypes()} method. */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/f400b0c0/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java index 8c27221..756e7ce 100644 --- a/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java +++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParseException.java @@ -80,6 +80,8 @@ public final class ParseException extends FormattedException { /** * Returns the highest-level <code>ParseException</code> in the stack trace. + * + * <p> * Useful for JUnit testing of error conditions. * * @return The root parse exception, or this exception if there isn't one.
