This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 877338d  JUnit tests.
877338d is described below

commit 877338de7866f05bad7f89ab8cb694a39d4c0bf7
Author: JamesBognar <[email protected]>
AuthorDate: Thu Nov 12 15:33:40 2020 -0500

    JUnit tests.
---
 .../BeanConfigAnnotation_Test.java                 | 16 +++----
 .../main/java/org/apache/juneau/BeanContext.java   | 40 ++++++++--------
 .../main/java/org/apache/juneau/BeanSession.java   | 50 +++++++++----------
 .../org/apache/juneau/BeanTraverseContext.java     |  8 ++--
 .../org/apache/juneau/BeanTraverseSession.java     |  8 ++--
 .../src/main/java/org/apache/juneau/Context.java   |  8 ++--
 .../org/apache/juneau/annotation/BeanConfig.java   | 56 +++++++---------------
 .../juneau/annotation/BeanConfigAnnotation.java    |  8 ----
 8 files changed, 79 insertions(+), 115 deletions(-)

diff --git 
a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotation_Test.java
 
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
similarity index 96%
rename from 
juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotation_Test.java
rename to 
juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
index dff21d7..4031434 100644
--- 
a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotation_Test.java
+++ 
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
@@ -10,7 +10,7 @@
 // * "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;
+package org.apache.juneau.annotation;
 
 import static org.junit.Assert.*;
 import static org.junit.runners.MethodSorters.*;
@@ -19,7 +19,7 @@ import java.util.*;
 import java.util.function.*;
 import java.util.stream.*;
 
-import org.apache.juneau.annotation.*;
+import org.apache.juneau.*;
 import org.apache.juneau.collections.*;
 import org.apache.juneau.internal.*;
 import org.apache.juneau.json.*;
@@ -110,7 +110,6 @@ public class BeanConfigAnnotation_Test {
                beanConstructorVisibility="$X{PRIVATE}",
                dictionary={A1.class,A2.class},
                dictionary_replace={A1.class,A2.class,A3.class},
-               dictionary_remove=A2.class,
                beanFieldVisibility="$X{PRIVATE}",
                beanMapPutReturnsOldValue="$X{true}",
                beanMethodVisibility="$X{PRIVATE}",
@@ -134,13 +133,10 @@ public class BeanConfigAnnotation_Test {
                mediaType="$X{text/foo}",
                notBeanClasses={A1.class,A2.class},
                notBeanClasses_replace={A1.class,A2.class,A3.class},
-               notBeanClasses_remove=A2.class,
                notBeanPackages={"$X{foo1}","$X{foo2}"},
                notBeanPackages_replace={"$X{foo1}","$X{foo2}","$X{foo3}"},
-               notBeanPackages_remove={"$X{foo2}"},
                swaps={AB1.class,AB2.class},
                swaps_replace={AB1.class,AB2.class,AB3.class},
-               swaps_remove=AB2.class,
                propertyNamer=PropertyNamerULC.class,
                sortProperties="$X{true}",
                timeZone="$X{z}",
@@ -158,7 +154,7 @@ public class BeanConfigAnnotation_Test {
 
                check("PRIVATE", bc.getBeanClassVisibility());
                check("PRIVATE", bc.getBeanConstructorVisibility());
-               check("A1,A3", bc.getBeanDictionaryClasses());
+               check("A1,A2,A3", bc.getBeanDictionaryClasses());
                check("PRIVATE", bc.getBeanFieldVisibility());
                check("true", bc.isBeanMapPutReturnsOldValue());
                check("PRIVATE", bc.getBeanMethodVisibility());
@@ -180,9 +176,9 @@ public class BeanConfigAnnotation_Test {
                check("en_US", bc.getLocale());
                check("1", bc.getMaxDepth());
                check("application/json", bc.getMediaType());
-               check("A1,A3", bc.getNotBeanClasses());
-               check("foo1,foo3", bc.getNotBeanPackagesNames());
-               check("AB1<String,Integer>,AB3<String,Integer>", bc.getSwaps());
+               check("A1,A2,A3", bc.getNotBeanClasses());
+               check("foo1,foo2,foo3", bc.getNotBeanPackagesNames());
+               
check("AB1<String,Integer>,AB2<String,Integer>,AB3<String,Integer>", 
bc.getSwaps());
                check("PropertyNamerULC", bc.getPropertyNamer());
                check("true", bc.isSortProperties());
                check("GMT", bc.getTimeZone());
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
index b69c25f..7114bd4 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
@@ -3301,7 +3301,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      The list of classes that make up the bean dictionary in this 
bean context.
         */
-       protected final List<Class<?>> getBeanDictionaryClasses() {
+       public final List<Class<?>> getBeanDictionaryClasses() {
                return beanDictionaryClasses;
        }
 
@@ -3325,7 +3325,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if the {@link BeanMap#put(String,Object) 
BeanMap.put()} method will return old property values.
         *      <br>Otherwise, it returns <jk>null</jk>.
         */
-       protected final boolean isBeanMapPutReturnsOldValue() {
+       public final boolean isBeanMapPutReturnsOldValue() {
                return beanMapPutReturnsOldValue;
        }
 
@@ -3348,7 +3348,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if a Java class must implement a default no-arg 
constructor to be considered a bean.
         *      <br>Otherwise, the bean will be serialized as a string using 
the {@link Object#toString()} method.
         */
-       protected final boolean isBeansRequireDefaultConstructor() {
+       public final boolean isBeansRequireDefaultConstructor() {
                return beansRequireDefaultConstructor;
        }
 
@@ -3360,7 +3360,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if a Java class must implement the {@link 
Serializable} interface to be considered a bean.
         *      <br>Otherwise, the bean will be serialized as a string using 
the {@link Object#toString()} method.
         */
-       protected final boolean isBeansRequireSerializable() {
+       public final boolean isBeansRequireSerializable() {
                return beansRequireSerializable;
        }
 
@@ -3372,7 +3372,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if only getters that have equivalent setters will 
be considered as properties on a bean.
         *      <br>Otherwise, they are ignored.
         */
-       protected final boolean isBeansRequireSettersForGetters() {
+       public final boolean isBeansRequireSettersForGetters() {
                return beansRequireSettersForGetters;
        }
 
@@ -3384,7 +3384,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if a Java class must contain at least 1 property 
to be considered a bean.
         *      <br>Otherwise, the bean is serialized as a string using the 
{@link Object#toString()} method.
         */
-       protected final boolean isBeansRequireSomeProperties() {
+       public final boolean isBeansRequireSomeProperties() {
                return beansRequireSomeProperties;
        }
 
@@ -3395,7 +3395,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         * The name of the bean property used to store the dictionary name of a 
bean type so that the parser knows the data type to reconstruct.
         */
-       protected final String getBeanTypePropertyName() {
+       public final String getBeanTypePropertyName() {
                return typePropertyName;
        }
 
@@ -3409,7 +3409,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if fluent setters are detected on beans.
         */
-       protected final boolean isFluentSetters() {
+       public final boolean isFluentSetters() {
                return fluentSetters;
        }
 
@@ -3420,7 +3420,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if errors thrown when calling bean getter methods 
are silently ignored.
         */
-       protected final boolean isIgnoreInvocationExceptionsOnGetters() {
+       public final boolean isIgnoreInvocationExceptionsOnGetters() {
                return ignoreInvocationExceptionsOnGetters;
        }
 
@@ -3431,7 +3431,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if errors thrown when calling bean setter methods 
are silently ignored.
         */
-       protected final boolean isIgnoreInvocationExceptionsOnSetters() {
+       public final boolean isIgnoreInvocationExceptionsOnSetters() {
                return ignoreInvocationExceptionsOnSetters;
        }
 
@@ -3442,7 +3442,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if trying to set a value on a bean property 
without a setter is silently ignored.
         */
-       protected final boolean isIgnorePropertiesWithoutSetters() {
+       public final boolean isIgnorePropertiesWithoutSetters() {
                return ignorePropertiesWithoutSetters;
        }
 
@@ -3465,7 +3465,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if trying to set a value on a non-existent bean 
property is silently ignored.
         *      <br>Otherwise, a {@code RuntimeException} is thrown.
         */
-       protected final boolean isIgnoreUnknownBeanProperties() {
+       public final boolean isIgnoreUnknownBeanProperties() {
                return ignoreUnknownBeanProperties;
        }
 
@@ -3476,7 +3476,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if trying to set a <jk>null</jk> value on a 
non-existent bean property is silently ignored.
         */
-       protected final boolean isIgnoreUnknownNullBeanProperties() {
+       public final boolean isIgnoreUnknownNullBeanProperties() {
                return ignoreUnknownNullBeanProperties;
        }
 
@@ -3498,7 +3498,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      The list of fully-qualified package names to exclude from being 
classified as beans.
         */
-       protected final String[] getNotBeanPackagesNames() {
+       public final String[] getNotBeanPackagesNames() {
                return notBeanPackageNames;
        }
 
@@ -3520,7 +3520,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      The list POJO swaps defined.
         */
-       protected final PojoSwap<?,?>[] getSwaps() {
+       public final PojoSwap<?,?>[] getSwaps() {
                return swaps;
        }
 
@@ -3531,7 +3531,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      The interface used to calculate bean property names.
         */
-       protected final PropertyNamer getPropertyNamer() {
+       public final PropertyNamer getPropertyNamer() {
                return propertyNamer;
        }
 
@@ -3542,7 +3542,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if all bean properties will be serialized and 
access in alphabetical order.
         */
-       protected final boolean isSortProperties() {
+       public final boolean isSortProperties() {
                return sortProperties;
        }
 
@@ -3553,7 +3553,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if enums are always serialized by name, not using 
{@link Object#toString()}.
         */
-       protected final boolean isUseEnumNames() {
+       public final boolean isUseEnumNames() {
                return useEnumNames;
        }
 
@@ -3565,7 +3565,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         *      <jk>true</jk> if interfaces will be instantiated as proxy 
classes through the use of an
         *      {@link InvocationHandler} if there is no other way of 
instantiating them.
         */
-       protected final boolean isUseInterfaceProxies() {
+       public final boolean isUseInterfaceProxies() {
                return useInterfaceProxies;
        }
 
@@ -3576,7 +3576,7 @@ public class BeanContext extends Context implements 
MetaProvider {
         * @return
         *      <jk>true</jk> if the built-in Java bean introspector should be 
used for bean introspection.
         */
-       protected final boolean isUseJavaBeanIntrospector() {
+       public final boolean isUseJavaBeanIntrospector() {
                return useJavaBeanIntrospector;
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
index 5aa5a90..5478342 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
@@ -1176,7 +1176,7 @@ public class BeanSession extends Session {
         * @return
         *      Classes are not considered beans unless they meet the minimum 
visibility requirements.
         */
-       protected final Visibility getBeanClassVisibility() {
+       public final Visibility getBeanClassVisibility() {
                return ctx.getBeanClassVisibility();
        }
 
@@ -1187,7 +1187,7 @@ public class BeanSession extends Session {
         * @return
         *      Only look for constructors with this specified minimum 
visibility.
         */
-       protected final Visibility getBeanConstructorVisibility() {
+       public final Visibility getBeanConstructorVisibility() {
                return ctx.getBeanConstructorVisibility();
        }
 
@@ -1199,7 +1199,7 @@ public class BeanSession extends Session {
         *      The list of classes that make up the bean dictionary in this 
bean context.
         */
        // TODO - Rename to getBeanDictionary()
-       protected final List<Class<?>> getBeanDictionaryClasses() {
+       public final List<Class<?>> getBeanDictionaryClasses() {
                return ctx.getBeanDictionaryClasses();
        }
 
@@ -1211,7 +1211,7 @@ public class BeanSession extends Session {
         * @return
         *      Only look for bean fields with this specified minimum 
visibility.
         */
-       protected final Visibility getBeanFieldVisibility() {
+       public final Visibility getBeanFieldVisibility() {
                return ctx.getBeanFieldVisibility();
        }
 
@@ -1223,7 +1223,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if the {@link BeanMap#put(String,Object) 
BeanMap.put()} method will return old property values.
         *      <br>Otherwise, it returns <jk>null</jk>.
         */
-       protected final boolean isBeanMapPutReturnsOldValue() {
+       public final boolean isBeanMapPutReturnsOldValue() {
                return ctx.isBeanMapPutReturnsOldValue();
        }
 
@@ -1234,7 +1234,7 @@ public class BeanSession extends Session {
         * @return
         *      Only look for bean methods with this specified minimum 
visibility.
         */
-       protected final Visibility getBeanMethodVisibility() {
+       public final Visibility getBeanMethodVisibility() {
                return ctx.getBeanMethodVisibility();
        }
 
@@ -1246,7 +1246,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if a Java class must implement a default no-arg 
constructor to be considered a bean.
         *      <br>Otherwise, the bean will be serialized as a string using 
the {@link Object#toString()} method.
         */
-       protected final boolean isBeansRequireDefaultConstructor() {
+       public final boolean isBeansRequireDefaultConstructor() {
                return ctx.isBeansRequireDefaultConstructor();
        }
 
@@ -1258,7 +1258,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if a Java class must implement the {@link 
Serializable} interface to be considered a bean.
         *      <br>Otherwise, the bean will be serialized as a string using 
the {@link Object#toString()} method.
         */
-       protected final boolean isBeansRequireSerializable() {
+       public final boolean isBeansRequireSerializable() {
                return ctx.isBeansRequireSerializable();
        }
 
@@ -1270,7 +1270,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if only getters that have equivalent setters will 
be considered as properties on a bean.
         *      <br>Otherwise, they are ignored.
         */
-       protected final boolean isBeansRequireSettersForGetters() {
+       public final boolean isBeansRequireSettersForGetters() {
                return ctx.isBeansRequireSettersForGetters();
        }
 
@@ -1282,7 +1282,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if a Java class must contain at least 1 property 
to be considered a bean.
         *      <br>Otherwise, the bean is serialized as a string using the 
{@link Object#toString()} method.
         */
-       protected final boolean isBeansRequireSomeProperties() {
+       public final boolean isBeansRequireSomeProperties() {
                return ctx.isBeansRequireSomeProperties();
        }
 
@@ -1293,7 +1293,7 @@ public class BeanSession extends Session {
         * @return
         *      The name of the bean property used to store the dictionary name 
of a bean type so that the parser knows the data type to reconstruct.
         */
-       protected final String getBeanTypePropertyName() {
+       public final String getBeanTypePropertyName() {
                return ctx.getBeanTypePropertyName();
        }
 
@@ -1307,7 +1307,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if fluent setters are detected on beans.
         */
-       protected final boolean isFluentSetters() {
+       public final boolean isFluentSetters() {
                return ctx.isFluentSetters();
        }
 
@@ -1318,7 +1318,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if errors thrown when calling bean getter methods 
are silently ignored.
         */
-       protected final boolean isIgnoreInvocationExceptionsOnGetters() {
+       public final boolean isIgnoreInvocationExceptionsOnGetters() {
                return ctx.isIgnoreInvocationExceptionsOnGetters();
        }
 
@@ -1329,7 +1329,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if errors thrown when calling bean setter methods 
are silently ignored.
         */
-       protected final boolean isIgnoreInvocationExceptionsOnSetters() {
+       public final boolean isIgnoreInvocationExceptionsOnSetters() {
                return ctx.isIgnoreInvocationExceptionsOnSetters();
        }
 
@@ -1342,7 +1342,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if trying to set a value on a bean property 
without a setter is silently ignored.
         */
-       protected final boolean isIgnorePropertiesWithoutSetters() {
+       public final boolean isIgnorePropertiesWithoutSetters() {
                return ctx.isIgnorePropertiesWithoutSetters();
        }
 
@@ -1354,7 +1354,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if trying to set a value on a non-existent bean 
property is silently ignored.
         *      <br>Otherwise, a {@code RuntimeException} is thrown.
         */
-       protected final boolean isIgnoreUnknownBeanProperties() {
+       public final boolean isIgnoreUnknownBeanProperties() {
                return ctx.isIgnoreUnknownBeanProperties();
        }
 
@@ -1365,7 +1365,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if trying to set a <jk>null</jk> value on a 
non-existent bean property is silently ignored.
         */
-       protected final boolean isIgnoreUnknownNullBeanProperties() {
+       public final boolean isIgnoreUnknownNullBeanProperties() {
                return ctx.isIgnoreUnknownNullBeanProperties();
        }
 
@@ -1376,7 +1376,7 @@ public class BeanSession extends Session {
         * @return
         *      The list of classes that are explicitly not beans.
         */
-       protected final Class<?>[] getNotBeanClasses() {
+       public final Class<?>[] getNotBeanClasses() {
                return ctx.getNotBeanClasses();
        }
 
@@ -1387,7 +1387,7 @@ public class BeanSession extends Session {
         * @return
         *      The list of fully-qualified package names to exclude from being 
classified as beans.
         */
-       protected final String[] getNotBeanPackagesNames() {
+       public final String[] getNotBeanPackagesNames() {
                return ctx.getNotBeanPackagesNames();
        }
 
@@ -1409,7 +1409,7 @@ public class BeanSession extends Session {
         * @return
         *      The interface used to calculate bean property names.
         */
-       protected final PropertyNamer getPropertyNamer() {
+       public final PropertyNamer getPropertyNamer() {
                return ctx.getPropertyNamer();
        }
 
@@ -1420,7 +1420,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if all bean properties will be serialized and 
access in alphabetical order.
         */
-       protected final boolean isSortProperties() {
+       public final boolean isSortProperties() {
                return ctx.isSortProperties();
        }
 
@@ -1431,7 +1431,7 @@ public class BeanSession extends Session {
         * @return
         *      The list POJO swaps defined.
         */
-       protected final PojoSwap<?,?>[] getSwaps() {
+       public final PojoSwap<?,?>[] getSwaps() {
                return ctx.getSwaps();
        }
 
@@ -1442,7 +1442,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if enums are always serialized by name, not using 
{@link Object#toString()}.
         */
-       protected final boolean isUseEnumNames() {
+       public final boolean isUseEnumNames() {
                return ctx.isUseEnumNames();
        }
 
@@ -1454,7 +1454,7 @@ public class BeanSession extends Session {
         *      <jk>true</jk> if interfaces will be instantiated as proxy 
classes through the use of an
         *      {@link InvocationHandler} if there is no other way of 
instantiating them.
         */
-       protected final boolean isUseInterfaceProxies() {
+       public final boolean isUseInterfaceProxies() {
                return ctx.isUseInterfaceProxies();
        }
 
@@ -1465,7 +1465,7 @@ public class BeanSession extends Session {
         * @return
         *      <jk>true</jk> if the built-in Java bean introspector should be 
used for bean introspection.
         */
-       protected final boolean isUseJavaBeanIntrospector() {
+       public final boolean isUseJavaBeanIntrospector() {
                return ctx.isUseJavaBeanIntrospector();
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java
index 21ff1bd..1158898 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java
@@ -304,7 +304,7 @@ public abstract class BeanTraverseContext extends 
BeanContext {
         * @return
         *      <jk>true</jk> if recursions should be checked for during 
traversal.
         */
-       protected final boolean isDetectRecursions() {
+       public final boolean isDetectRecursions() {
                return detectRecursions;
        }
 
@@ -316,7 +316,7 @@ public abstract class BeanTraverseContext extends 
BeanContext {
         *      <jk>true</jk> if when we encounter the same object when 
traversing a tree, we set the value to <jk>null</jk>.
         *      <br>Otherwise, an exception is thrown with the message 
<js>"Recursion occurred, stack=..."</js>.
         */
-       protected final boolean isIgnoreRecursions() {
+       public final boolean isIgnoreRecursions() {
                return ignoreRecursions;
        }
 
@@ -327,7 +327,7 @@ public abstract class BeanTraverseContext extends 
BeanContext {
         * @return
         *      The initial indentation level at the root.
         */
-       protected final int getInitialDepth() {
+       public final int getInitialDepth() {
                return initialDepth;
        }
 
@@ -339,7 +339,7 @@ public abstract class BeanTraverseContext extends 
BeanContext {
         *      The depth at which traversal is aborted if depth is reached in 
the POJO tree.
         *      <br>If this depth is exceeded, an exception is thrown.
         */
-       protected final int getMaxDepth() {
+       public final int getMaxDepth() {
                return maxDepth;
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java
index 236b256..7505930 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java
@@ -306,7 +306,7 @@ public class BeanTraverseSession extends BeanSession {
         * @return
         *      <jk>true</jk> if recursions should be checked for during 
traversal.
         */
-       protected final boolean isDetectRecursions() {
+       public final boolean isDetectRecursions() {
                return ctx.isDetectRecursions();
        }
 
@@ -318,7 +318,7 @@ public class BeanTraverseSession extends BeanSession {
         *      <jk>true</jk> if when we encounter the same object when 
traversing a tree, we set the value to <jk>null</jk>.
         *      <br>Otherwise, a {@link BeanRecursionException} is thrown with 
the message <js>"Recursion occurred, stack=..."</js>.
         */
-       protected final boolean isIgnoreRecursions() {
+       public final boolean isIgnoreRecursions() {
                return ctx.isIgnoreRecursions();
        }
 
@@ -329,7 +329,7 @@ public class BeanTraverseSession extends BeanSession {
         * @return
         *      The initial indentation level at the root.
         */
-       protected final int getInitialDepth() {
+       public final int getInitialDepth() {
                return ctx.getInitialDepth();
        }
 
@@ -341,7 +341,7 @@ public class BeanTraverseSession extends BeanSession {
         *      The depth at which traversal is aborted if depth is reached in 
the POJO tree.
         *      <br>If this depth is exceeded, an exception is thrown.
         */
-       protected final int getMaxDepth() {
+       public final int getMaxDepth() {
                return ctx.getMaxDepth();
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
index 8735b4c..7e27f26 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
@@ -842,7 +842,7 @@ public abstract class Context {
         * @return
         *      <jk>true</jk> if debug mode is enabled.
         */
-       protected boolean isDebug() {
+       public boolean isDebug() {
                return debug;
        }
 
@@ -853,7 +853,7 @@ public abstract class Context {
         * @return
         *      The default locale for serializer and parser sessions.
         */
-       protected final Locale getDefaultLocale() {
+       public final Locale getDefaultLocale() {
                return locale;
        }
 
@@ -864,7 +864,7 @@ public abstract class Context {
         * @return
         *      The default media type value for serializer and parser sessions.
         */
-       protected final MediaType getDefaultMediaType() {
+       public final MediaType getDefaultMediaType() {
                return mediaType;
        }
 
@@ -875,7 +875,7 @@ public abstract class Context {
         * @return
         *      The default timezone for serializer and parser sessions.
         */
-       protected final TimeZone getDefaultTimeZone() {
+       public final TimeZone getDefaultTimeZone() {
                return timeZone;
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
index 44d384c..46d25bd 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
@@ -376,7 +376,10 @@ public @interface BeanConfig {
        Class<?>[] dictionary() default {};
 
        /**
-        * Configuration property:  Add to bean dictionary.
+        * Configuration property:  Replace bean dictionary.
+        * 
+        * <p>
+        * Same as {@link #dictionary()} but replaces any existing value.
         *
         * <ul class='seealso'>
         *      <li class='jf'>{@link BeanContext#BEAN_beanDictionary}
@@ -385,15 +388,6 @@ public @interface BeanConfig {
        Class<?>[] dictionary_replace() default {};
 
        /**
-        * Configuration property:  Remove from bean dictionary.
-        *
-        * <ul class='seealso'>
-        *      <li class='jf'>{@link BeanContext#BEAN_beanDictionary_remove}
-        * </ul>
-        */
-       Class<?>[] dictionary_remove() default {};
-
-       /**
         * Configuration property:  Find fluent setters.
         *
         * <p>
@@ -657,7 +651,10 @@ public @interface BeanConfig {
        Class<?>[] notBeanClasses() default {};
 
        /**
-        * Configuration property:  Add to classes that should not be 
considered beans.
+        * Configuration property:  Replace classes that should not be 
considered beans.
+        * 
+        * <p>
+        * Same as {@link #notBeanClasses()} but replaces any existing value.
         *
         * <ul class='seealso'>
         *      <li class='jf'>{@link BeanContext#BEAN_notBeanClasses}
@@ -666,15 +663,6 @@ public @interface BeanConfig {
        Class<?>[] notBeanClasses_replace() default {};
 
        /**
-        * Configuration property:  Remove from classes that should not be 
considered beans.
-        *
-        * <ul class='seealso'>
-        *      <li class='jf'>{@link BeanContext#BEAN_notBeanClasses}
-        * </ul>
-        */
-       Class<?>[] notBeanClasses_remove() default {};
-
-       /**
         * Configuration property:  Bean package exclusions.
         *
         * <p>
@@ -710,8 +698,11 @@ public @interface BeanConfig {
        String[] notBeanPackages() default {};
 
        /**
-        * Configuration property:  Add to packages whose classes should not be 
considered beans.
+        * Configuration property:  Replace packages whose classes should not 
be considered beans.
         *
+        * <p>
+        * Same as {@link #notBeanPackages()} but replaces any existing value.
+        * 
         * <ul class='seealso'>
         *      <li class='jf'>{@link BeanContext#BEAN_notBeanPackages}
         * </ul>
@@ -719,15 +710,6 @@ public @interface BeanConfig {
        String[] notBeanPackages_replace() default {};
 
        /**
-        * Configuration property:  Remove from packages whose classes should 
not be considered beans.
-        *
-        * <ul class='seealso'>
-        *      <li class='jf'>{@link BeanContext#BEAN_notBeanPackages}
-        * </ul>
-        */
-       String[] notBeanPackages_remove() default {};
-
-       /**
         * Configuration property:  Bean property namer.
         *
         * <p>
@@ -806,8 +788,11 @@ public @interface BeanConfig {
        Class<?>[] swaps() default {};
 
        /**
-        * Configuration property:  Add to Java object swap classes.
+        * Configuration property: Replace Java object swap classes.
         *
+        * <p>
+        * Same as {@link #swaps()} but replaces any existing value.
+        * 
         * <ul class='seealso'>
         *      <li class='jf'>{@link BeanContext#BEAN_swaps}
         * </ul>
@@ -815,15 +800,6 @@ public @interface BeanConfig {
        Class<?>[] swaps_replace() default {};
 
        /**
-        * Configuration property:  Remove from Java object swap classes.
-        *
-        * <ul class='seealso'>
-        *      <li class='jf'>{@link BeanContext#BEAN_swaps}
-        * </ul>
-        */
-       Class<?>[] swaps_remove() default {};
-
-       /**
         * Configuration property:  Time zone.
         *
         * <p>
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
index 8dfa7c9..66ddbf6 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
@@ -54,8 +54,6 @@ public class BeanConfigAnnotation {
                                psb.prependTo(BEAN_beanDictionary, 
a.dictionary());
                        if (a.dictionary_replace().length != 0)
                                psb.set(BEAN_beanDictionary, 
a.dictionary_replace());
-                       if (a.dictionary_remove().length != 0)
-                               psb.removeFrom(BEAN_beanDictionary, 
a.dictionary_remove());
                        if (! a.beanFieldVisibility().isEmpty())
                                psb.set(BEAN_beanFieldVisibility, 
visibility(a.beanFieldVisibility(), "beanFieldVisibility"));
                        if (! a.beanMapPutReturnsOldValue().isEmpty())
@@ -98,14 +96,10 @@ public class BeanConfigAnnotation {
                                psb.addTo(BEAN_notBeanClasses, 
a.notBeanClasses());
                        if (a.notBeanClasses_replace().length != 0)
                                psb.set(BEAN_notBeanClasses, 
a.notBeanClasses_replace());
-                       if (a.notBeanClasses_remove().length != 0)
-                               psb.removeFrom(BEAN_notBeanClasses, 
a.notBeanClasses_remove());
                        if (a.notBeanPackages().length != 0)
                                psb.addTo(BEAN_notBeanPackages, 
strings(a.notBeanPackages()));
                        if (a.notBeanPackages_replace().length != 0)
                                psb.set(BEAN_notBeanPackages, 
strings(a.notBeanPackages_replace()));
-                       if (a.notBeanPackages_remove().length != 0)
-                               psb.removeFrom(BEAN_notBeanPackages, 
strings(a.notBeanPackages_remove()));
                        if (a.propertyNamer() != PropertyNamer.Null.class)
                                psb.set(BEAN_propertyNamer, a.propertyNamer());
                        if (! a.sortProperties().isEmpty())
@@ -114,8 +108,6 @@ public class BeanConfigAnnotation {
                                psb.prependTo(BEAN_swaps, a.swaps());
                        if (a.swaps_replace().length != 0)
                                psb.set(BEAN_swaps, a.swaps_replace());
-                       if (a.swaps_remove().length != 0)
-                               psb.removeFrom(BEAN_swaps, a.swaps_remove());
                        if (! a.timeZone().isEmpty())
                                psb.set(CONTEXT_timeZone, 
timeZone(a.timeZone()));
                        if (! a.useEnumNames().isEmpty())

Reply via email to