http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/1b5bde65/content/site/apidocs/org/apache/juneau/BeanContext.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/BeanContext.html b/content/site/apidocs/org/apache/juneau/BeanContext.html index 747b49e..a46e2c9 100644 --- a/content/site/apidocs/org/apache/juneau/BeanContext.html +++ b/content/site/apidocs/org/apache/juneau/BeanContext.html @@ -117,26 +117,33 @@ var activeTableTab = "activeTableTab"; </dl> <hr> <br> -<pre>public class <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.203">BeanContext</a> +<pre>public class <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.231">BeanContext</a> extends <a href="../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a></pre> <div class="block">Core class of the Juneau architecture. + <p> This class servers multiple purposes: <ul class='spaced-list'> - <li>Provides the ability to wrap beans inside <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> interfaces. - <li>Serves as a repository for metadata on POJOs, such as associated <a href="../../../org/apache/juneau/transform/BeanFilter.html" title="class in org.apache.juneau.transform"><code>beanFilters</code></a>, + <li> + Provides the ability to wrap beans inside <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> interfaces. + <li> + Serves as a repository for metadata on POJOs, such as associated <a href="../../../org/apache/juneau/transform/BeanFilter.html" title="class in org.apache.juneau.transform"><code>beanFilters</code></a>, <a href="../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau"><code>property namers</code></a>, etc... which are used to tailor how POJOs are serialized and parsed. - <li>Serves as a common utility class for all <a href="../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializers</code></a> and <a href="../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parsers</code></a> + <li> + Serves as a common utility class for all <a href="../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializers</code></a> and <a href="../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parsers</code></a> for serializing and parsing Java beans. </ul> + <p> All serializer and parser contexts extend from this context. <h5 class='topic'>Bean Contexts</h5> + Bean contexts are created through the <a href="../../../org/apache/juneau/PropertyStore.html#getContext-java.lang.Class-"><code>PropertyStore.getContext(Class)</code></a> method. These context objects are read-only, reusable, and thread-safe. The <a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau"><code>PropertyStore</code></a> class will typically cache copies of <code>Context</code> objects based on the current settings on the factory. + <p> Each bean context maintains a cache of <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> objects that describe information about classes encountered. These <code>ClassMeta</code> objects are time-consuming to construct. @@ -146,31 +153,37 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap Because of this, many of the properties defined on the <a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau"><code>BeanContext</code></a> class cannot be overridden on the session. <h5 class='topic'>Bean Sessions</h5> - <p> + Whereas <code>BeanContext</code> objects are permanent, unchangeable, cached, and thread-safe, <a href="../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau"><code>BeanSession</code></a> objects are ephemeral and not thread-safe. They are meant to be used as quickly-constructed scratchpads for creating bean maps. <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> objects can only be created through the session. <h5 class='topic'>BeanContext configuration properties</h5> + <code>BeanContexts</code> have several configuration properties that can be used to tweak behavior on how beans are handled. These are denoted as the static <jsf>BEAN_*</jsf> fields on this class. + <p> Some settings (e.g. <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beansRequireDefaultConstructor"><code>BEAN_beansRequireDefaultConstructor</code></a>) are used to differentiate between bean and non-bean classes. Attempting to create a bean map around one of these objects will throw a <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a>. The purpose for this behavior is so that the serializers can identify these non-bean classes and convert them to plain strings using the <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method. + <p> Some settings (e.g. <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanFieldVisibility"><code>BEAN_beanFieldVisibility</code></a>) are used to determine what kinds of properties are detected on beans. + <p> Some settings (e.g. <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanMapPutReturnsOldValue"><code>BEAN_beanMapPutReturnsOldValue</code></a>) change the runtime behavior of bean maps. + <p> Settings are specified using the <a href="../../../org/apache/juneau/PropertyStore.html#setProperty-java.lang.String-java.lang.Object-"><code>PropertyStore.setProperty(String, Object)</code></a> method and related convenience methods. <h5 class='section'>Example:</h5> + <p class='bcode'> <jc>// Construct a context from scratch.</jc> BeanContext beanContext = PropertyStore.<jsm>create</jsm>() @@ -186,9 +199,10 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap </p> <h5 class='topic'>Bean Maps</h5> - <p> + <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMaps</code></a> are wrappers around Java beans that allow properties to be retrieved and set using the common <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true#put-K-V-" title="class or interface in java.util"><code>Map.put(Object,Object)</code></a> and <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true#get-java.lang.Object-" title="class or interface in java.util"><code>Map.get(Object)</code></a> methods. + <p> Bean maps are created in two ways... <ol> @@ -199,6 +213,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap </ol> <h5 class='section'>Example:</h5> + <p class='bcode'> <jc>// A sample bean class</jc> <jk>public class</jk> Person { @@ -224,10 +239,12 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap </p> <h5 class='topic'>Bean Annotations</h5> - <p> + This package contains annotations that can be applied to class definitions to override what properties are detected on a bean. + <h5 class='section'>Example:</h5> + <p class='bcode'> <jc>// Bean class definition where only property 'name' is detected.</jc> <ja>@Bean</ja>(properties=<js>"name"</js>) @@ -237,53 +254,64 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <jk>public int</jk> getAge(); <jk>public void</jk> setAge(<jk>int</jk> age); } + </p> + <p> See <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> and <a href="../../../org/apache/juneau/annotation/BeanProperty.html" title="annotation in org.apache.juneau.annotation"><code>@BeanProperty</code></a> for more information. <h5 class='topic'>Beans with read-only properties</h5> - <p> + Bean maps can also be defined on top of beans with read-only properties by adding a <a href="../../../org/apache/juneau/annotation/BeanConstructor.html" title="annotation in org.apache.juneau.annotation"><code>@BeanConstructor</code></a> annotation to one of the constructors on the bean class. This will allow read-only properties to be set through constructor arguments. + <p> When the <code>@BeanConstructor</code> annotation is present, bean instantiation is delayed until the call to <a href="../../../org/apache/juneau/BeanMap.html#getBean--"><code>BeanMap.getBean()</code></a>. Until then, bean property values are stored in a local cache until <code>getBean()</code> is called. Because of this additional caching step, parsing into read-only beans tends to be slower and use more memory than parsing into beans with writable properties. + <p> Attempting to call <a href="../../../org/apache/juneau/BeanMap.html#put-java.lang.String-java.lang.Object-"><code>BeanMap.put(String,Object)</code></a> on a read-only property after calling <a href="../../../org/apache/juneau/BeanMap.html#getBean--"><code>BeanMap.getBean()</code></a> will result in a <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a> being thrown. Multiple calls to <a href="../../../org/apache/juneau/BeanMap.html#getBean--"><code>BeanMap.getBean()</code></a> will return the same bean instance. + <p> Beans can be defined with a combination of read-only and read-write properties. + <p> See <a href="../../../org/apache/juneau/annotation/BeanConstructor.html" title="annotation in org.apache.juneau.annotation"><code>@BeanConstructor</code></a> for more information. <h5 class='topic'>BeanFilters and PojoSwaps</h5> - <p> + <a href="../../../org/apache/juneau/transform/BeanFilter.html" title="class in org.apache.juneau.transform"><code>BeanFilters</code></a> and <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwaps</code></a> are used to tailor how beans and POJOs are handled. <ol class='spaced-list'> - <li><a href="../../../org/apache/juneau/transform/BeanFilter.html" title="class in org.apache.juneau.transform"><code>BeanFilter</code></a> - Allows you to tailor handling of bean classes. + <li> + <a href="../../../org/apache/juneau/transform/BeanFilter.html" title="class in org.apache.juneau.transform"><code>BeanFilter</code></a> - Allows you to tailor handling of bean classes. This class can be considered a programmatic equivalent to the <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>Bean</code></a> annotation when annotating classes are not possible (e.g. you don't have access to the source). This includes specifying which properties are visible and the ability to programmatically override the execution of properties. - <li><a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a> - Allows you to swap out non-serializable objects with serializable replacements. + <li> + <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a> - Allows you to swap out non-serializable objects with serializable replacements. </ol> + <p> See <a class='doclink' href='transform/package-summary.html#TOC'>org.apache.juneau.transform</a> for more information. <h5 class='topic'>ClassMetas</h5> - <p> + The <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> class is a wrapper around <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> object that provides cached information about that class (e.g. whether it's a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> or bean). + <p> As a general rule, it's best to reuse bean contexts (and therefore serializers and parsers too) whenever possible since it takes some time to populate the internal <code>ClassMeta</code> object cache. By reusing bean contexts, the class type metadata only needs to be calculated once which significantly improves performance. + <p> See <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> for more information.</div> </li> @@ -728,8 +756,8 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <tr id="i18" class="altColor"> <td class="colFirst"><code>protected boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanContext.html#isNotABean-java.lang.Class-">isNotABean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> c)</code> -<div class="block">Determines whether the specified class is ignored as a bean class based on the various - exclusion parameters specified on this context class.</div> +<div class="block">Determines whether the specified class is ignored as a bean class based on the various exclusion parameters + specified on this context class.</div> </td> </tr> <tr id="i19" class="rowColor"> @@ -787,17 +815,19 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beansRequireDefaultConstructor</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.219">BEAN_beansRequireDefaultConstructor</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.249">BEAN_beansRequireDefaultConstructor</a></pre> <div class="block"><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. + <p> The <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a class to override this setting when <jk>true</jk>.</div> <dl> @@ -812,17 +842,19 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beansRequireSerializable</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.235">BEAN_beansRequireSerializable</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.267">BEAN_beansRequireSerializable</a></pre> <div class="block"><b>Configuration property:</b> Beans require <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> 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 <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> interface to be considered a bean. + <p> The <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a class to override this setting when <jk>true</jk>.</div> <dl> @@ -837,15 +869,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beansRequireSettersForGetters</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.250">BEAN_beansRequireSettersForGetters</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.283">BEAN_beansRequireSettersForGetters</a></pre> <div class="block"><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.</div> @@ -861,17 +894,19 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beansRequireSomeProperties</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.266">BEAN_beansRequireSomeProperties</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.301">BEAN_beansRequireSomeProperties</a></pre> <div class="block"><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. + <p> The <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation can be used on a class to override this setting when <jk>true</jk>.</div> <dl> @@ -886,19 +921,21 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanMapPutReturnsOldValue</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.284">BEAN_beanMapPutReturnsOldValue</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.321">BEAN_beanMapPutReturnsOldValue</a></pre> <div class="block"><b>Configuration property:</b> <a href="../../../org/apache/juneau/BeanMap.html#put-java.lang.String-java.lang.Object-"><code>BeanMap.put()</code></a> 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 <a href="../../../org/apache/juneau/BeanMap.html#put-java.lang.String-java.lang.Object-"><code>BeanMap.put()</code></a> method will return old property values. + <p> Disabled by default because it introduces a slight performance penalty.</div> <dl> @@ -913,16 +950,15 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanConstructorVisibility</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.297">BEAN_beanConstructorVisibility</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.333">BEAN_beanConstructorVisibility</a></pre> <div class="block"><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> <a href="../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau"><code>Visibility</code></a> <li><b>Default:</b> <a href="../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a> <li><b>Session-overridable:</b> <jk>false</jk> - </ul> - <p></div> + </ul></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#org.apache.juneau.BeanContext.BEAN_beanConstructorVisibility">Constant Field Values</a></dd> @@ -935,19 +971,20 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanClassVisibility</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.313">BEAN_beanClassVisibility</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.350">BEAN_beanClassVisibility</a></pre> <div class="block"><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> <a href="../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau"><code>Visibility</code></a> <li><b>Default:</b> <a href="../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a> <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.</div> + 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.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#org.apache.juneau.BeanContext.BEAN_beanClassVisibility">Constant Field Values</a></dd> @@ -960,19 +997,21 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanFieldVisibility</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.331">BEAN_beanFieldVisibility</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.370">BEAN_beanFieldVisibility</a></pre> <div class="block"><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> <a href="../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau"><code>Visibility</code></a> <li><b>Default:</b> <a href="../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a> <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. + 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> Use <a href="../../../org/apache/juneau/Visibility.html#NONE"><code>Visibility.NONE</code></a> to prevent bean fields from being interpreted as bean properties altogether.</div> <dl> @@ -987,19 +1026,20 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_methodVisibility</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.347">BEAN_methodVisibility</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.387">BEAN_methodVisibility</a></pre> <div class="block"><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> <a href="../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau"><code>Visibility</code></a> <li><b>Default:</b> <a href="../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a> <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.</div> + 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.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#org.apache.juneau.BeanContext.BEAN_methodVisibility">Constant Field Values</a></dd> @@ -1012,15 +1052,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_useJavaBeanIntrospector</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.362">BEAN_useJavaBeanIntrospector</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.403">BEAN_useJavaBeanIntrospector</a></pre> <div class="block"><b>Configuration property:</b> Use Java <a href="http://docs.oracle.com/javase/7/docs/api/java/beans/Introspector.html?is-external=true" title="class or interface in java.beans"><code>Introspector</code></a> 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. Most <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotations will be ignored.</div> @@ -1036,15 +1077,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_useInterfaceProxies</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.377">BEAN_useInterfaceProxies</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.419">BEAN_useInterfaceProxies</a></pre> <div class="block"><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 <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/InvocationHandler.html?is-external=true" title="class or interface in java.lang.reflect"><code>InvocationHandler</code></a> if there is no other way of instantiating them.</div> @@ -1060,15 +1102,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_ignoreUnknownBeanProperties</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.392">BEAN_ignoreUnknownBeanProperties</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.435">BEAN_ignoreUnknownBeanProperties</a></pre> <div class="block"><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>RuntimeException</code> is thrown.</div> @@ -1084,15 +1127,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_ignoreUnknownNullBeanProperties</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.407">BEAN_ignoreUnknownNullBeanProperties</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.451">BEAN_ignoreUnknownNullBeanProperties</a></pre> <div class="block"><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>RuntimeException</code> is thrown.</div> @@ -1108,15 +1152,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_ignorePropertiesWithoutSetters</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.422">BEAN_ignorePropertiesWithoutSetters</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.467">BEAN_ignorePropertiesWithoutSetters</a></pre> <div class="block"><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>RuntimeException</code> is thrown.</div> @@ -1132,15 +1177,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_ignoreInvocationExceptionsOnGetters</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.437">BEAN_ignoreInvocationExceptionsOnGetters</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.483">BEAN_ignoreInvocationExceptionsOnGetters</a></pre> <div class="block"><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</code> is thrown.</div> @@ -1156,15 +1202,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_ignoreInvocationExceptionsOnSetters</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.452">BEAN_ignoreInvocationExceptionsOnSetters</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.499">BEAN_ignoreInvocationExceptionsOnSetters</a></pre> <div class="block"><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</code> is thrown.</div> @@ -1180,21 +1227,22 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_sortProperties</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.474">BEAN_sortProperties</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.522">BEAN_sortProperties</a></pre> <div class="block"><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. + 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 official JVM specs). + <p> This property is disabled by default so that IBM JVM users don't have to use <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotations to force bean properties to be in a particular order and can just alter the order of the fields/methods @@ -1211,9 +1259,9 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_notBeanPackages</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.502">BEAN_notBeanPackages</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.553">BEAN_notBeanPackages</a></pre> <div class="block"><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> @@ -1230,10 +1278,13 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap </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 <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a>. + <p> Note that you can specify prefix patterns to include all subpackages.</div> <dl> @@ -1248,7 +1299,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_notBeanPackages_add</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.507">BEAN_notBeanPackages_add</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.558">BEAN_notBeanPackages_add</a></pre> <div class="block"><b>Configuration property:</b> Add to packages whose classes should not be considered beans.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1262,7 +1313,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_notBeanPackages_remove</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.512">BEAN_notBeanPackages_remove</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.563">BEAN_notBeanPackages_remove</a></pre> <div class="block"><b>Configuration property:</b> Remove from packages whose classes should not be considered beans.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1276,18 +1327,19 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_notBeanClasses</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.527">BEAN_notBeanClasses</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.579">BEAN_notBeanClasses</a></pre> <div class="block"><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.</div> + Not-bean classes are typically converted to <code>Strings</code> during serialization even if they appear to be + bean-like.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#org.apache.juneau.BeanContext.BEAN_notBeanClasses">Constant Field Values</a></dd> @@ -1300,7 +1352,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_notBeanClasses_add</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.532">BEAN_notBeanClasses_add</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.584">BEAN_notBeanClasses_add</a></pre> <div class="block"><b>Configuration property:</b> Add to classes that should not be considered beans.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1314,7 +1366,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_notBeanClasses_remove</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.537">BEAN_notBeanClasses_remove</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.589">BEAN_notBeanClasses_remove</a></pre> <div class="block"><b>Configuration property:</b> Remove from classes that should not be considered beans.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1328,25 +1380,29 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanFilters</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.563">BEAN_beanFilters</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.619">BEAN_beanFilters</a></pre> <div class="block"><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 <a href="../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> 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. + 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 <a href="../../../org/apache/juneau/transform/BeanFilterBuilder.html" title="class in org.apache.juneau.transform"><code>BeanFilterBuilder</code></a>. + <li> + Subclasses of <a href="../../../org/apache/juneau/transform/BeanFilterBuilder.html" title="class in org.apache.juneau.transform"><code>BeanFilterBuilder</code></a>. These must have a public no-arg constructor. - <li>Bean interface classes. + <li> + Bean interface classes. A shortcut for defining a <a href="../../../org/apache/juneau/transform/InterfaceBeanFilterBuilder.html" title="class in org.apache.juneau.transform"><code>InterfaceBeanFilterBuilder</code></a>. Any subclasses of an interface class will only have properties defined on the interface. All other bean properties will be ignored. @@ -1363,7 +1419,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanFilters_add</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.568">BEAN_beanFilters_add</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.624">BEAN_beanFilters_add</a></pre> <div class="block"><b>Configuration property:</b> Add to bean filters.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1377,7 +1433,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanFilters_remove</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.573">BEAN_beanFilters_remove</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.629">BEAN_beanFilters_remove</a></pre> <div class="block"><b>Configuration property:</b> Remove from bean filters.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1391,15 +1447,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_pojoSwaps</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.591">BEAN_pojoSwaps</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.648">BEAN_pojoSwaps</a></pre> <div class="block"><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> @@ -1418,7 +1475,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_pojoSwaps_add</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.596">BEAN_pojoSwaps_add</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.653">BEAN_pojoSwaps_add</a></pre> <div class="block"><b>Configuration property:</b> Add to POJO swap classes.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1432,7 +1489,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_pojoSwaps_remove</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.601">BEAN_pojoSwaps_remove</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.658">BEAN_pojoSwaps_remove</a></pre> <div class="block"><b>Configuration property:</b> Remove from POJO swap classes.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1446,19 +1503,20 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_implClasses</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.617">BEAN_implClasses</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.675">BEAN_implClasses</a></pre> <div class="block"><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).</div> + 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).</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#org.apache.juneau.BeanContext.BEAN_implClasses">Constant Field Values</a></dd> @@ -1471,7 +1529,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_implClasses_put</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.622">BEAN_implClasses_put</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.680">BEAN_implClasses_put</a></pre> <div class="block"><b>Configuration property:</b> Add an implementation class.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1485,24 +1543,28 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_includeProperties</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.645">BEAN_includeProperties</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.707">BEAN_includeProperties</a></pre> <div class="block"><b>Configuration property:</b> Explicitly specify visible bean properties. - <p> + <ul> <li><b>Name:</b> <js>"BeanContext.includeProperties"</js> <li><b>Data type:</b> <code>Map<String,String></code> <li><b>Default:</b> <code>{}</code> <li><b>Session-overridable:</b> <jk>false</jk> </ul> + <p> Specifies to only include the specified list of properties for the specified bean classes. + <p> The keys are either fully-qualified or simple class names, and the values are comma-delimited lists of property names. The key <js>"*"</js> means all bean classes. + <p> For example, <code>{Bean1:<js>'foo,bar'</js>}</code> means only serialize the <code>foo</code> and <code>bar</code> properties on the specified bean. + <p> Setting applies to specified class and all subclasses.</div> <dl> @@ -1517,7 +1579,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_includeProperties_put</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.650">BEAN_includeProperties_put</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.712">BEAN_includeProperties_put</a></pre> <div class="block"><b>Configuration property:</b> Explicitly specify visible bean properties.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1531,24 +1593,28 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_excludeProperties</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.673">BEAN_excludeProperties</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.739">BEAN_excludeProperties</a></pre> <div class="block"><b>Configuration property:</b> Exclude specified properties from beans. - <p> + <ul> <li><b>Name:</b> <js>"BeanContext.excludeProperties"</js> <li><b>Data type:</b> <code>Map<String,String></code> <li><b>Default:</b> <code>{}</code> <li><b>Session-overridable:</b> <jk>false</jk> </ul> + <p> Specifies to exclude the specified list of properties for the specified bean class. + <p> The keys are either fully-qualified or simple class names, and the values are comma-delimited lists of property names. The key <js>"*"</js> means all bean classes. + <p> For example, <code>{Bean1:<js>'foo,bar'</js>}</code> means don't serialize the <code>foo</code> and <code>bar</code> properties on the specified bean. + <p> Setting applies to specified class and all subclasses.</div> <dl> @@ -1563,7 +1629,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_excludeProperties_put</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.678">BEAN_excludeProperties_put</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.744">BEAN_excludeProperties_put</a></pre> <div class="block"><b>Configuration property:</b> Exclude specified properties from beans.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1577,15 +1643,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanDictionary</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.699">BEAN_beanDictionary</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.766">BEAN_beanDictionary</a></pre> <div class="block"><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> @@ -1607,7 +1674,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanDictionary_add</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.704">BEAN_beanDictionary_add</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.771">BEAN_beanDictionary_add</a></pre> <div class="block"><b>Configuration property:</b> Add to bean dictionary.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1621,7 +1688,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanDictionary_remove</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.709">BEAN_beanDictionary_remove</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.776">BEAN_beanDictionary_remove</a></pre> <div class="block"><b>Configuration property:</b> Remove from bean dictionary.</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> @@ -1635,16 +1702,15 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_beanTypePropertyName</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.722">BEAN_beanTypePropertyName</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.788">BEAN_beanTypePropertyName</a></pre> <div class="block"><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></div> + </ul></div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../constant-values.html#org.apache.juneau.BeanContext.BEAN_beanTypePropertyName">Constant Field Values</a></dd> @@ -1657,15 +1723,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_defaultParser</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.736">BEAN_defaultParser</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.803">BEAN_defaultParser</a></pre> <div class="block"><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> <a href="../../../org/apache/juneau/json/JsonSerializer.html" title="class in org.apache.juneau.json"><code>JsonSerializer</code></a> <li><b>Session-overridable:</b> <jk>false</jk> </ul> + <p> Used in the in the <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Class-"><code>BeanSession.convertToType(Object, Class)</code></a> method.</div> <dl> @@ -1680,15 +1747,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_locale</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.750">BEAN_locale</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.818">BEAN_locale</a></pre> <div class="block"><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> Used in the in the <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Class-"><code>BeanSession.convertToType(Object, Class)</code></a> method.Ã</div> <dl> @@ -1703,15 +1771,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_timeZone</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.764">BEAN_timeZone</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.833">BEAN_timeZone</a></pre> <div class="block"><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> Used in the in the <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Class-"><code>BeanSession.convertToType(Object, Class)</code></a> method.Ã</div> <dl> @@ -1726,15 +1795,16 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_mediaType</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.778">BEAN_mediaType</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.848">BEAN_mediaType</a></pre> <div class="block"><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.</div> <dl> @@ -1749,26 +1819,31 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>BEAN_debug</h4> -<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.803">BEAN_debug</a></pre> +<pre>public static final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.878">BEAN_debug</a></pre> <div class="block"><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 + <li> + When bean getters throws exceptions, the exception includes the object stack information in order to determine how that method was invoked. - <li>Enables <a href="../../../org/apache/juneau/serializer/SerializerContext.html#SERIALIZER_detectRecursions"><code>SerializerContext.SERIALIZER_detectRecursions</code></a>. + <li> + Enables <a href="../../../org/apache/juneau/serializer/SerializerContext.html#SERIALIZER_detectRecursions"><code>SerializerContext.SERIALIZER_detectRecursions</code></a>. </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 + <li> + When bean setters throws exceptions, the exception includes the object stack information in order to determine how that method was invoked. </ul></div> <dl> @@ -1783,7 +1858,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>DEFAULT</h4> -<pre>public static final <a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.850">DEFAULT</a></pre> +<pre>public static final <a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.925">DEFAULT</a></pre> <div class="block">Default config. All default settings.</div> </li> </ul> @@ -1793,7 +1868,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockListLast"> <li class="blockList"> <h4>DEFAULT_SORTED</h4> -<pre>public static final <a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.853">DEFAULT_SORTED</a></pre> +<pre>public static final <a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.928">DEFAULT_SORTED</a></pre> <div class="block">Default config. All default settings except sort bean properties.</div> </li> </ul> @@ -1811,8 +1886,9 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockListLast"> <li class="blockList"> <h4>BeanContext</h4> -<pre>public <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.909">BeanContext</a>(<a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> ps)</pre> +<pre>public <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.985">BeanContext</a>(<a href="../../../org/apache/juneau/PropertyStore.html" title="class in org.apache.juneau">PropertyStore</a> ps)</pre> <div class="block">Constructor. + <p> Typically only called from <a href="../../../org/apache/juneau/PropertyStore.html#getContext-java.lang.Class-"><code>PropertyStore.getContext(Class)</code></a> or <a href="../../../org/apache/juneau/PropertyStore.html#getBeanContext--"><code>PropertyStore.getBeanContext()</code></a>.</div> <dl> @@ -1835,7 +1911,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>createSession</h4> -<pre>public <a href="../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau">BeanSession</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1019">createSession</a>(<a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> op, +<pre>public <a href="../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau">BeanSession</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1098">createSession</a>(<a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> op, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> timeZone, <a href="../../../org/apache/juneau/http/MediaType.html" title="class in org.apache.juneau.http">MediaType</a> mediaType)</pre> @@ -1843,14 +1919,14 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>op</code> - The override properties. - This map can contain values to override properties defined on this context. - Note that only session-overridable settings can be overridden.</dd> + This map can contain values to override properties defined on this context. + Note that only session-overridable settings can be overridden.</dd> <dd><code>locale</code> - The bean session locale. - Typically used by <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwaps</code></a> to provide locale-specific output. - If <jk>null</jk>, the system default locale is assumed.</dd> + Typically used by <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwaps</code></a> to provide locale-specific output. + If <jk>null</jk>, the system default locale is assumed.</dd> <dd><code>timeZone</code> - The bean session timezone. - Typically used by time-sensitive <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwaps</code></a> to provide timezone-specific output. - If <jk>null</jk> the system default timezone is assumed on <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a> objects, or the + Typically used by time-sensitive <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwaps</code></a> to provide timezone-specific output. + If <jk>null</jk> the system default timezone is assumed on <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a> objects, or the locale specified on <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util"><code>Calendar</code></a> objects are used.</dd> <dd><code>mediaType</code> - The session media type (e.g. <js>"application/json"</js>).</dd> <dt><span class="returnLabel">Returns:</span></dt> @@ -1864,8 +1940,9 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>createSession</h4> -<pre>public <a href="../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau">BeanSession</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1031">createSession</a>()</pre> +<pre>public <a href="../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau">BeanSession</a> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1111">createSession</a>()</pre> <div class="block">Create a new bean session based on the properties defined on this context. + <p> Use this method for creating sessions if you don't need to override any properties or locale/timezone currently set on this context.</div> @@ -1881,8 +1958,10 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>hasSameCache</h4> -<pre>public final boolean <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1042">hasSameCache</a>(<a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> bc)</pre> +<pre>public final boolean <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1124">hasSameCache</a>(<a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> bc)</pre> <div class="block">Returns <jk>true</jk> if the specified bean context shares the same cache as this bean context. + + <p> Useful for testing purposes.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -1898,9 +1977,9 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>isNotABean</h4> -<pre>protected final boolean <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1053">isNotABean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> c)</pre> -<div class="block">Determines whether the specified class is ignored as a bean class based on the various - exclusion parameters specified on this context class.</div> +<pre>protected final boolean <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1135">isNotABean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> c)</pre> +<div class="block">Determines whether the specified class is ignored as a bean class based on the various exclusion parameters + specified on this context class.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>c</code> - The class type being tested.</dd> @@ -1915,7 +1994,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>isBean</h4> -<pre>public boolean <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1077">isBean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</pre> +<pre>public boolean <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1159">isBean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</pre> <div class="block">Returns <jk>true</jk> if the specified object is a bean.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -1931,7 +2010,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>dumpCacheStats</h4> -<pre>protected static void <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1086">dumpCacheStats</a>()</pre> +<pre>protected static void <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1168">dumpCacheStats</a>()</pre> <div class="block">Prints meta cache statistics to <code>System.out</code>.</div> </li> </ul> @@ -1941,7 +2020,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>getBeanMeta</h4> -<pre>public final <T> <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau">BeanMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1105">getBeanMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> +<pre>public final <T> <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau">BeanMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1188">getBeanMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> <div class="block">Returns the <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau"><code>BeanMeta</code></a> class for the specified class.</div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> @@ -1949,8 +2028,8 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>c</code> - The class to get the meta-data on.</dd> <dt><span class="returnLabel">Returns:</span></dt> -<dd>The <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau"><code>BeanMeta</code></a> for the specified class, or <jk>null</jk> if the class - is not a bean per the settings on this context.</dd> +<dd>The <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau"><code>BeanMeta</code></a> for the specified class, or <jk>null</jk> if the class is not a bean per the settings on + this context.</dd> </dl> </li> </ul> @@ -1960,7 +2039,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>getClassMeta</h4> -<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1119">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</pre> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1203">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</pre> <div class="block">Construct a <code>ClassMeta</code> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> object.</div> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> @@ -1969,7 +2048,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <dd><code>type</code> - The class to resolve.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>If the class is not an array, returns a cached <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object. - Otherwise, returns a new <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object every time.</dd> + Otherwise, returns a new <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object every time.</dd> </dl> </li> </ul> @@ -1979,14 +2058,17 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>getClassMeta</h4> -<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1194">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1285">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args)</pre> <div class="block">Used to resolve <code>ClassMetas</code> of type <code>Collection</code> and <code>Map</code> that have <code>ClassMeta</code> values that themselves could be collections or maps. + <p> <code>Collection</code> meta objects are assumed to be followed by zero or one meta objects indicating the element type. + <p> <code>Map</code> meta objects are assumed to be followed by zero or two meta objects indicating the key and value types. + <p> The array can be arbitrarily long to indicate arbitrarily complex data structures. @@ -2027,7 +2109,7 @@ extends <a href="../../../org/apache/juneau/Context.html" title="class in org.ap <ul class="blockList"> <li class="blockList"> <h4>getClassMetaForObject</h4> -<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanContext.html#line.1378">getClassMetaForObject</a>(T o)</pre> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in
<TRUNCATED>
