You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/02/09 17:31:32 UTC
[10/14] incubator-juneau git commit: Add convenience property setters
to serializers and parsers.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/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 1094632..1bb1979 100644
--- a/juneau-core/src/main/java/org/apache/juneau/CoreApi.java
+++ b/juneau-core/src/main/java/org/apache/juneau/CoreApi.java
@@ -12,6 +12,19 @@
// ***************************************************************************************************************************
package org.apache.juneau;
+import static org.apache.juneau.BeanContext.*;
+
+import java.beans.*;
+import java.io.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.apache.juneau.Visibility;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+
/**
* Common super class for all core-API serializers, parsers, and serializer/parser groups.
*
@@ -35,11 +48,12 @@ public abstract class CoreApi extends Lockable {
* The context factory stores all configuration properties for this class.
* Adding/modifying properties on this factory will alter the behavior of this object.
* <p>
- * Calling the {@link ContextFactory#lock()} method on the returned object will prevent
- * any further modifications to the configuration for this object
- * ANY ANY OTHERS THAT SHARE THE SAME FACTORY!.
- * Note that calling the {@link #lock()} method on this class will only
- * lock the configuration for this particular instance of the class.
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>Calling the {@link ContextFactory#lock()} method on the returned object will prevent any further modifications to the configuration for this object
+ * ANY ANY OTHERS THAT SHARE THE SAME FACTORY!.
+ * <li>Calling the {@link #lock()} method on this class will only lock the configuration for this particular instance of the class.
+ * </ul>
*
* @return The context factory associated with this object.
*/
@@ -60,6 +74,12 @@ public abstract class CoreApi extends Lockable {
/**
* Creates a {@link Context} class instance of the specified type.
+ * <p>
+ * For example, to create an <code>HtmlSerializerContext</code> object that contains a read-only snapshot
+ * of all the current settings in this object...
+ * <p class='bcode'>
+ * HtmlSerializerContext ctx = htmlParser.getContext(HtmlDocSerializerContext.<jk>class</jk>);
+ * </p>
*
* @param contextClass The class instance to create.
* @return A context class instance of the specified type.
@@ -69,22 +89,32 @@ public abstract class CoreApi extends Lockable {
}
/**
- * Shortcut for calling <code>getContextFactory().setProperty(<jf>property</jf>, <jf>value</jf>);</code>.
+ * Sets a configuration property on this object.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getContextFactory().setProperty(name, value);</code>.
+ * </ul>
*
- * @param property The property name.
+ * @param name The property name.
* @param value The property value.
* @return This class (for method chaining).
* @throws LockedException If {@link #lock()} has been called on this object or {@link ContextFactory} object.
* @see ContextFactory#setProperty(String, Object)
*/
- public CoreApi setProperty(String property, Object value) throws LockedException {
+ public CoreApi setProperty(String name, Object value) throws LockedException {
checkLock();
- contextFactory.setProperty(property, value);
+ contextFactory.setProperty(name, value);
return this;
}
/**
- * Shortcut for calling <code>getContextFactory().setProperties(<jf>properties</jf>);</code>.
+ * Sets multiple configuration properties on this object.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getContextFactory().setProperties(properties);</code>.
+ * </ul>
*
* @param properties The properties to set on this class.
* @return This class (for method chaining).
@@ -98,113 +128,1394 @@ public abstract class CoreApi extends Lockable {
}
/**
- * Shortcut for calling <code>getContextFactory().addNotBeanClasses(<jf>classes</jf>)</code>.
+ * Adds a value to a SET property.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getContextFactory().addToProperty(name, value);</code>.
+ * </ul>
*
- * @see ContextFactory#addToProperty(String,Object)
- * @param classes The new setting value for the bean context.
- * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
+ * @param name The property name.
+ * @param value The new value to add to the SET property.
* @return This object (for method chaining).
- * @see ContextFactory#addToProperty(String, Object)
- * @see BeanContext#BEAN_notBeanClasses
+ * @throws ConfigException If property is not a SET property.
+ * @throws LockedException If {@link #lock()} has been called on this object.
*/
- public CoreApi addNotBeanClasses(Class<?>...classes) throws LockedException {
+ public CoreApi addToProperty(String name, Object value) throws LockedException {
checkLock();
- contextFactory.addNotBeanClasses(classes);
+ contextFactory.addToProperty(name, value);
return this;
}
/**
- * Shortcut for calling <code>getContextFactory().addBeanFilters(<jf>classes</jf>)</code>.
+ * Adds or overwrites a value to a MAP property.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getContextFactory().putToProperty(name, key, value);</code>.
+ * </ul>
*
- * @param classes The new setting value for the bean context.
- * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
+ * @param name The property name.
+ * @param key The property value map key.
+ * @param value The property value map value.
* @return This object (for method chaining).
- * @see ContextFactory#addToProperty(String, Object)
- * @see BeanContext#BEAN_beanFilters
+ * @throws ConfigException If property is not a MAP property.
+ * @throws LockedException If {@link #lock()} has been called on this object.
*/
- public CoreApi addBeanFilters(Class<?>...classes) throws LockedException {
+ public CoreApi putToProperty(String name, Object key, Object value) throws LockedException {
checkLock();
- contextFactory.addBeanFilters(classes);
+ contextFactory.putToProperty(name, key, value);
return this;
}
/**
- * Shortcut for calling <code>getContextFactory().addPojoSwaps(<jf>classes</jf>)</code>.
+ * Adds or overwrites a value to a MAP property.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getContextFactory().putToProperty(name, value);</code>.
+ * </ul>
*
- * @param classes The new setting value for the bean context.
- * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
+ * @param name The property value.
+ * @param value The property value map value.
* @return This object (for method chaining).
- * @see ContextFactory#addToProperty(String, Object)
- * @see BeanContext#BEAN_pojoSwaps
+ * @throws ConfigException If property is not a MAP property.
+ * @throws LockedException If {@link #lock()} has been called on this object.
*/
- public CoreApi addPojoSwaps(Class<?>...classes) throws LockedException {
+ public CoreApi putToProperty(String name, Object value) throws LockedException {
checkLock();
- contextFactory.addPojoSwaps(classes);
+ contextFactory.putToProperty(name, value);
return this;
}
/**
- * Shortcut for calling <code>getContextFactory().addToDictionary(<jf>classes</jf>)</code>.
+ * Removes a value from a SET property.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getContextFactory().removeFromProperty(name, value);</code>.
+ * </ul>
*
- * @param classes The bean classes (or BeanDictionaryBuilder) classes to add to the bean dictionary.
- * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
+ * @param name The property name.
+ * @param value The property value in the SET property.
* @return This object (for method chaining).
- * @see ContextFactory#addToProperty(String, Object)
- * @see BeanContext#BEAN_beanDictionary
+ * @throws ConfigException If property is not a SET property.
+ * @throws LockedException If {@link #lock()} has been called on this object.
*/
- public CoreApi addToDictionary(Class<?>...classes) throws LockedException {
+ public CoreApi removeFromProperty(String name, Object value) throws LockedException {
checkLock();
- contextFactory.addToDictionary(classes);
+ contextFactory.removeFromProperty(name, value);
return this;
}
/**
- * Shortcut for calling <code>getContextFactory().addImplClass(<jf>interfaceClass</jf>, <jf>implClass</jf>)</code>.
+ * Returns the universal <code>Object</code> metadata object.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getBeanContext().object();</code>.
+ * </ul>
*
- * @param interfaceClass The interface class.
- * @param implClass The implementation class.
- * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
- * @param <T> The class type of the interface.
+ * @return The reusable {@link ClassMeta} for representing the {@link Object} class.
+ */
+ public ClassMeta<Object> object() {
+ return getBeanContext().object();
+ }
+
+ /**
+ * Returns the universal <code>String</code> metadata object.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>getBeanContext().string();</code>.
+ * </ul>
+ *
+ * @return The reusable {@link ClassMeta} for representing the {@link String} class.
+ */
+ public ClassMeta<String> string() {
+ return getBeanContext().string();
+ }
+
+
+ //--------------------------------------------------------------------------------
+ // Properties
+ //--------------------------------------------------------------------------------
+
+ /**
+ * <b>Configuration property:</b> Beans require no-arg constructors.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beansRequireDefaultConstructor"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, a Java class must implement a default no-arg constructor to be considered a bean.
+ * Otherwise, the bean will be serialized as a string using the {@link #toString()} method.
+ * <p>
+ * The {@link Bean @Bean} annotation can be used on a class to override this setting when <jk>true</jk>.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beansRequireDefaultConstructor</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
* @return This object (for method chaining).
- * @see ContextFactory#putToProperty(String, Object, Object)
- * @see BeanContext#BEAN_implClasses
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beansRequireDefaultConstructor
*/
- public <T> CoreApi addImplClass(Class<T> interfaceClass, Class<? extends T> implClass) throws LockedException {
- checkLock();
- contextFactory.addImplClass(interfaceClass, implClass);
- return this;
+ public CoreApi setBeansRequireDefaultConstructor(boolean value) throws LockedException {
+ return setProperty(BEAN_beansRequireDefaultConstructor, value);
}
/**
- * Shortcut for calling <code>getContextFactory().setClassLoader(<jf>classLoader</jf>)</code>.
+ * <b>Configuration property:</b> Beans require {@link Serializable} interface.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beansRequireSerializable"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, a Java class must implement the {@link Serializable} interface to be considered a bean.
+ * Otherwise, the bean will be serialized as a string using the {@link #toString()} method.
+ * <p>
+ * The {@link Bean @Bean} annotation can be used on a class to override this setting when <jk>true</jk>.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beansRequireSerializable</jsf>, value)</code>.
+ * </ul>
*
- * @param classLoader The new classloader.
- * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
+ * @param value The new value for this property.
* @return This object (for method chaining).
- * @see ContextFactory#setClassLoader(ClassLoader)
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beansRequireSerializable
*/
- public CoreApi setClassLoader(ClassLoader classLoader) throws LockedException {
- checkLock();
- contextFactory.setClassLoader(classLoader);
- return this;
+ public CoreApi setBeansRequireSerializable(boolean value) throws LockedException {
+ return setProperty(BEAN_beansRequireSerializable, value);
}
/**
- * Shortcut for calling {@link BeanContext#object()}.
+ * <b>Configuration property:</b> Beans require setters for getters.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beansRequireSettersForGetters"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, only getters that have equivalent setters will be considered as properties on a bean.
+ * Otherwise, they will be ignored.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beansRequireSettersForGetters</jsf>, value)</code>.
+ * </ul>
*
- * @return The reusable {@link ClassMeta} for representing the {@link Object} class.
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beansRequireSettersForGetters
*/
- public ClassMeta<Object> object() {
- return getBeanContext().object();
+ public CoreApi setBeansRequireSettersForGetters(boolean value) throws LockedException {
+ return setProperty(BEAN_beansRequireSettersForGetters, value);
}
/**
- * Shortcut for calling {@link BeanContext#string()}.
+ * <b>Configuration property:</b> Beans require at least one property.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beansRequireSomeProperties"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>true</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, then a Java class must contain at least 1 property to be considered a bean.
+ * Otherwise, the bean will be serialized as a string using the {@link #toString()} method.
+ * <p>
+ * The {@link Bean @Bean} annotation can be used on a class to override this setting when <jk>true</jk>.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beansRequireSomeProperties</jsf>, value)</code>.
+ * </ul>
*
- * @return The reusable {@link ClassMeta} for representing the {@link String} class.
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beansRequireSomeProperties
*/
- public ClassMeta<String> string() {
- return getBeanContext().string();
+ public CoreApi setBeansRequireSomeProperties(boolean value) throws LockedException {
+ return setProperty(BEAN_beansRequireSomeProperties, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property value.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanMapPutReturnsOldValue"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, then the {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property values.
+ * Otherwise, it returns <jk>null</jk>.
+ * <p>
+ * Disabled by default because it introduces a slight performance penalty.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanMapPutReturnsOldValue</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanMapPutReturnsOldValue
+ */
+ public CoreApi setBeanMapPutReturnsOldValue(boolean value) throws LockedException {
+ return setProperty(BEAN_beanMapPutReturnsOldValue, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Look for bean constructors with the specified minimum visibility.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanConstructorVisibility"</js>
+ * <li><b>Data type:</b> {@link Visibility}
+ * <li><b>Default:</b> {@link Visibility#PUBLIC}
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Constructors not meeting this minimum visibility will be ignored.
+ * For example, if the visibility is <code>PUBLIC</code> and the constructor is <jk>protected</jk>, then
+ * the constructor will be ignored.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanConstructorVisibility</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanConstructorVisibility
+ */
+ public CoreApi setBeanConstructorVisibility(Visibility value) throws LockedException {
+ return setProperty(BEAN_beanConstructorVisibility, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Look for bean classes with the specified minimum visibility.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanClassVisibility"</js>
+ * <li><b>Data type:</b> {@link Visibility}
+ * <li><b>Default:</b> {@link Visibility#PUBLIC}
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Classes are not considered beans unless they meet the minimum visibility requirements.
+ * For example, if the visibility is <code>PUBLIC</code> and the bean class is <jk>protected</jk>, then
+ * the class will not be interpreted as a bean class.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanClassVisibility</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanClassVisibility
+ */
+ public CoreApi setBeanClassVisibility(Visibility value) throws LockedException {
+ return setProperty(BEAN_beanClassVisibility, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Look for bean fields with the specified minimum visibility.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanFieldVisibility"</js>
+ * <li><b>Data type:</b> {@link Visibility}
+ * <li><b>Default:</b> {@link Visibility#PUBLIC}
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Fields are not considered bean properties unless they meet the minimum visibility requirements.
+ * For example, if the visibility is <code>PUBLIC</code> and the bean field is <jk>protected</jk>, then
+ * the field will not be interpreted as a bean property.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanFieldVisibility</jsf>, value)</code>.
+ * <li>Use {@link Visibility#NONE} to prevent bean fields from being interpreted as bean properties altogether.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFieldVisibility
+ */
+ public CoreApi setBeanFieldVisibility(Visibility value) throws LockedException {
+ return setProperty(BEAN_beanFieldVisibility, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Look for bean methods with the specified minimum visibility.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.methodVisibility"</js>
+ * <li><b>Data type:</b> {@link Visibility}
+ * <li><b>Default:</b> {@link Visibility#PUBLIC}
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Methods are not considered bean getters/setters unless they meet the minimum visibility requirements.
+ * For example, if the visibility is <code>PUBLIC</code> and the bean method is <jk>protected</jk>, then
+ * the method will not be interpreted as a bean getter or setter.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_methodVisibility</jsf>, value)</code>.
+ * <li>Use {@link Visibility#NONE} to prevent bean methods from being interpreted as bean properties altogether.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_methodVisibility
+ */
+ public CoreApi setMethodVisibility(Visibility value) throws LockedException {
+ return setProperty(BEAN_methodVisibility, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Use Java {@link Introspector} for determining bean properties.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.useJavaBeanIntrospector"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_useJavaBeanIntrospector</jsf>, value)</code>.
+ * <li>Most {@link Bean @Bean} annotations will be ignored if you enable this setting.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_useJavaBeanIntrospector
+ */
+ public CoreApi setUseJavaBeanIntrospector(boolean value) throws LockedException {
+ return setProperty(BEAN_useJavaBeanIntrospector, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Use interface proxies.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.useInterfaceProxies"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>true</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, then interfaces will be instantiated as proxy classes through the use of an {@link InvocationHandler}
+ * if there is no other way of instantiating them.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_useInterfaceProxies</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_useInterfaceProxies
+ */
+ public CoreApi setUseInterfaceProxies(boolean value) throws LockedException {
+ return setProperty(BEAN_useInterfaceProxies, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Ignore unknown properties.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.ignoreUnknownBeanProperties"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, trying to set a value on a non-existent bean property will silently be ignored.
+ * Otherwise, a {@code BeanRuntimeException} is thrown.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_ignoreUnknownBeanProperties</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_ignoreUnknownBeanProperties
+ */
+ public CoreApi setIgnoreUnknownBeanProperties(boolean value) throws LockedException {
+ return setProperty(BEAN_ignoreUnknownBeanProperties, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Ignore unknown properties with null values.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.ignoreUnknownNullBeanProperties"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>true</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, trying to set a <jk>null</jk> value on a non-existent bean property will silently be ignored.
+ * Otherwise, a {@code BeanRuntimeException} is thrown.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_ignoreUnknownNullBeanProperties</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_ignoreUnknownNullBeanProperties
+ */
+ public CoreApi setIgnoreUnknownNullBeanProperties(boolean value) throws LockedException {
+ return setProperty(BEAN_ignoreUnknownNullBeanProperties, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Ignore properties without setters.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.ignorePropertiesWithoutSetters"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>true</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, trying to set a value on a bean property without a setter will silently be ignored.
+ * Otherwise, a {@code BeanRuntimeException} is thrown.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_ignorePropertiesWithoutSetters</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_ignorePropertiesWithoutSetters
+ */
+ public CoreApi setIgnorePropertiesWithoutSetters(boolean value) throws LockedException {
+ return setProperty(BEAN_ignorePropertiesWithoutSetters, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Ignore invocation errors on getters.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnGetters"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, errors thrown when calling bean getter methods will silently be ignored.
+ * Otherwise, a {@code BeanRuntimeException} is thrown.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_ignoreInvocationExceptionsOnGetters</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_ignoreInvocationExceptionsOnGetters
+ */
+ public CoreApi setIgnoreInvocationExceptionsOnGetters(boolean value) throws LockedException {
+ return setProperty(BEAN_ignoreInvocationExceptionsOnGetters, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Ignore invocation errors on setters.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.ignoreInvocationExceptionsOnSetters"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * If <jk>true</jk>, errors thrown when calling bean setter methods will silently be ignored.
+ * Otherwise, a {@code BeanRuntimeException} is thrown.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_ignoreInvocationExceptionsOnSetters</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_ignoreInvocationExceptionsOnSetters
+ */
+ public CoreApi setIgnoreInvocationExceptionsOnSetters(boolean value) throws LockedException {
+ return setProperty(BEAN_ignoreInvocationExceptionsOnSetters, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Sort bean properties in alphabetical order.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.sortProperties"</js>
+ * <li><b>Data type:</b> <code>Boolean</code>
+ * <li><b>Default:</b> <jk>false</jk>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * When <jk>true</jk>, all bean properties will be serialized and access in alphabetical order.
+ * Otherwise, the natural order of the bean properties is used which is dependent on the
+ * JVM vendor.
+ * On IBM JVMs, the bean properties are ordered based on their ordering in the Java file.
+ * On Oracle JVMs, the bean properties are not ordered (which follows the offical JVM specs).
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_sortProperties</jsf>, value)</code>.
+ * <li>This property is disabled by default so that IBM JVM users don't have to use {@link Bean @Bean} annotations
+ * to force bean properties to be in a particular order and can just alter the order of the fields/methods
+ * in the Java file.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_sortProperties
+ */
+ public CoreApi setSortProperties(boolean value) throws LockedException {
+ return setProperty(BEAN_sortProperties, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Packages whose classes should not be considered beans.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.notBeanPackages.set"</js>
+ * <li><b>Data type:</b> <code>Set<String></code>
+ * <li><b>Default:</b>
+ * <ul>
+ * <li><code>java.lang</code>
+ * <li><code>java.lang.annotation</code>
+ * <li><code>java.lang.ref</code>
+ * <li><code>java.lang.reflect</code>
+ * <li><code>java.io</code>
+ * <li><code>java.net</code>
+ * <li><code>java.nio.*</code>
+ * <li><code>java.util.*</code>
+ * </ul>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * When specified, the current list of ignore packages are appended to.
+ * <p>
+ * Any classes within these packages will be serialized to strings using {@link Object#toString()}.
+ * <p>
+ * Note that you can specify prefix patterns to include all subpackages.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_notBeanPackages</jsf>, values)</code>.
+ * </ul>
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages
+ */
+ public CoreApi setNotBeanPackages(String...values) throws LockedException {
+ return setProperty(BEAN_notBeanPackages, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Packages whose classes should not be considered beans.
+ * <p>
+ * Same as {@link #setNotBeanPackages(String...)} but using a <code>Collection</code>.
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages
+ */
+ public CoreApi setNotBeanPackages(Collection<String> values) throws LockedException {
+ return setProperty(BEAN_notBeanPackages, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to packages whose classes should not be considered beans.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>addToProperty(<jsf>BEAN_notBeanPackages</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_notBeanPackages_add</jsf>, s)</code>.
+ * </ul>
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages_add
+ */
+ public CoreApi addNotBeanPackages(String...values) throws LockedException {
+ return addToProperty(BEAN_notBeanPackages, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to packages whose classes should not be considered beans.
+ * <p>
+ * Same as {@link #addNotBeanPackages(String...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages
+ */
+ public CoreApi addNotBeanPackages(Collection<String> values) throws LockedException {
+ return addToProperty(BEAN_notBeanPackages, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from packages whose classes should not be considered beans.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>removeFromProperty(<jsf>BEAN_notBeanPackages</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_notBeanPackages_remove</jsf>, s)</code>.
+ * </ul>
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages
+ * @see BeanContext#BEAN_notBeanPackages_remove
+ */
+ public CoreApi removeNotBeanPackages(String...values) throws LockedException {
+ return removeFromProperty(BEAN_notBeanPackages, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from packages whose classes should not be considered beans.
+ * <p>
+ * Same as {@link #removeNotBeanPackages(String...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages
+ * @see BeanContext#BEAN_notBeanPackages_remove
+ */
+ public CoreApi removeNotBeanPackages(Collection<String> values) throws LockedException {
+ return removeFromProperty(BEAN_notBeanPackages, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Classes to be excluded from consideration as being beans.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.notBeanClasses.set"</js>
+ * <li><b>Data type:</b> <code>Set<Class></code>
+ * <li><b>Default:</b> empty set
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Not-bean classes are typically converted to <code>Strings</code> during serialization even if they
+ * appear to be bean-like.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_notBeanClasses</jsf>, values)</code>.
+ * </ul>
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanClasses
+ */
+ public CoreApi setNotBeanClasses(Class<?>...values) throws LockedException {
+ return setProperty(BEAN_notBeanClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Classes to be excluded from consideration as being beans.
+ * <p>
+ * Same as {@link #setNotBeanClasses(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanPackages
+ */
+ public CoreApi setNotBeanClasses(Collection<Class<?>> values) throws LockedException {
+ return setProperty(BEAN_notBeanClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to classes that should not be considered beans.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>addToProperty(<jsf>BEAN_notBeanClasses</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_notBeanClasses_add</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanClasses
+ * @see BeanContext#BEAN_notBeanClasses_add
+ */
+ public CoreApi addNotBeanClasses(Class<?>...values) throws LockedException {
+ return addToProperty(BEAN_notBeanClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to classes that should not be considered beans.
+ * <p>
+ * Same as {@link #addNotBeanClasses(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanClasses
+ * @see BeanContext#BEAN_notBeanClasses_add
+ */
+ public CoreApi addNotBeanClasses(Collection<Class<?>> values) throws LockedException {
+ return addToProperty(BEAN_notBeanClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from classes that should not be considered beans.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>removeFromProperty(<jsf>BEAN_notBeanClasses</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_notBeanClasses_remove</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanClasses
+ * @see BeanContext#BEAN_notBeanClasses_remove
+ */
+ public CoreApi removeNotBeanClasses(Class<?>...values) throws LockedException {
+ return removeFromProperty(BEAN_notBeanClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from classes that should not be considered beans.
+ * <p>
+ * Same as {@link #removeNotBeanClasses(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_notBeanClasses
+ * @see BeanContext#BEAN_notBeanClasses_remove
+ */
+ public CoreApi removeNotBeanClasses(Collection<Class<?>> values) throws LockedException {
+ return removeFromProperty(BEAN_notBeanClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Bean filters to apply to beans.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanFilters.list"</js>
+ * <li><b>Data type:</b> <code>List<Class></code>
+ * <li><b>Default:</b> empty list
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * This is a programmatic equivalent to the {@link Bean @Bean} annotation.
+ * It's useful when you want to use the Bean annotation functionality, but you don't have the ability
+ * to alter the bean classes.
+ * <p>
+ * There are two category of classes that can be passed in through this method:
+ * <ul class='spaced-list'>
+ * <li>Subclasses of {@link BeanFilterBuilder}.
+ * These must have a public no-arg constructor.
+ * <li>Bean interface classes.
+ * A shortcut for defining a {@link InterfaceBeanFilterBuilder}.
+ * Any subclasses of an interface class will only have properties defined on the interface.
+ * All other bean properties will be ignored.
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanFilters</jsf>, values)</code>.
+ * </ul>
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFilters
+ */
+ public CoreApi setBeanFilters(Class<?>...values) throws LockedException {
+ return setProperty(BEAN_beanFilters, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Bean filters to apply to beans.
+ * <p>
+ * Same as {@link #setBeanFilters(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFilters
+ */
+ public CoreApi setBeanFilters(Collection<Class<?>> values) throws LockedException {
+ return setProperty(BEAN_beanFilters, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to bean filters.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>addToProperty(<jsf>BEAN_beanFilters</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_beanFilters_add</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFilters
+ * @see BeanContext#BEAN_beanFilters_add
+ */
+ public CoreApi addBeanFilters(Class<?>...values) throws LockedException {
+ return addToProperty(BEAN_beanFilters, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to bean filters.
+ * <p>
+ * Same as {@link #addBeanFilters(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFilters
+ * @see BeanContext#BEAN_beanFilters_add
+ */
+ public CoreApi addBeanFilters(Collection<Class<?>> values) throws LockedException {
+ return addToProperty(BEAN_beanFilters, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from bean filters.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>removeFromProperty(<jsf>BEAN_beanFilters</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_beanFilters_remove</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFilters
+ * @see BeanContext#BEAN_beanFilters_remove
+ */
+ public CoreApi removeBeanFilters(Class<?>...values) throws LockedException {
+ return removeFromProperty(BEAN_beanFilters, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from bean filters.
+ * <p>
+ * Same as {@link #removeBeanFilters(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanFilters
+ * @see BeanContext#BEAN_beanFilters_remove
+ */
+ public CoreApi removeBeanFilters(Collection<Class<?>> values) throws LockedException {
+ return removeFromProperty(BEAN_beanFilters, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> POJO swaps to apply to Java objects.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.pojoSwaps.list"</js>
+ * <li><b>Data type:</b> <code>List<Class></code>
+ * <li><b>Default:</b> empty list
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * There are two category of classes that can be passed in through this method:
+ * <ul>
+ * <li>Subclasses of {@link PojoSwap}.
+ * <li>Surrogate classes. A shortcut for defining a {@link SurrogateSwap}.
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_pojoSwaps</jsf>, values)</code>.
+ * </ul>
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_pojoSwaps
+ */
+ public CoreApi setPojoSwaps(Class<?>...values) throws LockedException {
+ return setProperty(BEAN_pojoSwaps, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> POJO swaps to apply to Java objects.
+ * <p>
+ * Same as {@link #setPojoSwaps(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_pojoSwaps
+ */
+ public CoreApi setPojoSwaps(Collection<Class<?>> values) throws LockedException {
+ return setProperty(BEAN_pojoSwaps, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to POJO swaps.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>addToProperty(<jsf>BEAN_pojoSwaps</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_pojoSwaps_add</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_pojoSwaps
+ * @see BeanContext#BEAN_pojoSwaps_add
+ */
+ public CoreApi addPojoSwaps(Class<?>...values) throws LockedException {
+ return addToProperty(BEAN_pojoSwaps, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to POJO swaps.
+ * <p>
+ * Same as {@link #addPojoSwaps(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_pojoSwaps
+ * @see BeanContext#BEAN_pojoSwaps_add
+ */
+ public CoreApi addPojoSwaps(Collection<Class<?>> values) throws LockedException {
+ return addToProperty(BEAN_pojoSwaps, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from POJO swaps.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>removeFromProperty(<jsf>BEAN_pojoSwaps</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_pojoSwaps_remove</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_pojoSwaps
+ * @see BeanContext#BEAN_pojoSwaps_remove
+ */
+ public CoreApi removePojoSwaps(Class<?>...values) throws LockedException {
+ return removeFromProperty(BEAN_pojoSwaps, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from POJO swaps.
+ * <p>
+ * Same as {@link #removePojoSwaps(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_pojoSwaps
+ * @see BeanContext#BEAN_pojoSwaps_remove
+ */
+ public CoreApi removePojoSwaps(Collection<Class<?>> values) throws LockedException {
+ return removeFromProperty(BEAN_pojoSwaps, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Implementation classes for interfaces and abstract classes.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.implClasses.map"</js>
+ * <li><b>Data type:</b> <code>Map<Class,Class></code>
+ * <li><b>Default:</b> empty map
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * For interfaces and abstract classes this method can be used to specify an implementation
+ * class for the interface/abstract class so that instances of the implementation
+ * class are used when instantiated (e.g. during a parse).
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_implClasses</jsf>, values)</code>.
+ * </ul>
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_implClasses
+ */
+ public CoreApi setImplClasses(Map<Class<?>,Class<?>> values) throws LockedException {
+ return setProperty(BEAN_implClasses, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Implementation classes for interfaces and abstract classes.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>putToProperty(<jsf>BEAN_implClasses</jsf>, interfaceClass, implClass)</code>
+ * or <code>setProperty(<jsf>BEAN_implClasses_put</jsf>, interfaceClass, implClass)</code>.
+ * </ul>
+ *
+ * @param interfaceClass The interface class.
+ * @param implClass The implementation class.
+ * @param <T> The class type of the interface.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_implClasses
+ * @see BeanContext#BEAN_implClasses_put
+ */
+ public <T> CoreApi addImplClass(Class<T> interfaceClass, Class<? extends T> implClass) throws LockedException {
+ return putToProperty(BEAN_implClasses, interfaceClass, implClass);
+ }
+
+ /**
+ * <b>Configuration property:</b> Bean lookup dictionary.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanDictionary.list"</js>
+ * <li><b>Data type:</b> <code>List<Class></code>
+ * <li><b>Default:</b> empty list
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * This list can consist of the following class types:
+ * <ul>
+ * <li>Any bean class that specifies a value for {@link Bean#typeName() @Bean.typeName()}.
+ * <li>Any subclass of {@link BeanDictionaryList} containing a collection of bean classes with type name annotations.
+ * <li>Any subclass of {@link BeanDictionaryMap} containing a mapping of type names to classes without type name annotations.
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanDictionary</jsf>, values)</code>.
+ * </ul>
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanDictionary
+ */
+ public CoreApi setBeanDictionary(Class<?>...values) throws LockedException {
+ return setProperty(BEAN_beanDictionary, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Bean lookup dictionary.
+ * <p>
+ * Same as {@link #setBeanDictionary(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanDictionary
+ */
+ public CoreApi setBeanDictionary(Collection<Class<?>> values) throws LockedException {
+ return setProperty(BEAN_beanDictionary, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to bean dictionary.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>addToProperty(<jsf>BEAN_beanDictionary</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_beanDictionary_add</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanDictionary
+ * @see BeanContext#BEAN_beanDictionary_add
+ */
+ public CoreApi addToBeanDictionary(Class<?>...values) throws LockedException {
+ return addToProperty(BEAN_beanDictionary, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Add to bean dictionary.
+ * <p>
+ * Same as {@link #addToBeanDictionary(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to add to this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanDictionary
+ * @see BeanContext#BEAN_beanDictionary_add
+ */
+ public CoreApi addToBeanDictionary(Collection<Class<?>> values) throws LockedException {
+ return addToProperty(BEAN_beanDictionary, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from bean dictionary.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>removeFromProperty(<jsf>BEAN_beanDictionary</jsf>, values)</code>
+ * or <code>setProperty(<jsf>BEAN_beanDictionary_remove</jsf>, c)</code>.
+ * </ul>
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanDictionary
+ * @see BeanContext#BEAN_beanDictionary_remove
+ */
+ public CoreApi removeFromBeanDictionary(Class<?>...values) throws LockedException {
+ return removeFromProperty(BEAN_beanDictionary, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Remove from bean dictionary.
+ * <p>
+ * Same as {@link #removeFromBeanDictionary(Class...)} but using a <code>Collection</code>.
+ *
+ * @param values The values to remove from this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanDictionary
+ * @see BeanContext#BEAN_beanDictionary_remove
+ */
+ public CoreApi removeFromBeanDictionary(Collection<Class<?>> values) throws LockedException {
+ return removeFromProperty(BEAN_beanDictionary, values);
+ }
+
+ /**
+ * <b>Configuration property:</b> Name to use for the bean type properties used to represent a bean type.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.beanTypePropertyName"</js>
+ * <li><b>Data type:</b> <code>String</code>
+ * <li><b>Default:</b> <js>"_type"</js>
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_beanTypePropertyName</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_beanTypePropertyName
+ */
+ public CoreApi setBeanTypePropertyName(String value) throws LockedException {
+ return addToProperty(BEAN_beanTypePropertyName, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Default parser to use when converting <code>Strings</code> to POJOs.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.defaultParser"</js>
+ * <li><b>Data type:</b> <code>Class</code>
+ * <li><b>Default:</b> {@link JsonSerializer}
+ * <li><b>Session-overridable:</b> <jk>false</jk>
+ * </ul>
+ * <p>
+ * Used in the in the {@link BeanSession#convertToType(Object, Class)} method.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_defaultParser</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_defaultParser
+ */
+ public CoreApi setDefaultParser(Class<?> value) throws LockedException {
+ return addToProperty(BEAN_defaultParser, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Locale.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.locale"</js>
+ * <li><b>Data type:</b> <code>Locale</code>
+ * <li><b>Default:</b> <code>Locale.getDefault()</code>
+ * <li><b>Session-overridable:</b> <jk>true</jk>
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_locale</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_locale
+ */
+ public CoreApi setLocale(Locale value) throws LockedException {
+ return addToProperty(BEAN_locale, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> TimeZone.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.timeZone"</js>
+ * <li><b>Data type:</b> <code>TimeZone</code>
+ * <li><b>Default:</b> <jk>null</jk>
+ * <li><b>Session-overridable:</b> <jk>true</jk>
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_timeZone</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_timeZone
+ */
+ public CoreApi setTimeZone(TimeZone value) throws LockedException {
+ return setProperty(BEAN_timeZone, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Media type.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.mediaType"</js>
+ * <li><b>Data type:</b> <code>MediaType</code>
+ * <li><b>Default:</b> <jk>null</jk>
+ * <li><b>Session-overridable:</b> <jk>true</jk>
+ * </ul>
+ * <p>
+ * Specifies a default media type value for serializer and parser sessions.
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_mediaType</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_mediaType
+ */
+ public CoreApi setMediaType(MediaType value) throws LockedException {
+ return addToProperty(BEAN_mediaType, value);
+ }
+
+ /**
+ * <b>Configuration property:</b> Debug mode.
+ * <p>
+ * <ul>
+ * <li><b>Name:</b> <js>"BeanContext.debug"</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>
+ * Enables the following additional information during serialization:
+ * <ul class='spaced-list'>
+ * <li>When bean getters throws exceptions, the exception includes the object stack information
+ * in order to determine how that method was invoked.
+ * <li>Enables {@link SerializerContext#SERIALIZER_detectRecursions}.
+ * </ul>
+ * <p>
+ * Enables the following additional information during parsing:
+ * <ul class='spaced-list'>
+ * <li>When bean setters throws exceptions, the exception includes the object stack information
+ * in order to determine how that method was invoked.
+ * </ul>
+ * <p>
+ * <h5 class='section'>Notes:</h5>
+ * <ul>
+ * <li>This is equivalent to calling <code>setProperty(<jsf>BEAN_debug</jsf>, value)</code>.
+ * </ul>
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ * @throws LockedException If {@link #lock()} was called on this class.
+ * @see BeanContext#BEAN_debug
+ */
+ public CoreApi setDebug(boolean value) throws LockedException {
+ return addToProperty(BEAN_debug, value);
+ }
+
+ /**
+ * Sets the classloader used for created classes from class strings.
+ *
+ * @param classLoader The new classloader.
+ * @throws LockedException If {@link ContextFactory#lock()} was called on this class or the bean context.
+ * @return This object (for method chaining).
+ * @see ContextFactory#setClassLoader(ClassLoader)
+ */
+ public CoreApi setClassLoader(ClassLoader classLoader) throws LockedException {
+ checkLock();
+ contextFactory.setClassLoader(classLoader);
+ return this;
}
@@ -213,7 +1524,7 @@ public abstract class CoreApi extends Lockable {
//--------------------------------------------------------------------------------
@Override /* Lockable */
- public void checkLock() {
+ protected void checkLock() {
super.checkLock();
beanContext = null;
}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/Lockable.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/Lockable.java b/juneau-core/src/main/java/org/apache/juneau/Lockable.java
index 32fb0d8..4dc1b21 100644
--- a/juneau-core/src/main/java/org/apache/juneau/Lockable.java
+++ b/juneau-core/src/main/java/org/apache/juneau/Lockable.java
@@ -53,11 +53,11 @@ public abstract class Lockable implements Cloneable {
/**
* Causes a {@link LockedException} to be thrown if this object has been locked.
* <p>
- * Also calls {@link #onUnclone()} if this is the first time this method has been called since cloning.
+ * Also calls {@link #onUnclone()} if this is the first time this method has been called since cloning.
*
* @throws LockedException If {@link #lock()} has been called on this object.
*/
- public void checkLock() throws LockedException {
+ protected void checkLock() throws LockedException {
if (isLocked)
throw new LockedException();
if (isCloned)
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/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 4b54884..966f445 100644
--- a/juneau-core/src/main/java/org/apache/juneau/MediaType.java
+++ b/juneau-core/src/main/java/org/apache/juneau/MediaType.java
@@ -65,7 +65,7 @@ public final class MediaType {
* <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.
+ * @param s The media type string. Will be lowercased.
* <br>Returns <jk>null</jk> if input is null.
* @return A cached media type object.
*/
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/annotation/BeanParam.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/BeanParam.java b/juneau-core/src/main/java/org/apache/juneau/annotation/BeanParam.java
new file mode 100644
index 0000000..65609bd
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/BeanParam.java
@@ -0,0 +1,26 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+
+/**
+ * TODO
+ */
+public @interface BeanParam {
+
+ /**
+ * TODO
+ */
+ String value() default "";
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializer.java b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializer.java
index 1fa1a07..db04ea0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/csv/CsvSerializer.java
@@ -27,7 +27,7 @@ import org.apache.juneau.serializer.*;
public final class CsvSerializer extends WriterSerializer {
//--------------------------------------------------------------------------------
- // Overridden methods
+ // Entry point methods
//--------------------------------------------------------------------------------
@Override /* Serializer */
@@ -83,6 +83,11 @@ public final class CsvSerializer extends WriterSerializer {
}
}
+
+ //--------------------------------------------------------------------------------
+ // Overridden methods
+ //--------------------------------------------------------------------------------
+
@Override /* Serializer */
public CsvSerializer clone() {
try {
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/Link.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/Link.java b/juneau-core/src/main/java/org/apache/juneau/dto/Link.java
index 064bedc..8c747ae 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/Link.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/Link.java
@@ -47,6 +47,7 @@ public class Link implements Comparable<Link> {
setHref(href, hrefArgs);
}
+
//--------------------------------------------------------------------------------
// Bean properties
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Content.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Content.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Content.java
index 5adf5dd..7a790d5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Content.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Content.java
@@ -84,6 +84,7 @@ public class Content extends Text {
super();
}
+
//--------------------------------------------------------------------------------
// Bean properties
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
index 15a0029..f0f40a3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
@@ -193,6 +193,7 @@ public class Entry extends CommonEntry {
return this;
}
+
//--------------------------------------------------------------------------------
// Overridden setters (to simplify method chaining)
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
index 9f767ef..49e0611 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Icon.java
@@ -100,6 +100,7 @@ public class Icon extends Common {
return this;
}
+
//--------------------------------------------------------------------------------
// Overridden setters (to simplify method chaining)
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/atom/Source.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Source.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Source.java
index 0e16785..697a42a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Source.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Source.java
@@ -152,6 +152,7 @@ public class Source extends CommonEntry {
return this;
}
+
//--------------------------------------------------------------------------------
// Overridden setters (to simplify method chaining)
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html b/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
index 249b04b..88caad0 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/package.html
@@ -257,7 +257,7 @@
<h6 class='figure'>Example with namespaces with ATOM as the default namespace</h6>
<p class='bcode'>
<jc>// Create a serializer with readable output with namespaces.</jc>
- XmlSerializer s = <jk>new</jk> XmlSerializer.SqReadable().setProperty(XmlSerializerContext.<jsf>XML_defaultNamespaceUri</jsf>, <js>"atom"</js>);
+ XmlSerializer s = <jk>new</jk> XmlSerializer.SqReadable().setDefaultNamespaceUri(<js>"atom"</js>);
<jc>// Serialize to ATOM/XML</jc>
String atomXml = s.serialize(feed);
@@ -427,8 +427,8 @@
<p class='bcode'>
<jc>// Get RDF/XML serializer with readable output.</jc>
RdfSerializer s = <jk>new</jk> RdfSerializer.XmlAbbrev()
- .setProperty(SerializerContext.<jsf>SERIALIZER_useIndentation</jsf>, <jk>true</jk>)
- .setProperty(SerializerContext.<jsf>SERIALIZER_quoteChar</jsf>, <js>'\''</js>)
+ .setUseIndentation(<jk>true</jk>)
+ .setQuoteChar(<js>'\''</js>)
.setProperty(RdfProperties.<jsf>RDF_rdfxml_tab</jsf>, 3);
<jc>// Serialize to ATOM/RDF/XML</jc>
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
index e1780f7..a494cb9 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
@@ -86,6 +86,7 @@ public class Column {
return this;
}
+
//--------------------------------------------------------------------------------
// Bean properties
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/html5/A.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/A.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/A.java
index f279e4e..3357497 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/html5/A.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/A.java
@@ -26,7 +26,7 @@ public class A extends HtmlElementMixed {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-download">download</a> attribute.
* Whether to download the resource instead of navigating to it, and its file name if so.
- * @param download - The new value for this attribute.
+ * @param download The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
* @return This object (for method chaining).
*/
@@ -38,7 +38,7 @@ public class A extends HtmlElementMixed {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-href">href</a> attribute.
* Address of the hyperlink.
- * @param href - The new value for this attribute.
+ * @param href The new value for this attribute.
* Typically a {@link URL} or {@link String}.
* @return This object (for method chaining).
*/
@@ -50,7 +50,7 @@ public class A extends HtmlElementMixed {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-hreflang">hreflang</a> attribute.
* Language of the linked resource.
- * @param hreflang - The new value for this attribute.
+ * @param hreflang The new value for this attribute.
* @return This object (for method chaining).
*/
public final A hreflang(String hreflang) {
@@ -61,7 +61,7 @@ public class A extends HtmlElementMixed {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-rel">rel</a> attribute.
* Relationship between the document containing the hyperlink and the destination resource.
- * @param rel - The new value for this attribute.
+ * @param rel The new value for this attribute.
* @return This object (for method chaining).
*/
public final A rel(String rel) {
@@ -72,7 +72,7 @@ public class A extends HtmlElementMixed {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-target">target</a> attribute.
* Default browsing context for hyperlink navigation and form submission.
- * @param target - The new value for this attribute.
+ * @param target The new value for this attribute.
* @return This object (for method chaining).
*/
public final A target(String target) {
@@ -83,7 +83,7 @@ public class A extends HtmlElementMixed {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-type">type</a> attribute.
* Hint for the type of the referenced resource.
- * @param type - The new value for this attribute.
+ * @param type The new value for this attribute.
* @return This object (for method chaining).
*/
public final A type(String type) {
@@ -91,6 +91,7 @@ public class A extends HtmlElementMixed {
return this;
}
+
//--------------------------------------------------------------------------------
// Overridden methods
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/html5/Area.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Area.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Area.java
index 11cd901..a096ff5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Area.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Area.java
@@ -26,7 +26,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-area-alt">alt</a> attribute.
* Replacement text for use when images are not available.
- * @param alt - The new value for this attribute.
+ * @param alt The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area alt(String alt) {
@@ -37,7 +37,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-area-coords">coords</a> attribute.
* Coordinates for the shape to be created in an image map.
- * @param coords - The new value for this attribute.
+ * @param coords The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area coords(String coords) {
@@ -48,7 +48,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-download">download</a> attribute.
* Whether to download the resource instead of navigating to it, and its file name if so.
- * @param download - The new value for this attribute.
+ * @param download The new value for this attribute.
* Typically a {@link Boolean} or {@link String}.
* @return This object (for method chaining).
*/
@@ -60,7 +60,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-href">href</a> attribute.
* Address of the hyperlink.
- * @param href - The new value for this attribute.
+ * @param href The new value for this attribute.
* Typically a {@link URL} or {@link String}.
* @return This object (for method chaining).
*/
@@ -72,7 +72,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-hreflang">hreflang</a> attribute.
* Language of the linked resource.
- * @param hreflang - The new value for this attribute.
+ * @param hreflang The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area hreflang(String hreflang) {
@@ -83,7 +83,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-rel">rel</a> attribute.
* Relationship between the document containing the hyperlink and the destination resource.
- * @param rel - The new value for this attribute.
+ * @param rel The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area rel(String rel) {
@@ -94,7 +94,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-area-shape">shape</a> attribute.
* The kind of shape to be created in an image map.
- * @param shape - The new value for this attribute.
+ * @param shape The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area shape(String shape) {
@@ -105,7 +105,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-target">target</a> attribute.
* Browsing context for hyperlink navigation.
- * @param target - The new value for this attribute.
+ * @param target The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area target(String target) {
@@ -116,7 +116,7 @@ public class Area extends HtmlElementEmpty {
/**
* <a class="doclink" href="https://www.w3.org/TR/html5/links.html#attr-hyperlink-type">type</a> attribute.
* Hint for the type of the referenced resource.
- * @param type - The new value for this attribute.
+ * @param type The new value for this attribute.
* @return This object (for method chaining).
*/
public final Area type(String type) {
@@ -124,6 +124,7 @@ public class Area extends HtmlElementEmpty {
return this;
}
+
//--------------------------------------------------------------------------------
// Overridden methods
//--------------------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/68dffad1/juneau-core/src/main/java/org/apache/juneau/dto/html5/Article.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Article.java b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Article.java
index 6276944..38dd81a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/html5/Article.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/html5/Article.java
@@ -65,6 +65,7 @@ public class Article extends HtmlElementMixed {
return this;
}
+
//--------------------------------------------------------------------------------
// Overridden methods
//--------------------------------------------------------------------------------