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 da69083  Code cleanup.
da69083 is described below

commit da690830a0114eb06caca5b76a7d78656b9d3a9b
Author: JamesBognar <[email protected]>
AuthorDate: Sun Jul 8 17:49:08 2018 -0400

    Code cleanup.
---
 .../main/java/org/apache/juneau/BeanContext.java   |  58 ++---
 .../main/java/org/apache/juneau/BeanSession.java   | 270 ++++++++++++++++++++-
 .../org/apache/juneau/json/JsonParserSession.java  |   1 -
 .../apache/juneau/parser/ReaderParserSession.java  |   2 -
 .../org/apache/juneau/xml/XmlParserSession.java    |   2 -
 5 files changed, 286 insertions(+), 47 deletions(-)

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 8f520ba..25bd425 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
@@ -2680,7 +2680,7 @@ public class BeanContext extends Context {
         * @param c The class.
         * @return The properties to include for the specified class, or 
<jk>null</jk> if it's not defined for the class.
         */
-       public String[] getIncludeProperties(Class<?> c) {
+       protected String[] getIncludeProperties(Class<?> c) {
                if (includeProperties.isEmpty())
                        return null;
                String[] s = null;
@@ -2702,7 +2702,7 @@ public class BeanContext extends Context {
         * @param c The class.
         * @return The properties to exclude for the specified class, or 
<jk>null</jk> if it's not defined for the class.
         */
-       public String[] getExcludeProperties(Class<?> c) {
+       protected String[] getExcludeProperties(Class<?> c) {
                if (excludeProperties.isEmpty())
                        return null;
                String[] s = null;
@@ -2837,7 +2837,7 @@ public class BeanContext extends Context {
         *
         * @return The lookup table for resolving bean types by name.
         */
-       public final BeanRegistry getBeanRegistry() {
+       protected final BeanRegistry getBeanRegistry() {
                return beanRegistry;
        }
 
@@ -2853,7 +2853,7 @@ public class BeanContext extends Context {
         *      <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.
         */
-       public final boolean isBeansRequireDefaultConstructor() {
+       protected final boolean isBeansRequireDefaultConstructor() {
                return beansRequireDefaultConstructor;
        }
 
@@ -2865,7 +2865,7 @@ public class BeanContext extends Context {
         *      <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.
         */
-       public final boolean isBeansRequireSerializable() {
+       protected final boolean isBeansRequireSerializable() {
                return beansRequireSerializable;
        }
 
@@ -2877,7 +2877,7 @@ public class BeanContext extends Context {
         *      <jk>true</jk> if only getters that have equivalent setters will 
be considered as properties on a bean.
         *      <br>Otherwise, they are ignored.
         */
-       public final boolean isBeansRequireSettersForGetters() {
+       protected final boolean isBeansRequireSettersForGetters() {
                return beansRequireSettersForGetters;
        }
 
@@ -2889,7 +2889,7 @@ public class BeanContext extends Context {
         *      <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.
         */
-       public final boolean isBeansRequireSomeProperties() {
+       protected final boolean isBeansRequireSomeProperties() {
                return beansRequireSomeProperties;
        }
 
@@ -2901,7 +2901,7 @@ public class BeanContext extends Context {
         *      <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>.
         */
-       public final boolean isBeanMapPutReturnsOldValue() {
+       protected final boolean isBeanMapPutReturnsOldValue() {
                return beanMapPutReturnsOldValue;
        }
 
@@ -2913,7 +2913,7 @@ public class BeanContext extends Context {
         *      <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.
         */
-       public final boolean isUseInterfaceProxies() {
+       protected final boolean isUseInterfaceProxies() {
                return useInterfaceProxies;
        }
 
@@ -2925,7 +2925,7 @@ public class BeanContext extends Context {
         *      <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.
         */
-       public final boolean isIgnoreUnknownBeanProperties() {
+       protected final boolean isIgnoreUnknownBeanProperties() {
                return ignoreUnknownBeanProperties;
        }
 
@@ -2936,7 +2936,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if trying to set a <jk>null</jk> value on a 
non-existent bean property is silently ignored.
         */
-       public final boolean isIgnoreUnknownNullBeanProperties() {
+       protected final boolean isIgnoreUnknownNullBeanProperties() {
                return ignoreUnknownNullBeanProperties;
        }
 
@@ -2949,7 +2949,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if trying to set a value on a bean property 
without a setter is silently ignored.
         */
-       public final boolean isIgnorePropertiesWithoutSetters() {
+       protected final boolean isIgnorePropertiesWithoutSetters() {
                return ignorePropertiesWithoutSetters;
        }
 
@@ -2960,7 +2960,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if errors thrown when calling bean getter methods 
are silently ignored.
         */
-       public final boolean isIgnoreInvocationExceptionsOnGetters() {
+       protected final boolean isIgnoreInvocationExceptionsOnGetters() {
                return ignoreInvocationExceptionsOnGetters;
        }
 
@@ -2971,7 +2971,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if errors thrown when calling bean setter methods 
are silently ignored.
         */
-       public final boolean isIgnoreInvocationExceptionsOnSetters() {
+       protected final boolean isIgnoreInvocationExceptionsOnSetters() {
                return ignoreInvocationExceptionsOnSetters;
        }
 
@@ -2982,7 +2982,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if the built-in Java bean introspector should be 
used for bean introspection.
         */
-       public final boolean isUseJavaBeanIntrospector() {
+       protected final boolean isUseJavaBeanIntrospector() {
                return useJavaBeanIntrospector;
        }
 
@@ -2993,7 +2993,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if enums are always serialized by name, not using 
{@link Object#toString()}.
         */
-       public final boolean isUseEnumNames() {
+       protected final boolean isUseEnumNames() {
                return useEnumNames;
        }
 
@@ -3004,7 +3004,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if all bean properties will be serialized and 
access in alphabetical order.
         */
-       public final boolean isSortProperties() {
+       protected final boolean isSortProperties() {
                return sortProperties;
        }
 
@@ -3018,7 +3018,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if fluent setters are detected on beans.
         */
-       public final boolean isFluentSetters() {
+       protected final boolean isFluentSetters() {
                return fluentSetters;
        }
 
@@ -3029,7 +3029,7 @@ public class BeanContext extends Context {
         * @return
         *      <jk>true</jk> if debug mode is enabled.
         */
-       public boolean isDebug() {
+       protected boolean isDebug() {
                return debug;
        }
 
@@ -3040,7 +3040,7 @@ public class BeanContext extends Context {
         * @return
         *      Only look for constructors with this specified minimum 
visibility.
         */
-       public final Visibility getBeanConstructorVisibility() {
+       protected final Visibility getBeanConstructorVisibility() {
                return beanConstructorVisibility;
        }
 
@@ -3051,7 +3051,7 @@ public class BeanContext extends Context {
         * @return
         *      Classes are not considered beans unless they meet the minimum 
visibility requirements.
         */
-       public final Visibility getBeanClassVisibility() {
+       protected final Visibility getBeanClassVisibility() {
                return beanClassVisibility;
        }
 
@@ -3062,7 +3062,7 @@ public class BeanContext extends Context {
         * @return
         *      Only look for bean methods with this specified minimum 
visibility.
         */
-       public final Visibility getBeanMethodVisibility() {
+       protected final Visibility getBeanMethodVisibility() {
                return beanMethodVisibility;
        }
 
@@ -3074,7 +3074,7 @@ public class BeanContext extends Context {
         * @return
         *      Only look for bean fields with this specified minimum 
visibility.
         */
-       public final Visibility getBeanFieldVisibility() {
+       protected final Visibility getBeanFieldVisibility() {
                return beanFieldVisibility;
        }
 
@@ -3085,7 +3085,7 @@ public class BeanContext extends Context {
         * @return
         *      The list of classes that make up the bean dictionary in this 
bean context.
         */
-       public final List<Class<?>> getBeanDictionaryClasses() {
+       protected final List<Class<?>> getBeanDictionaryClasses() {
                return beanDictionaryClasses;
        }
 
@@ -3096,7 +3096,7 @@ public class BeanContext extends Context {
         * @return
         *      The default locale for serializer and parser sessions.
         */
-       public final Locale getLocale() {
+       protected final Locale getLocale() {
                return locale;
        }
 
@@ -3107,7 +3107,7 @@ public class BeanContext extends Context {
         * @return
         *      The default timezone for serializer and parser sessions.
         */
-       public final TimeZone getTimeZone() {
+       protected final TimeZone getTimeZone() {
                return timeZone;
        }
 
@@ -3118,7 +3118,7 @@ public class BeanContext extends Context {
         * @return
         *      The default media type value for serializer and parser sessions.
         */
-       public final MediaType getMediaType() {
+       protected final MediaType getMediaType() {
                return mediaType;
        }
 
@@ -3129,7 +3129,7 @@ public class BeanContext extends Context {
         * @return
         *      The interface used to calculate bean property names.
         */
-       public final PropertyNamer getPropertyNamer() {
+       protected final PropertyNamer getPropertyNamer() {
                return propertyNamer;
        }
 
@@ -3140,7 +3140,7 @@ public class BeanContext extends Context {
         * @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.
         */
-       public final String getBeanTypePropertyName() {
+       protected final String getBeanTypePropertyName() {
                return beanTypePropertyName;
        }
 
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 0e81a4d..69b706c 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
@@ -93,7 +93,7 @@ public class BeanSession extends Session {
                // Shortcut for most common case.
                if (value != null && value.getClass() == type)
                        return (T)value;
-               return convertToMemberType(null, value, ctx.getClassMeta(type));
+               return convertToMemberType(null, value, getClassMeta(type));
        }
 
        /**
@@ -110,7 +110,7 @@ public class BeanSession extends Session {
         * @return The converted value.
         */
        public final <T> T convertToMemberType(Object outer, Object value, 
Class<T> type) throws InvalidDataConversionException {
-               return convertToMemberType(outer, value, 
ctx.getClassMeta(type));
+               return convertToMemberType(outer, value, getClassMeta(type));
        }
 
        /**
@@ -279,9 +279,9 @@ public class BeanSession extends Session {
         * @throws InvalidDataConversionException If the specified value cannot 
be converted to the specified type.
         * @return The converted value.
         */
-       public final <T> T convertToMemberType(Object outer, Object value, 
ClassMeta<T> to) throws InvalidDataConversionException {
+       protected final <T> T convertToMemberType(Object outer, Object value, 
ClassMeta<T> to) throws InvalidDataConversionException {
                if (to == null)
-                       to = (ClassMeta<T>)ctx.object();
+                       to = (ClassMeta<T>)object();
 
                try {
                        // Handle the case of a null value.
@@ -310,7 +310,7 @@ public class BeanSession extends Session {
                                        return (T)swap.unswap(this, value, to);
                        }
 
-                       ClassMeta<?> from = ctx.getClassMetaForObject(value);
+                       ClassMeta<?> from = getClassMetaForObject(value);
                        swap = from.getPojoSwap(this);
                        if (swap != null) {
                                Class<?> nc = swap.getNormalClass(), fc = 
swap.getSwapClass();
@@ -714,7 +714,7 @@ public class BeanSession extends Session {
         * @param list The contents to populate the array with.
         * @return A new object or primitive array.
         */
-       public final Object toArray(ClassMeta<?> type, Collection<?> list) {
+       protected final Object toArray(ClassMeta<?> type, Collection<?> list) {
                if (list == null)
                        return null;
                ClassMeta<?> componentType = type.isArgs() ? object() : 
type.getElementType();
@@ -993,7 +993,7 @@ public class BeanSession extends Session {
         * @param classes The array of classes to get class metas for.
         * @return The args {@link ClassMeta} object corresponding to the 
classes.  Never <jk>null</jk>.
         */
-       public final ClassMeta<Object[]> getArgsClassMeta(Type[] classes) {
+       protected final ClassMeta<Object[]> getArgsClassMeta(Type[] classes) {
                assertFieldNotNull(classes, "classes");
                ClassMeta[] cm = new ClassMeta<?>[classes.length];
                for (int i = 0; i < classes.length; i++)
@@ -1024,7 +1024,7 @@ public class BeanSession extends Session {
         */
        public final String getBeanTypePropertyName(ClassMeta cm) {
                String s = cm == null ? null : cm.getBeanTypePropertyName();
-               return s == null ? ctx.getBeanTypePropertyName() : s;
+               return s == null ? getBeanTypePropertyName() : s;
        }
 
        /**
@@ -1032,7 +1032,7 @@ public class BeanSession extends Session {
         *
         * @return The bean registry defined in this bean context.  Never 
<jk>null</jk>.
         */
-       public final BeanRegistry getBeanRegistry() {
+       protected final BeanRegistry getBeanRegistry() {
                return ctx.getBeanRegistry();
        }
 
@@ -1110,7 +1110,7 @@ public class BeanSession extends Session {
         *
         * @return A new or previously returned string builder.
         */
-       public final StringBuilder getStringBuilder() {
+       protected final StringBuilder getStringBuilder() {
                if (sbStack.isEmpty())
                        return new StringBuilder();
                return sbStack.pop();
@@ -1121,7 +1121,7 @@ public class BeanSession extends Session {
         *
         * @param sb The string builder to return to the pool.  No-op if 
<jk>null</jk>.
         */
-       public final void returnStringBuilder(StringBuilder sb) {
+       protected final void returnStringBuilder(StringBuilder sb) {
                if (sb == null)
                        return;
                sb.setLength(0);
@@ -1181,6 +1181,78 @@ public class BeanSession extends Session {
        
//-----------------------------------------------------------------------------------------------------------------
 
        /**
+        * Configuration property:  Beans require no-arg constructors.
+        *
+        * @see #BEAN_beansRequireDefaultConstructor
+        * @return
+        *      <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() {
+               return ctx.isBeansRequireDefaultConstructor();
+       }
+
+       /**
+        * Configuration property:  Beans require Serializable interface.
+        *
+        * @see #BEAN_beansRequireSerializable
+        * @return
+        *      <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() {
+               return ctx.isBeansRequireSerializable();
+       }
+
+       /**
+        * Configuration property:  Beans require setters for getters.
+        *
+        * @see #BEAN_beansRequireSettersForGetters
+        * @return
+        *      <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() {
+               return ctx.isBeansRequireSettersForGetters();
+       }
+
+       /**
+        * Configuration property:  Beans require at least one property.
+        *
+        * @see #BEAN_beansRequireSomeProperties
+        * @return
+        *      <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() {
+               return ctx.isBeansRequireSomeProperties();
+       }
+
+       /**
+        * Configuration property:  BeanMap.put() returns old property value.
+        *
+        * @see #BEAN_beanMapPutReturnsOldValue
+        * @return
+        *      <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() {
+               return ctx.isBeanMapPutReturnsOldValue();
+       }
+
+       /**
+        * Configuration property:  Use interface proxies.
+        *
+        * @see #BEAN_useInterfaceProxies
+        * @return
+        *      <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() {
+               return ctx.isUseInterfaceProxies();
+       }
+
+       /**
         * Configuration property:  Ignore unknown properties.
         *
         * @see #BEAN_ignoreUnknownBeanProperties
@@ -1188,18 +1260,190 @@ 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.
         */
-       public final boolean isIgnoreUnknownBeanProperties() {
+       protected final boolean isIgnoreUnknownBeanProperties() {
                return ctx.isIgnoreUnknownBeanProperties();
        }
 
        /**
+        * Configuration property:  Ignore unknown properties with null values.
+        *
+        * @see #BEAN_ignoreUnknownNullBeanProperties
+        * @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() {
+               return ctx.isIgnoreUnknownNullBeanProperties();
+       }
+
+       /**
+        * Configuration property:  Ignore properties without setters.
+        *
+        * <br>Otherwise, a {@code RuntimeException} is thrown.
+        *
+        * @see #BEAN_ignorePropertiesWithoutSetters
+        * @return
+        *      <jk>true</jk> if trying to set a value on a bean property 
without a setter is silently ignored.
+        */
+       protected final boolean isIgnorePropertiesWithoutSetters() {
+               return ctx.isIgnorePropertiesWithoutSetters();
+       }
+
+       /**
+        * Configuration property:  Ignore invocation errors on getters.
+        *
+        * @see #BEAN_ignoreInvocationExceptionsOnGetters
+        * @return
+        *      <jk>true</jk> if errors thrown when calling bean getter methods 
are silently ignored.
+        */
+       protected final boolean isIgnoreInvocationExceptionsOnGetters() {
+               return ctx.isIgnoreInvocationExceptionsOnGetters();
+       }
+
+       /**
+        * Configuration property:  Ignore invocation errors on setters.
+        *
+        * @see #BEAN_ignoreInvocationExceptionsOnSetters
+        * @return
+        *      <jk>true</jk> if errors thrown when calling bean setter methods 
are silently ignored.
+        */
+       protected final boolean isIgnoreInvocationExceptionsOnSetters() {
+               return ctx.isIgnoreInvocationExceptionsOnSetters();
+       }
+
+       /**
+        * Configuration property:  Use Java Introspector.
+        *
+        * @see #BEAN_useJavaBeanIntrospector
+        * @return
+        *      <jk>true</jk> if the built-in Java bean introspector should be 
used for bean introspection.
+        */
+       protected final boolean isUseJavaBeanIntrospector() {
+               return ctx.isUseJavaBeanIntrospector();
+       }
+
+       /**
+        * Configuration property:  Use enum names.
+        *
+        * @see #BEAN_useEnumNames
+        * @return
+        *      <jk>true</jk> if enums are always serialized by name, not using 
{@link Object#toString()}.
+        */
+       protected final boolean isUseEnumNames() {
+               return ctx.isUseEnumNames();
+       }
+
+       /**
+        * Configuration property:  Sort bean properties.
+        *
+        * @see #BEAN_sortProperties
+        * @return
+        *      <jk>true</jk> if all bean properties will be serialized and 
access in alphabetical order.
+        */
+       protected final boolean isSortProperties() {
+               return ctx.isSortProperties();
+       }
+
+       /**
+        * Configuration property:  Find fluent setters.
+        *
+        * <h5 class='section'>Description:</h5>
+        * <p>
+        *
+        * @see #BEAN_fluentSetters
+        * @return
+        *      <jk>true</jk> if fluent setters are detected on beans.
+        */
+       protected final boolean isFluentSetters() {
+               return ctx.isFluentSetters();
+       }
+
+       /**
+        * Configuration property:  Minimum bean constructor visibility.
+        *
+        * @see #BEAN_beanConstructorVisibility
+        * @return
+        *      Only look for constructors with this specified minimum 
visibility.
+        */
+       protected final Visibility getBeanConstructorVisibility() {
+               return ctx.getBeanConstructorVisibility();
+       }
+
+       /**
+        * Configuration property:  Minimum bean class visibility.
+        *
+        * @see #BEAN_beanClassVisibility
+        * @return
+        *      Classes are not considered beans unless they meet the minimum 
visibility requirements.
+        */
+       protected final Visibility getBeanClassVisibility() {
+               return ctx.getBeanClassVisibility();
+       }
+
+       /**
+        * Configuration property:  Minimum bean method visibility.
+        *
+        * @see #BEAN_beanMethodVisibility
+        * @return
+        *      Only look for bean methods with this specified minimum 
visibility.
+        */
+       protected final Visibility getBeanMethodVisibility() {
+               return ctx.getBeanMethodVisibility();
+       }
+
+       /**
+        * Configuration property:  Minimum bean field visibility.
+        *
+        *
+        * @see #BEAN_beanFieldVisibility
+        * @return
+        *      Only look for bean fields with this specified minimum 
visibility.
+        */
+       protected final Visibility getBeanFieldVisibility() {
+               return ctx.getBeanFieldVisibility();
+       }
+
+       /**
+        * Configuration property:  Bean dictionary.
+        *
+        * @see #BEAN_beanDictionary
+        * @return
+        *      The list of classes that make up the bean dictionary in this 
bean context.
+        */
+       protected final List<Class<?>> getBeanDictionaryClasses() {
+               return ctx.getBeanDictionaryClasses();
+       }
+
+       /**
+        * Configuration property:  Bean property namer.
+        *
+        * @see #BEAN_propertyNamer
+        * @return
+        *      The interface used to calculate bean property names.
+        */
+       protected final PropertyNamer getPropertyNamer() {
+               return ctx.getPropertyNamer();
+       }
+
+       /**
+        * Configuration property:  Bean type property name.
+        *
+        * @see #BEAN_beanTypePropertyName
+        * @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() {
+               return ctx.getBeanTypePropertyName();
+       }
+
+
+       /**
         * Configuration property:  Debug mode.
         *
         * @see #BEAN_debug
         * @return
         *      <jk>true</jk> if debug mode is enabled.
         */
-       public final boolean isDebug() {
+       protected final boolean isDebug() {
                return debug;
        }
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParserSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParserSession.java
index 626d170..f9ec8a6 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParserSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParserSession.java
@@ -13,7 +13,6 @@
 package org.apache.juneau.json;
 
 import static org.apache.juneau.internal.StringUtils.*;
-import static org.apache.juneau.json.JsonParser.*;
 
 import java.io.*;
 import java.lang.reflect.*;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParserSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParserSession.java
index 8bf2529..810139c 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParserSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParserSession.java
@@ -12,8 +12,6 @@
 // 
***************************************************************************************************************************
 package org.apache.juneau.parser;
 
-import static org.apache.juneau.parser.ReaderParser.*;
-
 import java.io.*;
 
 import org.apache.juneau.*;
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
index 4f112a6..93c3eb4 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/XmlParserSession.java
@@ -14,14 +14,12 @@ package org.apache.juneau.xml;
 
 import static javax.xml.stream.XMLStreamConstants.*;
 import static org.apache.juneau.internal.StringUtils.*;
-import static org.apache.juneau.xml.XmlParser.*;
 import static org.apache.juneau.xml.annotation.XmlFormat.*;
 
 import java.lang.reflect.*;
 import java.util.*;
 
 import javax.xml.stream.*;
-import javax.xml.stream.util.*;
 
 import org.apache.juneau.*;
 import org.apache.juneau.parser.*;

Reply via email to