http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java b/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java index a9e52f0..33a163a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java +++ b/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java @@ -251,7 +251,7 @@ public class BeanPropertyMeta { if (field != null) { BeanProperty p = field.getAnnotation(BeanProperty.class); - rawTypeMeta = f.getClassMeta(p, field.getGenericType(), typeVarImpls); + rawTypeMeta = f.resolveClassMeta(p, field.getGenericType(), typeVarImpls); isUri |= (rawTypeMeta.isUri() || field.isAnnotationPresent(org.apache.juneau.annotation.URI.class)); if (p != null) { swap = getPropertyPojoSwap(p); @@ -264,7 +264,7 @@ public class BeanPropertyMeta { if (getter != null) { BeanProperty p = getter.getAnnotation(BeanProperty.class); if (rawTypeMeta == null) - rawTypeMeta = f.getClassMeta(p, getter.getGenericReturnType(), typeVarImpls); + rawTypeMeta = f.resolveClassMeta(p, getter.getGenericReturnType(), typeVarImpls); isUri |= (rawTypeMeta.isUri() || getter.isAnnotationPresent(org.apache.juneau.annotation.URI.class)); if (p != null) { if (swap == null) @@ -278,7 +278,7 @@ public class BeanPropertyMeta { if (setter != null) { BeanProperty p = setter.getAnnotation(BeanProperty.class); if (rawTypeMeta == null) - rawTypeMeta = f.getClassMeta(p, setter.getGenericParameterTypes()[0], typeVarImpls); + rawTypeMeta = f.resolveClassMeta(p, setter.getGenericParameterTypes()[0], typeVarImpls); isUri |= (rawTypeMeta.isUri() || setter.isAnnotationPresent(org.apache.juneau.annotation.URI.class)); if (p != null) { if (swap == null)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/BeanRegistry.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanRegistry.java b/juneau-core/src/main/java/org/apache/juneau/BeanRegistry.java index 0bc404c..13f9657 100644 --- a/juneau-core/src/main/java/org/apache/juneau/BeanRegistry.java +++ b/juneau-core/src/main/java/org/apache/juneau/BeanRegistry.java @@ -69,7 +69,14 @@ public class BeanRegistry { Map<?,?> m = (Map<?,?>)c.newInstance(); for (Map.Entry<?,?> e : m.entrySet()) { String typeName = StringUtils.toString(e.getKey()); - ClassMeta<?> val = beanContext.getClassMeta(e.getValue()); + Object v = e.getValue(); + ClassMeta<?> val = null; + if (v instanceof Type) + val = beanContext.getClassMeta((Type)v); + else if (v.getClass().isArray()) + val = getTypedClassMeta(v); + else + throw new BeanRuntimeException("Class ''{0}'' was passed to BeanRegistry but value of type ''{1}'' found in map is not a Type object.", c.getName(), v.getClass().getName()); map.put(typeName, val); } } else { @@ -86,6 +93,17 @@ public class BeanRegistry { } } + private ClassMeta<?> getTypedClassMeta(Object array) { + int len = Array.getLength(array); + if (len == 0) + throw new BeanRuntimeException("Map entry had an empty array value."); + Type type = (Type)Array.get(array, 0); + Type[] args = new Type[len-1]; + for (int i = 1; i < len; i++) + args[i-1] = (Type)Array.get(array, i); + return beanContext.getClassMeta(type, args); + } + /** * Converts the specified object map into a bean if it contains a <js>"_type"</js> entry in it. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/BeanSession.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanSession.java b/juneau-core/src/main/java/org/apache/juneau/BeanSession.java index dc54ac4..540329b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/BeanSession.java +++ b/juneau-core/src/main/java/org/apache/juneau/BeanSession.java @@ -613,7 +613,7 @@ public class BeanSession extends Session { * <p> * If object is not a true bean, then throws a {@link BeanRuntimeException} with an explanation of why it's not a bean. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Construct a bean map around a bean instance</jc> * BeanMap<Person> bm = BeanContext.<jsf>DEFAULT</jsf>.forBean(<jk>new</jk> Person()); @@ -655,7 +655,7 @@ public class BeanSession extends Session { * <p> * If object is not a true bean, throws a {@link BeanRuntimeException} with an explanation of why it's not a bean. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Construct a bean map for new bean using only properties defined in a superclass</jc> * BeanMap<MySubBean> bm = BeanContext.<jsf>DEFAULT</jsf>.forBean(<jk>new</jk> MySubBean(), MySuperBean.<jk>class</jk>); @@ -693,7 +693,7 @@ public class BeanSession extends Session { * <p> * If object is not a true bean, then throws a {@link BeanRuntimeException} with an explanation of why it's not a bean. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Construct a new bean map wrapped around a new Person object</jc> * BeanMap<Person> bm = BeanContext.<jsf>DEFAULT</jsf>.newBeanMap(Person.<jk>class</jk>); @@ -735,7 +735,7 @@ public class BeanSession extends Session { * Creates a new empty bean of the specified type, except used for instantiating inner member classes that must * be instantiated within another class instance. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Construct a new instance of the specified bean class</jc> * Person p = BeanContext.<jsf>DEFAULT</jsf>.newBean(Person.<jk>class</jk>); @@ -797,23 +797,6 @@ public class BeanSession extends Session { } /** - * Returns the class type bound to this bean context if the specified class type - * is from another bean context. - * <p> - * For example, this method allows you to pass in an object from <code>BeanContext.<jsf>DEFAULT</jsf>.getMapClassMeta(...)</code> - * to any of the <code>ReaderParser.parse(Reader, ClassMeta, ParserContext)</code> methods, and the parsers - * will use this method to replace the class type with the one registered with the parser. - * This ensures that registered transforms are applied correctly. - * - * @param <T> The class type. - * @param cm The class type. - * @return The class type bound by this bean context. - */ - public final <T> ClassMeta<T> normalizeClassMeta(ClassMeta<T> cm) { - return ctx.normalizeClassMeta(cm); - } - - /** * Returns a {@code ClassMeta} wrapper around a {@link Class} object. * * @param <T> The class type being wrapped. @@ -825,83 +808,36 @@ public class BeanSession extends Session { } /** - * Returns a {@code ClassMeta} wrapper around a {@link Class} or {@link Type} object. - * - * @param <T> The class type being wrapped. - * @param c The class being wrapped. - * @return The class meta object containing information about the class. - */ - public final <T> ClassMeta<T> getClassMeta(Object c) { - return ctx.getClassMeta(c); - } - - /** - * Returns a {@link ClassMeta} wrapper around a {@link Map} or {@link Collection} class. + * Used to resolve <code>ClassMetas</code> of type <code>Collection</code> and <code>Map</code> that have + * <code>ClassMeta</code> values that themselves could be collections or maps. * <p> - * Handles the following object arrays: - * <ul> - * <li><code>Object[2]</code> containing <code>{Class<? extends Collection>, Object}</code> - * where the 2nd entry is the entry type which can be a Class/Type or another array. - * <li><code>Object[3]</code> containing <code>{Class<? extends Map>, Object, Object}</code> - * where the 2nd entry is the key type which can be a Class/Type and 3rd entry is the value type which can be a Class/Type or another array. - * </ul> - * - * @param c The object array being resolved. - * @return The class meta object containing information about the class. - */ - public final <T> ClassMeta<T> getClassMeta(Object...c) { - return ctx.getClassMeta(c); - } - - /** - * Convenience method for creating a {@link Map} class meta. + * <code>Collection</code> meta objects are assumed to be followed by zero or one meta objects indicating the element type. * <p> - * Equivalent to calling <code>getClassMeta(c, keyType, valueType)</code>. - * - * @param <K> The map key class type. - * @param <V> The map value class type. - * @param <T> The map class type. - * @param c The map class type. - * @param keyType The map key class type. - * @param valueType The map value class type. - * @return If the key and value types are Object, returns a cached {@link ClassMeta} object.<br> - * Otherwise, returns a new {@link ClassMeta} object every time. - */ - public final <K,V,T extends Map<K,V>> ClassMeta<T> getMapClassMeta(Class<T> c, Class<K> keyType, Class<V> valueType) { - return getClassMeta(c, keyType, valueType); - } - - /** - * Convenience method for creating a {@link Collection} class meta. + * <code>Map</code> meta objects are assumed to be followed by zero or two meta objects indicating the key and value types. * <p> - * Equivalent to calling <code>getClassMeta(c, keyType, valueType)</code>. + * The array can be arbitrarily long to indicate arbitrarily complex data structures. * - * @param <E> The collection element class type. - * @param <T> The collection class type. - * @param c The collection class type. - * @param elementType The collection element class type. - * @return If the element type is <code>OBJECT</code>, returns a cached {@link ClassMeta} object.<br> - * Otherwise, returns a new {@link ClassMeta} object every time. - */ - public final <E,T extends Collection<E>> ClassMeta<T> getCollectionClassMeta(Class<T> c, Class<E> elementType) { - return getClassMeta(c, getClassMeta(elementType)); - } - - /** - * Constructs a ClassMeta object given the specified object and parameters. + * <h5 class='section'>Examples:</h5> + * <ul> + * <li><code>getClassMeta(String.<jk>class</jk>);</code> - A normal type. + * <li><code>getClassMeta(List.<jk>class</jk>);</code> - A list containing objects. + * <li><code>getClassMeta(List.<jk>class</jk>, String.<jk>class</jk>);</code> - A list containing strings. + * <li><code>getClassMeta(LinkedList.<jk>class</jk>, String.<jk>class</jk>);</code> - A linked-list containing strings. + * <li><code>getClassMeta(LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>);</code> - A linked-list containing linked-lists of strings. + * <li><code>getClassMeta(Map.<jk>class</jk>);</code> - A map containing object keys/values. + * <li><code>getClassMeta(Map.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);</code> - A map containing string keys/values. + * <li><code>getClassMeta(Map.<jk>class</jk>, String.<jk>class</jk>, List.<jk>class</jk>, MyBean.<jk>class</jk>);</code> - A map containing string keys and values of lists containing beans. + * </ul> * - * @param o The parent class type. - * Can be any of the following types: - * <ul class='spaced-list'> - * <li>{@link ClassMeta} object, which just returns the same object. - * <li>{@link Class} object (e.g. <code>String.<jk>class</jk></code>). - * <li>{@link Type} object (e.g. {@link ParameterizedType} or {@link GenericArrayType}. - * <li>Anything else is interpreted as {@code getClassMeta(o.getClass(), parameters);} - * </ul> - * @return A ClassMeta object, or <jk>null</jk> if the object is null. + * @param type The class to resolve. + * <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. + * @return The class meta. */ - public final ClassMeta getClassMeta(Type o) { - return ctx.getClassMeta(o, null); + public final <T> ClassMeta<T> getClassMeta(Type type, Type...args) { + return ctx.getClassMeta(type, args); } /** http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java b/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java index 69c8b33..fdcbd2a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java +++ b/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java @@ -739,7 +739,7 @@ public final class ClassMeta<T> implements Type { * @return The constructor, or <jk>null</jk> if no no-arg constructor exists with the required visibility. */ @SuppressWarnings({"rawtypes","unchecked"}) - protected static <T> Constructor<? extends T> findNoArgConstructor(Class<T> c, Visibility v) { + protected static <T> Constructor<? extends T> findNoArgConstructor(Class<?> c, Visibility v) { int mod = c.getModifiers(); if (Modifier.isAbstract(mod)) return null; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/CoreApi.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/CoreApi.java b/juneau-core/src/main/java/org/apache/juneau/CoreApi.java index 5df8994..1094632 100644 --- a/juneau-core/src/main/java/org/apache/juneau/CoreApi.java +++ b/juneau-core/src/main/java/org/apache/juneau/CoreApi.java @@ -15,7 +15,7 @@ package org.apache.juneau; /** * Common super class for all core-API serializers, parsers, and serializer/parser groups. * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Maintains an inner {@link ContextFactory} instance that can be used by serializer and parser subclasses * to work with beans in a consistent way. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/FormattedException.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/FormattedException.java b/juneau-core/src/main/java/org/apache/juneau/FormattedException.java index 7731f56..7dae895 100644 --- a/juneau-core/src/main/java/org/apache/juneau/FormattedException.java +++ b/juneau-core/src/main/java/org/apache/juneau/FormattedException.java @@ -25,7 +25,7 @@ public class FormattedException extends Exception { * Constructor. * * @param message The {@link MessageFormat}-style message. - * @param args The arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. */ public FormattedException(String message, Object...args) { super(args.length == 0 ? message : MessageFormat.format(message, args)); @@ -36,7 +36,7 @@ public class FormattedException extends Exception { * * @param causedBy The cause of this exception. * @param message The {@link MessageFormat}-style message. - * @param args The arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. */ public FormattedException(Throwable causedBy, String message, Object...args) { this(message, args); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/FormattedRuntimeException.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/FormattedRuntimeException.java b/juneau-core/src/main/java/org/apache/juneau/FormattedRuntimeException.java index 8ee1f60..bf5e9d6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/FormattedRuntimeException.java +++ b/juneau-core/src/main/java/org/apache/juneau/FormattedRuntimeException.java @@ -25,7 +25,7 @@ public class FormattedRuntimeException extends RuntimeException { * Constructor. * * @param message The {@link MessageFormat}-style message. - * @param args The arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. */ public FormattedRuntimeException(String message, Object...args) { super(args.length == 0 ? message : MessageFormat.format(message, args)); @@ -36,7 +36,7 @@ public class FormattedRuntimeException extends RuntimeException { * * @param causedBy The cause of this exception. * @param message The {@link MessageFormat}-style message. - * @param args The arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. */ public FormattedRuntimeException(Throwable causedBy, String message, Object...args) { this(message, args); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/MediaRange.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/MediaRange.java b/juneau-core/src/main/java/org/apache/juneau/MediaRange.java index 8ef60fd..376fdee 100644 --- a/juneau-core/src/main/java/org/apache/juneau/MediaRange.java +++ b/juneau-core/src/main/java/org/apache/juneau/MediaRange.java @@ -109,7 +109,7 @@ public final class MediaRange implements Comparable<MediaRange> { /** * Returns the media type enclosed by this media range. * - * <h6 class='topic'>Examples:</h6> + * <h5 class='section'>Examples:</h5> * <ul> * <li><js>"text/html"</js> * <li><js>"text/*"</js> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/MediaType.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/MediaType.java b/juneau-core/src/main/java/org/apache/juneau/MediaType.java index 6fa1819..4b54884 100644 --- a/juneau-core/src/main/java/org/apache/juneau/MediaType.java +++ b/juneau-core/src/main/java/org/apache/juneau/MediaType.java @@ -56,15 +56,17 @@ public final class MediaType { * The same media type strings always return the same objects so that these objects * can be compared for equality using '=='. * <p> - * Note: Spaces are replaced with <js>'+'</js> characters. - * This gets around the issue where passing media type strings with <js>'+'</js> as HTTP GET parameters - * get replaced with spaces by your browser. Since spaces aren't supported by the spec, this - * is doesn't break anything. - * <p> - * Anything including and following the <js>';'</js> character is ignored (e.g. <js>";charset=X"</js>). + * <h5 class='section'>Notes:</h5> + * <ul> + * <li>Spaces are replaced with <js>'+'</js> characters. + * This gets around the issue where passing media type strings with <js>'+'</js> as HTTP GET parameters + * get replaced with spaces by your browser. Since spaces aren't supported by the spec, this + * is doesn't break anything. + * <li>Anything including and following the <js>';'</js> character is ignored (e.g. <js>";charset=X"</js>). + * </ul> * * @param s - The media type string. Will be lowercased. - * Returns <jk>null</jk> if input is null. + * <br>Returns <jk>null</jk> if input is null. * @return A cached media type object. */ public static MediaType forString(String s) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/ObjectList.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ObjectList.java b/juneau-core/src/main/java/org/apache/juneau/ObjectList.java index 908352c..d8526e8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ObjectList.java +++ b/juneau-core/src/main/java/org/apache/juneau/ObjectList.java @@ -32,7 +32,7 @@ import org.apache.juneau.utils.*; * constructor is provided for converting a JSON array string directly into a {@link List}. It also contains * accessor methods for to avoid common typecasting when accessing elements in a list. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Construct an empty List</jc> * List l = <jk>new</jk> ObjectList(); @@ -456,7 +456,7 @@ public class ObjectList extends LinkedList<Object> { * <p> * See {@link BeanSession#convertToType(Object, ClassMeta)} for a description of valid conversions. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Iterate over a list of ObjectMaps.</jc> * ObjectList l = <jk>new</jk> ObjectList(<js>"[{foo:'bar'},{baz:123}]"</js>); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java index 5f54e5a..502189a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java +++ b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java @@ -36,7 +36,7 @@ import org.apache.juneau.utils.*; * constructor is provided for converting a JSON object string directly into a {@link Map}. It also contains * accessor methods for to avoid common typecasting when accessing elements in a list. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Construct an empty Map</jc> * Map m = <jk>new</jk> ObjectMap(); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDashedLC.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDashedLC.java b/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDashedLC.java index 00b111f..6829262 100644 --- a/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDashedLC.java +++ b/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDashedLC.java @@ -15,7 +15,7 @@ package org.apache.juneau; /** * Converts property names to dashed-lower-case format. * - * <h6 class='topic'>Examples:</h6> + * <h5 class='section'>Examples:</h5> * <ul> * <li><js>"fooBar"</js> -> <js>"foo-bar"</js> * <li><js>"fooBarURL"</js> -> <js>"foo-bar-url"</js> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDefault.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDefault.java b/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDefault.java index e5b6f9a..1a64676 100644 --- a/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDefault.java +++ b/juneau-core/src/main/java/org/apache/juneau/PropertyNamerDefault.java @@ -17,7 +17,7 @@ import java.beans.*; /** * Default property namer. * - * <h6 class='topic'>Examples:</h6> + * <h5 class='section'>Examples:</h5> * <ul> * <li><js>"fooBar"</js> -> <js>"fooBar"</js> * <li><js>"fooBarURL"</js> -> <js>"fooBarURL"</js> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/Session.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/Session.java b/juneau-core/src/main/java/org/apache/juneau/Session.java index 3edcf80..fe33eb2 100644 --- a/juneau-core/src/main/java/org/apache/juneau/Session.java +++ b/juneau-core/src/main/java/org/apache/juneau/Session.java @@ -101,7 +101,7 @@ public abstract class Session { * Logs a warning message. * * @param msg The warning message. - * @param args Optional printf arguments to replace in the error message. + * @param args Optional {@link MessageFormat}-style arguments. */ public final void addWarning(String msg, Object... args) { if (warnings == null) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/Visibility.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/Visibility.java b/juneau-core/src/main/java/org/apache/juneau/Visibility.java index d536100..59f9fee 100644 --- a/juneau-core/src/main/java/org/apache/juneau/Visibility.java +++ b/juneau-core/src/main/java/org/apache/juneau/Visibility.java @@ -46,7 +46,7 @@ public enum Visibility { /** * Identifies if the specified mod matches this visibility. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <code> * <jsf>PUBLIC</jsf>.isVisible(MyPublicClass.<jk>class</jk>.getModifiers()); <jc>//true</jk> * <jsf>PUBLIC</jsf>.isVisible(MyPrivateClass.<jk>class</jk>.getModifiers()); <jc>//false</jk> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java index 03c2bd3..63ae64f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java +++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java @@ -51,7 +51,7 @@ public @interface Bean { * a simple name/value mapping of names to classes. * Names do not need to be universally unique. However, they must be unique within a dictionary. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@Bean</ja>(typeName=<js>"foo"</js>) * <jk>public class</jk> Foo { @@ -98,7 +98,7 @@ public @interface Bean { * <p> * This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getProperties()} method. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Address class with only street/city/state properties (in that order).</jc> * <jc>// All other properties are ignored.</jc> @@ -132,7 +132,7 @@ public @interface Bean { * <p> * This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getExcludeProperties()} method. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Address class with only street/city/state properties (in that order).</jc> * <jc>// All other properties are ignored.</jc> @@ -152,7 +152,7 @@ public @interface Bean { * <p> * This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getPropertyNamer()} method. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Define a class with dashed-lowercase property names.</jc> * <ja>@Bean</ja>(propertyNamer=PropertyNamerDashedLC.<jk>class</jk>) http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java b/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java index 3e4cc76..10e4919 100644 --- a/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java +++ b/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java @@ -67,7 +67,7 @@ public @interface BeanProperty { * <p> * This property must denote a concrete bean class with a no-arg constructor. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jk>public class</jk> MyBean { * @@ -84,7 +84,7 @@ public @interface BeanProperty { * the class types of the contents of the bean property object when the generic parameter * types are interfaces or abstract classes. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jk>public class</jk> MyBean { * @@ -106,7 +106,7 @@ public @interface BeanProperty { * Typically used for rendering {@link Date Dates} and {@link Calendar Calendars} * as a particular string format. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jk>public class</jk> MyClass { * @@ -129,7 +129,7 @@ public @interface BeanProperty { * <li>Bean/Map collections - Same, but applied to each element in the collection. * </ul> * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jk>public class</jk> MyClass { * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java index 30c588e..867db1c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java +++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Consumes.java @@ -22,7 +22,7 @@ import org.apache.juneau.parser.*; /** * Annotation used on subclasses of {@link Parser} to identify the media types that it consumes. * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Provides a way to define the contents of {@link Parser#getMediaTypes()} through an annotation. * <p> @@ -31,7 +31,7 @@ import org.apache.juneau.parser.*; * It should be noted that this annotation is optional and that the {@link Parser#getMediaTypes()} method can * be overridden by subclasses to return the media types programmatically. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * Standard example: * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java index 6180de4..0f0e821 100644 --- a/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java +++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java @@ -38,7 +38,7 @@ public @interface Pojo { * <li>Any other class. Will get interpreted as a {@link SurrogateSwap}. * </ul> * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * In this case, a swap is being applied to a bean that will force it to be serialized as a <code>String</code> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java index d4c77fb..2361734 100644 --- a/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java +++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Produces.java @@ -22,7 +22,7 @@ import org.apache.juneau.serializer.*; /** * Annotation used on subclasses of {@link Serializer} to identify the media types that it produces. * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Provides a way to define the contents of {@link Serializer#getMediaTypes()} through an annotation. * <p> @@ -31,7 +31,7 @@ import org.apache.juneau.serializer.*; * It should be noted that this annotation is optional and that the {@link Serializer#getMediaTypes()} method can * be overridden by subclasses to return the media types programmatically. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * Standard example: * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/annotation/URI.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/URI.java b/juneau-core/src/main/java/org/apache/juneau/annotation/URI.java index 45769f6..7e7c0ad 100644 --- a/juneau-core/src/main/java/org/apache/juneau/annotation/URI.java +++ b/juneau-core/src/main/java/org/apache/juneau/annotation/URI.java @@ -34,7 +34,7 @@ import org.apache.juneau.serializer.*; * <p> * This annotation can be applied to classes, interfaces, or bean property methods for fields. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * * <jc>// Applied to a class whose toString() method returns a URI.</jc> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java index 6a0bc5d..5a57e52 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java @@ -47,7 +47,7 @@ import org.apache.juneau.xml.annotation.*; * <p> * Only 2-dimentional POJOs (arrays or collections of maps or beans) can be serialized to Cognos. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * The construct shown above is a serialized <code>AddressBook</code> object which is a subclass of <code>LinkedList<Person></code>. * The code for generating the XML is as follows... http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/JsonType.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/JsonType.java b/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/JsonType.java index ed7da4a..3beae9e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/JsonType.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/JsonType.java @@ -19,7 +19,7 @@ package org.apache.juneau.dto.jsonschema; * that override the default serialization/parsing behavior of <code>Enum</code> types * so that they are represented in lowercase form (as per the specification). * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * // Produces 'number', not 'NUMBER'. * String json = JsonSerializer.DEFAULT.serialize(JsonType.NUMBER); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Contact.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Contact.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Contact.java index 7e9115b..2996c19 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Contact.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Contact.java @@ -17,7 +17,7 @@ import org.apache.juneau.annotation.*; /** * Contact information for the exposed API. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"name"</js>: <js>"API Support"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ExternalDocumentation.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ExternalDocumentation.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ExternalDocumentation.java index 01bd5d6..0c03be9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ExternalDocumentation.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ExternalDocumentation.java @@ -17,7 +17,7 @@ import org.apache.juneau.annotation.*; /** * Allows referencing an external resource for extended documentation. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"description"</js>: <js>"Find more info here"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java index 11b8d0c..9dad31f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/HeaderInfo.java @@ -21,7 +21,7 @@ import org.apache.juneau.json.*; /** * Describes a single HTTP header. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"description"</js>: <js>"The number of allowed requests in the current period"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Info.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Info.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Info.java index 31325bb..4041cc9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Info.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Info.java @@ -17,7 +17,7 @@ import org.apache.juneau.annotation.*; /** * The object provides metadata about the API. The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"title"</js>: <js>"Swagger Sample App"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Items.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Items.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Items.java index 38b465c..91afdaf 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Items.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Items.java @@ -21,7 +21,7 @@ import org.apache.juneau.json.*; /** * A limited subset of JSON-Schema's items object. It is used by parameter definitions that are not located in "body". * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"type"</js>: <js>"string"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/License.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/License.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/License.java index 3b5ad8a..fdd8f27 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/License.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/License.java @@ -17,7 +17,7 @@ import org.apache.juneau.annotation.*; /** * License information for the exposed API. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"name"</js>: <js>"Apache 2.0"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Operation.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Operation.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Operation.java index 28b031a..cc0fbe9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Operation.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Operation.java @@ -20,7 +20,7 @@ import org.apache.juneau.annotation.*; /** * Describes a single API operation on a path. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"tags"</js>: [ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ResponseInfo.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ResponseInfo.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ResponseInfo.java index 68125aa..a95081e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ResponseInfo.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/ResponseInfo.java @@ -19,7 +19,7 @@ import org.apache.juneau.annotation.*; /** * Describes a single response from an API Operation. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"description"</js>: <js>"A complex object array response"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java index 90979d7..d3d8c36 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/SecurityScheme.java @@ -23,7 +23,7 @@ import org.apache.juneau.json.*; * <p> * Supported schemes are basic authentication, an API key (either as a header or as a query parameter) and OAuth2's common flows (implicit, password, application and access code). * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Basic authentication sample</jc> * { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Tag.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Tag.java b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Tag.java index dba2be3..fe5f979 100644 --- a/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Tag.java +++ b/juneau-core/src/main/java/org/apache/juneau/dto/swagger/Tag.java @@ -19,7 +19,7 @@ import org.apache.juneau.annotation.*; * <p> * It is not mandatory to have a Tag Object per tag used there. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * { * <js>"name"</js>: <js>"pet"</js>, http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java b/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java index ef9cb63..6f7c488 100644 --- a/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java +++ b/juneau-core/src/main/java/org/apache/juneau/encoders/Encoder.java @@ -17,7 +17,7 @@ import java.io.*; /** * Used for enabling decompression on requests and compression on responses, such as support for GZIP compression. * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Used to wrap input and output streams withing compression/decompression streams. * <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java index 3cb2050..a40a93a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java +++ b/juneau-core/src/main/java/org/apache/juneau/encoders/EncoderGroup.java @@ -24,7 +24,7 @@ import org.apache.juneau.serializer.*; /** * Represents the group of {@link Encoder encoders} keyed by codings. * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Maintains a set of encoders and the codings that they can handle. * <p> @@ -42,7 +42,7 @@ import org.apache.juneau.serializer.*; * For example, calling <code>g.append(E1.<jk>class</jk>,E2.<jk>class</jk>).append(E3.<jk>class</jk>,E4.<jk>class</jk>)</code> * will result in the order <code>E3, E4, E1, E2</code>. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Create an encoder group with support for gzip compression.</jc> * EncoderGroup g = <jk>new</jk> EncoderGroup().append(GzipEncoder.<jk>class</jk>); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java index de30779..ce1ec10 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java @@ -24,18 +24,18 @@ import org.apache.juneau.serializer.*; /** * Serializes POJOs to HTTP responses as HTML documents. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html</code> * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Same as {@link HtmlSerializer}, except wraps the response in <code><xt><html></code>, <code><xt><head></code>, * and <code><xt><body></code> tags so that it can be rendered in a browser. * - * <h6 class='topic'>Configurable properties</h6> + * <h5 class='section'>Configurable properties:</h5> * <p> * This class has the following properties associated with it: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java index 64e1009..64d8e3a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializerContext.java @@ -22,7 +22,7 @@ import org.apache.juneau.*; * These are typically specified via <ja>@RestResource.properties()</ja> and <ja>@RestMethod.properties()</ja> annotations, * although they can also be set programmatically via the <code>RestResponse.setProperty()</code> method. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <ja>@RestResource</ja>( * messages=<js>"nls/AddressBookResource"</js>, @@ -87,13 +87,13 @@ import org.apache.juneau.*; * </tr> * </table> * - * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <h5 class='section'>Inherited configurable properties:</h5> * <ul class='javahierarchy'> - * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='c'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. * <ul> - * <li class='c'><a class='doclink' href='../serializer/SerializerContext.html#ConfigProperties'>SerializerContext</a> - Configurable properties common to all serializers. + * <li class='c'><a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a> - Configurable properties common to all serializers. * <ul> - * <li class='c'><a class='doclink' href='../html/HtmlSerializerContext.html#ConfigProperties'>HtmlSerializerContext</a> - Configurable properties on the HTML serializer. + * <li class='c'><a class="doclink" href="../html/HtmlSerializerContext.html#ConfigProperties">HtmlSerializerContext</a> - Configurable properties on the HTML serializer. * </ul> * </ul> * </ul> @@ -111,7 +111,7 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * </ul> * <p> * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * The <code>AddressBookResource</code> sample class uses this property... * </p> @@ -148,7 +148,7 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * </ul> * <p> * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * The <code>AddressBookResource</code> sample class uses this property... * </p> @@ -196,7 +196,7 @@ public final class HtmlDocSerializerContext extends HtmlSerializerContext { * Absolute (<js>"/myOtherContext/foo"</js>) and fully-qualified (<js>"http://localhost2/foo"</js>) URLs * can also be used. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p> * The <code>AddressBookResource</code> sample class uses this property... * </p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java index 27ff24f..1242265 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java @@ -32,17 +32,17 @@ import org.apache.juneau.xml.*; /** * Parses text generated by the {@link HtmlSerializer} class back into a POJO model. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Content-Type</code> types: <code>text/html</code> * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * See the {@link HtmlSerializer} class for a description of the HTML generated. * <p> * This class is used primarily for automated testing of the {@link HtmlSerializer} class. * - * <h6 class='topic'>Configurable properties</h6> + * <h5 class='section'>Configurable properties:</h5> * <p> * This class has the following properties associated with it: * <ul> @@ -537,20 +537,19 @@ public final class HtmlParser extends XmlParser { @Override /* Parser */ protected <T> T doParse(ParserSession session, ClassMeta<T> type) throws Exception { HtmlParserSession s = (HtmlParserSession)session; - type = s.normalizeClassMeta(type); return parseAnything(s, type, s.getXmlStreamReader(), s.getOuter(), true, null); } @Override /* ReaderParser */ protected <K,V> Map<K,V> doParseIntoMap(ParserSession session, Map<K,V> m, Type keyType, Type valueType) throws Exception { HtmlParserSession s = (HtmlParserSession)session; - return parseIntoMap(s, s.getXmlStreamReader(), m, s.getClassMeta(keyType), s.getClassMeta(valueType), null); + return parseIntoMap(s, s.getXmlStreamReader(), m, (ClassMeta<K>)s.getClassMeta(keyType), (ClassMeta<V>)s.getClassMeta(valueType), null); } @Override /* ReaderParser */ protected <E> Collection<E> doParseIntoCollection(ParserSession session, Collection<E> c, Type elementType) throws Exception { HtmlParserSession s = (HtmlParserSession)session; - return parseIntoCollection(s, s.getXmlStreamReader(), c, s.getClassMeta(elementType), null); + return parseIntoCollection(s, s.getXmlStreamReader(), c, (ClassMeta<E>)s.getClassMeta(elementType), null); } @Override /* ReaderParser */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java index a362bdc..2a1eca6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParserContext.java @@ -38,11 +38,11 @@ import org.apache.juneau.xml.*; * <p> * None. * - * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <h5 class='section'>Inherited configurable properties:</h5> * <ul class='javahierarchy'> - * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='c'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. * <ul> - * <li class='c'><a class='doclink' href='../parser/ParserContext.html#ConfigProperties'>ParserContext</a> - Configurable properties common to all parsers. + * <li class='c'><a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a> - Configurable properties common to all parsers. * </ul> * </ul> */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java index 1c481f5..4d46043 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java @@ -26,13 +26,13 @@ import org.apache.juneau.transform.*; /** * Serializes POJO metamodels to HTML. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html+schema</code> * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Essentially the same as {@link HtmlSerializer}, except serializes the POJO metamodel * instead of the model itself. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java index 8828409..996333b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java @@ -29,13 +29,13 @@ import org.apache.juneau.xml.annotation.*; /** * Serializes POJO models to HTML. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html</code> * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * The conversion is as follows... * <ul class='spaced-list'> @@ -50,7 +50,7 @@ import org.apache.juneau.xml.annotation.*; * <p> * The {@link HtmlLink} annotation can be used on beans to add hyperlinks to the output. * - * <h6 class='topic'>Configurable properties</h6> + * <h5 class='section'>Configurable properties:</h5> * <p> * This class has the following properties associated with it: * <ul class='spaced-list'> @@ -65,7 +65,7 @@ import org.apache.juneau.xml.annotation.*; * <li>{@link SqReadable} - Default serializer, single quotes, whitespace added. * </ul> * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jc>// Use one of the default serializers to serialize a POJO</jc> * String html = HtmlSerializer.<jsf>DEFAULT</jsf>.serialize(someObject); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java index 59be25e..2179a5e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializerContext.java @@ -67,11 +67,11 @@ import org.apache.juneau.xml.*; * </tr> * </table> * - * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <h5 class='section'>Inherited configurable properties:</h5> * <ul class='javahierarchy'> - * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='c'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. * <ul> - * <li class='c'><a class='doclink' href='../serializer/SerializerContext.html#ConfigProperties'>SerializerContext</a> - Configurable properties common to all serializers. + * <li class='c'><a class="doclink" href="../serializer/SerializerContext.html#ConfigProperties">SerializerContext</a> - Configurable properties common to all serializers. * </ul> * </ul> */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java index a1c2495..168b648 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java @@ -21,13 +21,13 @@ import org.apache.juneau.serializer.*; /** * Serializes POJOs to HTTP responses as stripped HTML. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>text/html+stripped</code> * <p> * Produces <code>Content-Type</code> types: <code>text/html</code> * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Produces the same output as {@link HtmlDocSerializer}, but without the header and body tags and page title and description. * Used primarily for JUnit testing the {@link HtmlDocSerializer} class. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java b/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java index acc069c..2ae07f8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/SimpleHtmlWriter.java @@ -17,7 +17,7 @@ import java.io.*; /** * Utility class for creating custom HTML. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * String table = <jk>new</jk> SimpleHtmlWriter().sTag(<js>"table"</js>).sTag(<js>"tr"</js>).sTag(<js>"td"</js>).append(<js>"hello"</js>).eTag(<js>"td"</js>).eTag(<js>"tr"</js>).eTag(<js>"table"</js>).toString(); * </p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java index 7ae2f3e..70006c6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java +++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigFile.java @@ -355,7 +355,7 @@ public abstract class ConfigFile implements Map<String,Section> { * <p> * <js>"M"</js> and <js>"K"</js> can be used to identify millions and thousands. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <ul class='spaced-list'> * <li><code><js>"100K"</js> => 1024000</code> * <li><code><js>"100M"</js> => 104857600</code> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/ini/ConfigMgr.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigMgr.java b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigMgr.java index d65e95f..7188624 100644 --- a/juneau-core/src/main/java/org/apache/juneau/ini/ConfigMgr.java +++ b/juneau-core/src/main/java/org/apache/juneau/ini/ConfigMgr.java @@ -28,7 +28,7 @@ import org.apache.juneau.utils.*; /** * Manager for retrieving shared instances of {@link ConfigFile ConfigFiles}. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * ConfigFile cf = ConfigMgr.<jsf>DEFAULT</jsf>.get(<js>"MyConfig.cfg"</js>); * String setting = cf.get(<js>"MySection/mysetting"</js>); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java index fc063bc..cc4b2a2 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/ClassUtils.java @@ -63,7 +63,7 @@ public final class ClassUtils { /** * Converts the specified class name to a readable form when class name is a special construct like <js>"[[Z"</js>. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * <jsm>getReadableClassName</jsm>(<js>"java.lang.Object"</js>); <jc>// Returns "java.lang.Object"</jc> * <jsm>getReadableClassName</jsm>(<js>"boolean"</js>); <jc>// Returns "boolean"</jc> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/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 01c87a5..b3db4ba 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 @@ -21,8 +21,10 @@ import java.util.*; * <li>Order of insertion maintained. * </ul> * <p> - * Note: This class is NOT thread safe, and is intended for use on small lists. - * + * <h5 class='section'>Notes:</h5> + * <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/30dd3b93/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 87bb07b..b2a1e29 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 @@ -97,10 +97,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#SEVERE} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#SEVERE} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void severe(String msg, Object...args) { if (isLoggable(SEVERE)) @@ -108,10 +108,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#WARNING} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#WARNING} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void warning(String msg, Object...args) { if (isLoggable(WARNING)) @@ -119,10 +119,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#INFO} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#INFO} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void info(String msg, Object...args) { if (isLoggable(INFO)) @@ -130,10 +130,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#CONFIG} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#CONFIG} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void config(String msg, Object...args) { if (isLoggable(CONFIG)) @@ -141,10 +141,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#FINE} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#FINE} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void fine(String msg, Object...args) { if (isLoggable(FINE)) @@ -152,10 +152,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#FINER} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#FINER} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void finer(String msg, Object...args) { if (isLoggable(FINER)) @@ -163,10 +163,10 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#FINEST} level. - * - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#FINEST} level. + * + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void finest(String msg, Object...args) { if (isLoggable(FINEST)) @@ -174,7 +174,7 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs an exception as {@link Level#SEVERE} level. + * Logs an exception as {@link Level#SEVERE} level. * * @param t The Throwable object to log. */ @@ -184,7 +184,7 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs an exception as {@link Level#WARNING} level. + * Logs an exception as {@link Level#WARNING} level. * * @param t The Throwable object to log. */ @@ -194,11 +194,11 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#SEVERE} level. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#SEVERE} level. * * @param t The Throwable object associated with the event that needs to be logged. - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void severe(Throwable t, String msg, Object...args) { if (isLoggable(SEVERE)) @@ -206,11 +206,11 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#WARNING} level. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#WARNING} level. * * @param t The Throwable object associated with the event that needs to be logged. - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void warning(Throwable t, String msg, Object...args) { if (isLoggable(WARNING)) @@ -218,35 +218,35 @@ public class JuneauLogger extends java.util.logging.Logger { } /** - * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#INFO} level. + * Logs a message with the specified {@link MessageFormat}-style arguments at {@link Level#INFO} level. * * @param t The Throwable object associated with the event that needs to be logged. - * @param msg The message to log. - * @param args The {@link MessageFormat}-style arguments. + * @param msg The message to log. + * @param args Optional {@link MessageFormat}-style arguments. */ public void info(Throwable t, String msg, Object...args) { if (isLoggable(INFO)) log(INFO, getMessage(msg, args), t); } - @Override /* Logger */ + @Override /* Logger */ public void log(LogRecord record) { - innerLogger.log(record); - } + innerLogger.log(record); + } - @Override /* Logger */ + @Override /* Logger */ public boolean isLoggable(Level level) { - return innerLogger.isLoggable(level); - } + return innerLogger.isLoggable(level); + } /** - * Similar to {@link #log(Level, String, Object[])}, except arguments are converted to objects - * that are serialized using the {@link JsonSerializer#toStringObject(Object)} method. - * This allows arbitrary POJOs to be serialized as message parameters. + * Similar to {@link #log(Level, String, Object[])}, except arguments are converted to objects + * that are serialized using the {@link JsonSerializer#toStringObject(Object)} method. + * This allows arbitrary POJOs to be serialized as message parameters. * * @param level The level of the given message. - * @param msg The message to log. - * @param args The POJO arguments. + * @param msg The message to log. + * @param args The POJO arguments. */ public void logObjects(Level level, String msg, Object...args) { if (isLoggable(level)) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/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 8fd3928..0831df4 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 @@ -453,7 +453,7 @@ public final class StringUtils { * Splits a character-delimited string into a string array. * Does not split on escaped-delimiters (e.g. "\,"); * Resulting tokens are trimmed of whitespace. - * NOTE: This behavior is different than the Jakarta equivalent. + * <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"} * split("a,,c",',') -> {"a","","c"} @@ -783,7 +783,7 @@ public final class StringUtils { /** * Generated a random UUID with the specified number of characters. * Characters are composed of lower-case ASCII letters and numbers only. - * This method conforms to the restrictions for hostnames as specified in <a href='https://tools.ietf.org/html/rfc952'>RFC 952</a> + * 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 that would produce a 50% chance of collision is: * <code>sqrt(36^N)</code>. @@ -918,7 +918,7 @@ public final class StringUtils { /** * Returns <jk>true</jk> if the specified path string is prefixed with the specified prefix. * - * <h6 class='topic'>Example:</h6> + * <h5 class='section'>Example:</h5> * <p class='bcode'> * pathStartsWith(<js>"foo"</js>, <js>"foo"</js>); <jc>// true</jc> * pathStartsWith(<js>"foo/bar"</js>, <js>"foo"</js>); <jc>// true</jc> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/internal/ThrowableUtils.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/ThrowableUtils.java b/juneau-core/src/main/java/org/apache/juneau/internal/ThrowableUtils.java index 4f87f22..84d6f19 100644 --- a/juneau-core/src/main/java/org/apache/juneau/internal/ThrowableUtils.java +++ b/juneau-core/src/main/java/org/apache/juneau/internal/ThrowableUtils.java @@ -24,7 +24,7 @@ public class ThrowableUtils { * * @param o The object to check. * @param msg The message of the IllegalArgumentException. - * @param args {@link MessageFormat}-style arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. * @throws IllegalArgumentException */ public static void assertNotNull(Object o, String msg, Object...args) throws IllegalArgumentException { @@ -60,7 +60,7 @@ public class ThrowableUtils { * Shortcut for calling <code><jk>new</jk> IllegalArgumentException(MessageFormat.<jsm>format</jsm>(msg, args));</code> * * @param msg The message of the IllegalArgumentException. - * @param args {@link MessageFormat}-style arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. * @throws IllegalArgumentException */ public static void illegalArg(String msg, Object...args) throws IllegalArgumentException { @@ -72,7 +72,7 @@ public class ThrowableUtils { * * @param threadId The ID of the thread to compare against. * @param msg The message of the IllegalStateException. - * @param args {@link IllegalStateException}-style arguments in the message. + * @param args Optional {@link MessageFormat}-style arguments. * @throws IllegalStateException */ public static void assertSameThread(long threadId, String msg, Object...args) throws IllegalStateException { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectParser.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectParser.java b/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectParser.java index 665d0ab..88cc42b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectParser.java +++ b/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectParser.java @@ -21,7 +21,7 @@ import org.apache.juneau.parser.*; /** * Parses POJOs from HTTP responses as Java {@link ObjectInputStream ObjectInputStreams}. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Consumes <code>Content-Type</code> types: <code>application/x-java-serialized-object</code> */ http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectSerializer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectSerializer.java b/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectSerializer.java index 02716b4..1e1e8e8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectSerializer.java +++ b/juneau-core/src/main/java/org/apache/juneau/jso/JavaSerializedObjectSerializer.java @@ -20,7 +20,7 @@ import org.apache.juneau.serializer.*; /** * Serializes POJOs to HTTP responses as Java {@link ObjectOutputStream ObjectOutputStreams}. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Accept</code> types: <code>application/x-java-serialized-object</code> * <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/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 da204bc..0086a78 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 @@ -28,11 +28,11 @@ import org.apache.juneau.transform.*; /** * Parses any valid JSON text into a POJO model. * - * <h6 class='topic'>Media types</h6> + * <h5 class='section'>Media types:</h5> * <p> * Handles <code>Content-Type</code> types: <code>application/json, text/json</code> * - * <h6 class='topic'>Description</h6> + * <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. @@ -50,7 +50,7 @@ import org.apache.juneau.transform.*; * This parser handles the following input, and automatically returns the corresponding Java class. * <ul class='spaced-list'> * <li> JSON objects (<js>"{...}"</js>) are converted to {@link ObjectMap ObjectMaps}. <br> - * Note: If a <code><xa>_type</xa>=<xs>'xxx'</xs></code> attribute is specified on the object, then an attempt is made to convert the object + * <b>Note:</b> If a <code><xa>_type</xa>=<xs>'xxx'</xs></code> attribute is specified on the object, then an attempt is made to convert the object * to an instance of the specified Java bean class. See the classProperty setting on the {@link ContextFactory} for more information * about parsing beans from JSON. * <li> JSON arrays (<js>"[...]"</js>) are converted to {@link ObjectList ObjectLists}. @@ -77,7 +77,7 @@ import org.apache.juneau.transform.*; * 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) ObjectList(CharSequence)} constructors instead of using this class. The end result should be the same. * - * <h6 class='topic'>Configurable properties</h6> + * <h5 class='section'>Configurable properties:</h5> * <p> * This class has the following properties associated with it: * <ul> @@ -786,7 +786,6 @@ public final class JsonParser extends ReaderParser { @Override /* Parser */ protected <T> T doParse(ParserSession session, ClassMeta<T> type) throws Exception { JsonParserSession s = (JsonParserSession)session; - type = s.normalizeClassMeta(type); ParserReader r = s.getReader(); if (r == null) return null; @@ -799,7 +798,7 @@ public final class JsonParser extends ReaderParser { protected <K,V> Map<K,V> doParseIntoMap(ParserSession session, Map<K,V> m, Type keyType, Type valueType) throws Exception { JsonParserSession s = (JsonParserSession)session; ParserReader r = s.getReader(); - m = parseIntoMap2(s, r, m, s.getClassMeta(keyType), s.getClassMeta(valueType), null); + m = parseIntoMap2(s, r, m, (ClassMeta<K>)s.getClassMeta(keyType), (ClassMeta<V>)s.getClassMeta(valueType), null); validateEnd(s, r); return m; } @@ -808,7 +807,7 @@ public final class JsonParser extends ReaderParser { protected <E> Collection<E> doParseIntoCollection(ParserSession session, Collection<E> c, Type elementType) throws Exception { JsonParserSession s = (JsonParserSession)session; ParserReader r = s.getReader(); - c = parseIntoCollection2(s, r, c, s.getClassMeta(elementType), null); + c = parseIntoCollection2(s, r, c, (ClassMeta<E>)s.getClassMeta(elementType), null); validateEnd(s, r); return c; } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/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 f397af9..360a743 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 @@ -36,13 +36,13 @@ import org.apache.juneau.parser.*; * * <h6 class='topic' id='ConfigProperties'>Configurable properties on the JSON parser</h6> * <p> - * None. + * None. * - * <h6 class='topic'>Configurable properties inherited from parent classes</h6> + * <h5 class='section'>Inherited configurable properties:</h5> * <ul class='javahierarchy'> - * <li class='c'><a class='doclink' href='../BeanContext.html#ConfigProperties'>BeanContext</a> - Properties associated with handling beans on serializers and parsers. + * <li class='c'><a class="doclink" href="../BeanContext.html#ConfigProperties">BeanContext</a> - Properties associated with handling beans on serializers and parsers. * <ul> - * <li class='c'><a class='doclink' href='../parser/ParserContext.html#ConfigProperties'>ParserContext</a> - Configurable properties common to all parsers. + * <li class='c'><a class="doclink" href="../parser/ParserContext.html#ConfigProperties">ParserContext</a> - Configurable properties common to all parsers. * </ul> * </ul> */ @@ -63,6 +63,6 @@ public final class JsonParserContext extends ParserContext { public ObjectMap asMap() { return super.asMap() .append("JsonParserContext", new ObjectMap() - ); + ); } } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/30dd3b93/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 4b2b6d1..8826b29 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 @@ -25,13 +25,13 @@ import org.apache.juneau.transform.*; /** * Serializes POJO metadata to HTTP responses as JSON. * - * <h6 class='topic'>Media types</h6> + * <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> * - * <h6 class='topic'>Description</h6> + * <h5 class='section'>Description:</h5> * <p> * Produces the JSON-schema for the JSON produced by the {@link JsonSerializer} class with the same properties. */
