blob: 017183b44b0b53f07383a049596c27a5d8ba5e1b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ReaderParser.Builder (Apache Juneau 9.0.0)</title>
<link rel="stylesheet" type="text/css" href="../../../../javadoc.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ReaderParser.Builder (Apache Juneau 9.0.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/juneau/parser/ReaderParserSession.html" title="class in org.apache.juneau.parser"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/juneau/parser/ReaderParser.Builder.html" target="_top">Frames</a></li>
<li><a href="ReaderParser.Builder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.juneau.parser</div>
<h2 title="Class ReaderParser.Builder" class="title">Class ReaderParser.Builder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/juneau/Context.Builder.html" title="class in org.apache.juneau">org.apache.juneau.Context.Builder</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/juneau/BeanContextable.Builder.html" title="class in org.apache.juneau">org.apache.juneau.BeanContextable.Builder</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">org.apache.juneau.parser.Parser.Builder</a></li>
<li>
<ul class="inheritance">
<li>org.apache.juneau.parser.ReaderParser.Builder</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/apache/juneau/csv/CsvParser.Builder.html" title="class in org.apache.juneau.csv">CsvParser.Builder</a>, <a href="../../../../org/apache/juneau/json/JsonParser.Builder.html" title="class in org.apache.juneau.json">JsonParser.Builder</a>, <a href="../../../../org/apache/juneau/plaintext/PlainTextParser.Builder.html" title="class in org.apache.juneau.plaintext">PlainTextParser.Builder</a>, <a href="../../../../org/apache/juneau/uon/UonParser.Builder.html" title="class in org.apache.juneau.uon">UonParser.Builder</a>, <a href="../../../../org/apache/juneau/xml/XmlParser.Builder.html" title="class in org.apache.juneau.xml">XmlParser.Builder</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a></dd>
</dl>
<hr>
<br>
<pre>public static class <a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.html#line.69">ReaderParser.Builder</a>
extends <a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></pre>
<div class="block">Builder class.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#Builder--">Builder</a></span>()</code>
<div class="block">Constructor, default settings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#Builder-org.apache.juneau.parser.ReaderParser.Builder-">Builder</a></span>(<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;copyFrom)</code>
<div class="block">Copy constructor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#Builder-org.apache.juneau.parser.ReaderParser-">Builder</a></span>(<a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a>&nbsp;copyFrom)</code>
<div class="block">Copy constructor.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#annotations-java.lang.annotation.Annotation...-">annotations</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>...&nbsp;values)</code>
<div class="block">Defines annotations to apply to specific classes and methods.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#apply-org.apache.juneau.AnnotationWorkList-">apply</a></span>(<a href="../../../../org/apache/juneau/AnnotationWorkList.html" title="class in org.apache.juneau">AnnotationWorkList</a>&nbsp;work)</code>
<div class="block">Applies a set of applied to this builder.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#applyAnnotations-java.lang.Class...-">applyAnnotations</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;fromClasses)</code>
<div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified class to this context.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#applyAnnotations-java.lang.reflect.Method...-">applyAnnotations</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>...&nbsp;fromMethods)</code>
<div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified method to this context.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#autoCloseStreams--">autoCloseStreams</a></span>()</code>
<div class="block">Auto-close streams.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#autoCloseStreams-boolean-">autoCloseStreams</a></span>(boolean&nbsp;value)</code>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#autoCloseStreams--"><code>Parser.Builder.autoCloseStreams()</code></a> but allows you to explicitly specify the value.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanClassVisibility-org.apache.juneau.Visibility-">beanClassVisibility</a></span>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</code>
<div class="block">Minimum bean class visibility.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanConstructorVisibility-org.apache.juneau.Visibility-">beanConstructorVisibility</a></span>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</code>
<div class="block">Minimum bean constructor visibility.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanContext-org.apache.juneau.BeanContext.Builder-">beanContext</a></span>(<a href="../../../../org/apache/juneau/BeanContext.Builder.html" title="class in org.apache.juneau">BeanContext.Builder</a>&nbsp;value)</code>
<div class="block">Overrides the bean context builder.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanContext-org.apache.juneau.BeanContext-">beanContext</a></span>(<a href="../../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a>&nbsp;value)</code>
<div class="block">Specifies an already-instantiated bean context to use.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanDictionary-java.lang.Class...-">beanDictionary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</code>
<div class="block">Bean dictionary.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanFieldVisibility-org.apache.juneau.Visibility-">beanFieldVisibility</a></span>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</code>
<div class="block">Minimum bean field visibility.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanInterceptor-java.lang.Class-java.lang.Class-">beanInterceptor</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/swap/BeanInterceptor.html" title="class in org.apache.juneau.swap">BeanInterceptor</a>&lt;?&gt;&gt;&nbsp;value)</code>
<div class="block">Bean interceptor.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanMapPutReturnsOldValue--">beanMapPutReturnsOldValue</a></span>()</code>
<div class="block">BeanMap.put() returns old property value.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanMethodVisibility-org.apache.juneau.Visibility-">beanMethodVisibility</a></span>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</code>
<div class="block">Minimum bean method visibility.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanProperties-java.lang.Class-java.lang.String-">beanProperties</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Bean property includes.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanProperties-java.util.Map-">beanProperties</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</code>
<div class="block">Bean property includes.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanProperties-java.lang.String-java.lang.String-">beanProperties</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Bean property includes.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-">beanPropertiesExcludes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Bean property excludes.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesExcludes-java.util.Map-">beanPropertiesExcludes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</code>
<div class="block">Bean property excludes.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesExcludes-java.lang.String-java.lang.String-">beanPropertiesExcludes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Bean property excludes.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesReadOnly-java.lang.Class-java.lang.String-">beanPropertiesReadOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Read-only bean properties.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesReadOnly-java.util.Map-">beanPropertiesReadOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</code>
<div class="block">Read-only bean properties.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesReadOnly-java.lang.String-java.lang.String-">beanPropertiesReadOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Read-only bean properties.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesWriteOnly-java.lang.Class-java.lang.String-">beanPropertiesWriteOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Write-only bean properties.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesWriteOnly-java.util.Map-">beanPropertiesWriteOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</code>
<div class="block">Write-only bean properties.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beanPropertiesWriteOnly-java.lang.String-java.lang.String-">beanPropertiesWriteOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</code>
<div class="block">Write-only bean properties.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beansRequireDefaultConstructor--">beansRequireDefaultConstructor</a></span>()</code>
<div class="block">Beans require no-arg constructors.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beansRequireSerializable--">beansRequireSerializable</a></span>()</code>
<div class="block">Beans require Serializable interface.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#beansRequireSettersForGetters--">beansRequireSettersForGetters</a></span>()</code>
<div class="block">Beans require setters for getters.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#build--">build</a></span>()</code>
<div class="block">Build the object.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#cache-org.apache.juneau.internal.Cache-">cache</a></span>(<a href="../../../../org/apache/juneau/internal/Cache.html" title="class in org.apache.juneau.internal">Cache</a>&lt;<a href="../../../../org/apache/juneau/utils/HashKey.html" title="class in org.apache.juneau.utils">HashKey</a>,? extends <a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>&gt;&nbsp;value)</code>
<div class="block">Specifies a cache to use for hashkey-based caching.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#consumes-java.lang.String-">consumes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Specifies the media type that this parser consumes.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#copy--">copy</a></span>()</code>
<div class="block">Copy creator.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#debug--">debug</a></span>()</code>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> Debug mode.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#debug-boolean-">debug</a></span>(boolean&nbsp;value)</code>
<div class="block">Same as <a href="../../../../org/apache/juneau/Context.Builder.html#debug--"><code>Context.Builder.debug()</code></a> but allows you to explicitly specify the value.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#debugOutputLines-int-">debugOutputLines</a></span>(int&nbsp;value)</code>
<div class="block">Debug output lines.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#dictionaryOn-java.lang.Class-java.lang.Class...-">dictionaryOn</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</code>
<div class="block">Bean dictionary.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#disableBeansRequireSomeProperties--">disableBeansRequireSomeProperties</a></span>()</code>
<div class="block">Beans don't require at least one property.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#disableIgnoreMissingSetters--">disableIgnoreMissingSetters</a></span>()</code>
<div class="block">Don't silently ignore missing setters.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#disableIgnoreTransientFields--">disableIgnoreTransientFields</a></span>()</code>
<div class="block">Don't ignore transient fields.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#disableIgnoreUnknownNullBeanProperties--">disableIgnoreUnknownNullBeanProperties</a></span>()</code>
<div class="block">Don't ignore unknown properties with null values.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#disableInterfaceProxies--">disableInterfaceProxies</a></span>()</code>
<div class="block">Don't use interface proxies.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#example-java.lang.Class-java.lang.String-">example</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;pojoClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;json)</code>
<div class="block">POJO example.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#example-java.lang.Class-T-">example</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;pojoClass,
T&nbsp;o)</code>
<div class="block">POJO example.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#fileCharset-java.nio.charset.Charset-">fileCharset</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;value)</code>
<div class="block">File charset.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#findFluentSetters--">findFluentSetters</a></span>()</code>
<div class="block">Find fluent setters.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#findFluentSetters-java.lang.Class-">findFluentSetters</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on)</code>
<div class="block">Find fluent setters.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/utils/HashKey.html" title="class in org.apache.juneau.utils">HashKey</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#hashKey--">hashKey</a></span>()</code>
<div class="block">Returns the hashkey of this builder.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#ignoreInvocationExceptionsOnGetters--">ignoreInvocationExceptionsOnGetters</a></span>()</code>
<div class="block">Ignore invocation errors on getters.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#ignoreInvocationExceptionsOnSetters--">ignoreInvocationExceptionsOnSetters</a></span>()</code>
<div class="block">Ignore invocation errors on setters.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#ignoreUnknownBeanProperties--">ignoreUnknownBeanProperties</a></span>()</code>
<div class="block">Ignore unknown properties.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#ignoreUnknownEnumValues--">ignoreUnknownEnumValues</a></span>()</code>
<div class="block">Ignore unknown enum values.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#impl-org.apache.juneau.Context-">impl</a></span>(<a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>&nbsp;value)</code>
<div class="block">Specifies a pre-instantiated bean for the <a href="../../../../org/apache/juneau/Context.Builder.html#build--"><code>Context.Builder.build()</code></a> method to return.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#implClass-java.lang.Class-java.lang.Class-">implClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;interfaceClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;implClass)</code>
<div class="block">Implementation classes.</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#implClasses-java.util.Map-">implClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;values)</code>
<div class="block">Implementation classes.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#interfaceClass-java.lang.Class-java.lang.Class-">interfaceClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;value)</code>
<div class="block">Identifies a class to be used as the interface class for the specified class and all subclasses.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#interfaces-java.lang.Class...-">interfaces</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;value)</code>
<div class="block">Identifies a set of interfaces.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#listener-java.lang.Class-">listener</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/parser/ParserListener.html" title="class in org.apache.juneau.parser">ParserListener</a>&gt;&nbsp;value)</code>
<div class="block">Parser listener.</div>
</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#locale-java.util.Locale-">locale</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;value)</code>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> Locale.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#mediaType-org.apache.juneau.MediaType-">mediaType</a></span>(<a href="../../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a>&nbsp;value)</code>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> Media type.</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#notBeanClasses-java.lang.Class...-">notBeanClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</code>
<div class="block">Bean class exclusions.</div>
</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#notBeanPackages-java.lang.String...-">notBeanPackages</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;values)</code>
<div class="block">Bean package exclusions.</div>
</td>
</tr>
<tr id="i63" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#propertyNamer-java.lang.Class-java.lang.Class-">propertyNamer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>&gt;&nbsp;value)</code>
<div class="block">Bean property namer</div>
</td>
</tr>
<tr id="i64" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#propertyNamer-java.lang.Class-">propertyNamer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>&gt;&nbsp;value)</code>
<div class="block">Bean property namer</div>
</td>
</tr>
<tr id="i65" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#sortProperties--">sortProperties</a></span>()</code>
<div class="block">Sort bean properties.</div>
</td>
</tr>
<tr id="i66" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#sortProperties-java.lang.Class...-">sortProperties</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;on)</code>
<div class="block">Sort bean properties.</div>
</td>
</tr>
<tr id="i67" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#stopClass-java.lang.Class-java.lang.Class-">stopClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;value)</code>
<div class="block">Identifies a stop class for the annotated class.</div>
</td>
</tr>
<tr id="i68" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#streamCharset-java.nio.charset.Charset-">streamCharset</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;value)</code>
<div class="block">Input stream charset.</div>
</td>
</tr>
<tr id="i69" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#strict--">strict</a></span>()</code>
<div class="block">Strict mode.</div>
</td>
</tr>
<tr id="i70" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#strict-boolean-">strict</a></span>(boolean&nbsp;value)</code>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#strict--"><code>Parser.Builder.strict()</code></a> but allows you to explicitly specify the value.</div>
</td>
</tr>
<tr id="i71" class="rowColor">
<td class="colFirst"><code>&lt;T,S&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-">swap</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;normalClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;S&gt;&nbsp;swappedClass,
<a href="../../../../org/apache/juneau/utils/ThrowingFunction.html" title="interface in org.apache.juneau.utils">ThrowingFunction</a>&lt;T,S&gt;&nbsp;swapFunction)</code>
<div class="block">A shortcut for defining a <a href="../../../../org/apache/juneau/swap/FunctionalSwap.html" title="class in org.apache.juneau.swap"><code>FunctionalSwap</code></a>.</div>
</td>
</tr>
<tr id="i72" class="altColor">
<td class="colFirst"><code>&lt;T,S&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-org.apache.juneau.utils.ThrowingFunction-">swap</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;normalClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;S&gt;&nbsp;swappedClass,
<a href="../../../../org/apache/juneau/utils/ThrowingFunction.html" title="interface in org.apache.juneau.utils">ThrowingFunction</a>&lt;T,S&gt;&nbsp;swapFunction,
<a href="../../../../org/apache/juneau/utils/ThrowingFunction.html" title="interface in org.apache.juneau.utils">ThrowingFunction</a>&lt;S,T&gt;&nbsp;unswapFunction)</code>
<div class="block">A shortcut for defining a <a href="../../../../org/apache/juneau/swap/FunctionalSwap.html" title="class in org.apache.juneau.swap"><code>FunctionalSwap</code></a>.</div>
</td>
</tr>
<tr id="i73" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#swaps-java.lang.Class...-">swaps</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</code>
<div class="block">Java object swaps.</div>
</td>
</tr>
<tr id="i74" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#timeZone-java.util.TimeZone-">timeZone</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a>&nbsp;value)</code>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> TimeZone.</div>
</td>
</tr>
<tr id="i75" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#trimStrings--">trimStrings</a></span>()</code>
<div class="block">Trim parsed strings.</div>
</td>
</tr>
<tr id="i76" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#trimStrings-boolean-">trimStrings</a></span>(boolean&nbsp;value)</code>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#trimStrings--"><code>Parser.Builder.trimStrings()</code></a> but allows you to explicitly specify the value.</div>
</td>
</tr>
<tr id="i77" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#type-java.lang.Class-">type</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>&gt;&nbsp;value)</code>
<div class="block">Associates a context class with this builder.</div>
</td>
</tr>
<tr id="i78" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#typeName-java.lang.Class-java.lang.String-">typeName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">An identifying name for this class.</div>
</td>
</tr>
<tr id="i79" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#typePropertyName-java.lang.Class-java.lang.String-">typePropertyName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Bean type property name.</div>
</td>
</tr>
<tr id="i80" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#typePropertyName-java.lang.String-">typePropertyName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Bean type property name.</div>
</td>
</tr>
<tr id="i81" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#unbuffered--">unbuffered</a></span>()</code>
<div class="block">Unbuffered.</div>
</td>
</tr>
<tr id="i82" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#unbuffered-boolean-">unbuffered</a></span>(boolean&nbsp;value)</code>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#unbuffered--"><code>Parser.Builder.unbuffered()</code></a> but allows you to explicitly specify the value.</div>
</td>
</tr>
<tr id="i83" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#useEnumNames--">useEnumNames</a></span>()</code>
<div class="block">Use enum names.</div>
</td>
</tr>
<tr id="i84" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html#useJavaBeanIntrospector--">useJavaBeanIntrospector</a></span>()</code>
<div class="block">Use Java Introspector.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.parser.Parser.Builder">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.juneau.parser.<a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></h3>
<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#getConsumes--">getConsumes</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.BeanContextable.Builder">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.juneau.<a href="../../../../org/apache/juneau/BeanContextable.Builder.html" title="class in org.apache.juneau">BeanContextable.Builder</a></h3>
<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanContext--">beanContext</a>, <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanContext-java.util.function.Consumer-">beanContext</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.Context.Builder">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.juneau.<a href="../../../../org/apache/juneau/Context.Builder.html" title="class in org.apache.juneau">Context.Builder</a></h3>
<code><a href="../../../../org/apache/juneau/Context.Builder.html#apply-java.lang.Class-java.util.function.Consumer-">apply</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#build-java.lang.Class-">build</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#canApply-org.apache.juneau.AnnotationWorkList-">canApply</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#env-java.lang.String-">env</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#env-java.lang.String-T-">env</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#getApplied--">getApplied</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#getType--">getType</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#isDebug--">isDebug</a>, <a href="../../../../org/apache/juneau/Context.Builder.html#registerBuilders-java.lang.Object...-">registerBuilders</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Builder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Builder</h4>
<pre>protected&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.76">Builder</a>()</pre>
<div class="block">Constructor, default settings.</div>
</li>
</ul>
<a name="Builder-org.apache.juneau.parser.ReaderParser-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Builder</h4>
<pre>protected&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.87">Builder</a>(<a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a>&nbsp;copyFrom)</pre>
<div class="block">Copy constructor.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>copyFrom</code> - The bean to copy from.</dd>
</dl>
</li>
</ul>
<a name="Builder-org.apache.juneau.parser.ReaderParser.Builder-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Builder</h4>
<pre>protected&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.98">Builder</a>(<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;copyFrom)</pre>
<div class="block">Copy constructor.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>copyFrom</code> - The builder to copy from.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="copy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.105">copy</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#copy--">Context.Builder</a></code></span></div>
<div class="block">Copy creator.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#copy--">copy</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new mutable copy of this builder.</dd>
</dl>
</li>
</ul>
<a name="build--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>build</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.110">build</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#build--">Context.Builder</a></code></span></div>
<div class="block">Build the object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#build--">build</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The built object.</dd>
</dl>
</li>
</ul>
<a name="hashKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashKey</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/utils/HashKey.html" title="class in org.apache.juneau.utils">HashKey</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.115">hashKey</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#hashKey--">Context.Builder</a></code></span></div>
<div class="block">Returns the hashkey of this builder.
<p>
Used to return previously instantiated context beans that have matching hashkeys.
The <a href="../../../../org/apache/juneau/utils/HashKey.html" title="class in org.apache.juneau.utils"><code>HashKey</code></a> object is suitable for use as a hashmap key of a map of context beans.
A context bean is considered equivalent if the <a href="../../../../org/apache/juneau/utils/HashKey.html#equals-java.lang.Object-"><code>HashKey.equals(Object)</code></a> method is the same.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#hashKey--">hashKey</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The hashkey of this builder.</dd>
</dl>
</li>
</ul>
<a name="fileCharset-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fileCharset</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.154">fileCharset</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;value)</pre>
<div class="block">File charset.
<p>
The character set to use for reading <c>Files</c> from the file system.
<p>
Used when passing in files to <a href="../../../../org/apache/juneau/parser/Parser.html#parse-java.lang.Object-java.lang.Class-"><code>Parser.parse(Object, Class)</code></a>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser that reads UTF-8 files.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.fileCharset(<js>"UTF-8"</js>)
.build();
<jc>// Use it to read a UTF-8 encoded file.</jc>
MyBean <jv>myBean</jv> = <jv>parser</jv>.parse(<jk>new</jk> File(<js>"MyBean.txt"</js>), MyBean.<jk>class</jk>);
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.
<br>The default value is <js>"DEFAULT"</js> which causes the system default to be used.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="streamCharset-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>streamCharset</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.186">streamCharset</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;value)</pre>
<div class="block">Input stream charset.
<p>
The character set to use for converting <c>InputStreams</c> and byte arrays to readers.
<p>
Used when passing in input streams and byte arrays to <a href="../../../../org/apache/juneau/parser/Parser.html#parse-java.lang.Object-java.lang.Class-"><code>Parser.parse(Object, Class)</code></a>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser that reads UTF-8 files.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.streamCharset(Charset.<jsm>forName</jsm>(<js>"UTF-8"</js>))
.build();
<jc>// Use it to read a UTF-8 encoded input stream.</jc>
MyBean <jv>myBean</jv> = <jv>parser</jv>.parse(<jk>new</jk> FileInputStream(<js>"MyBean.txt"</js>), MyBean.<jk>class</jk>);
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.
<br>The default value is <js>"UTF-8"</js>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="annotations-java.lang.annotation.Annotation...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>annotations</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.194">annotations</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</a>...&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#annotations-java.lang.annotation.Annotation...-">Context.Builder</a></code></span></div>
<div class="block">Defines annotations to apply to specific classes and methods.
<p>
Allows you to dynamically apply Juneau annotations typically applied directly to classes and methods.
Useful in cases where you want to use the functionality of the annotation on beans and bean properties but
do not have access to the code to do so.
<p>
As a rule, any Juneau annotation with an <l>on()</l> method can be used with this setting.
<p>
The following example shows the equivalent methods for applying the <a href="../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotation:
<p class='bjava'>
<jc>// Class with explicit annotation.</jc>
<ja>@Bean</ja>(properties=<js>"street,city,state"</js>)
<jk>public class</jk> A {...}
<jc>// Class with annotation applied via @BeanConfig</jc>
<jk>public class</jk> B {...}
<jc>// Java REST method with @BeanConfig annotation.</jc>
<ja>@RestGet</ja>(...)
<ja>@Bean</ja>(on=<js>"B"</js>, properties=<js>"street,city,state"</js>)
<jk>public void</jk> doFoo() {...}
</p>
<p>
In general, the underlying framework uses this method when it finds dynamically applied annotations on
config annotations. However, concrete implementations of annotations are also provided that can be passed
directly into builder classes like so:
<p class='bjava'>
<jc>// Create a concrete @Bean annotation.</jc>
<ja>Bean</ja> <jv>annotation</jv> = BeanAnnotation.<jsm>create</jsm>(B.<jk>class</jk>).properties(<js>"street,city,state"</js>).build();
<jc>// Apply it to a serializer.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer.<jsm>create</jsm>().annotations(<jv>annotation</jv>).build();
<jc>// Serialize a bean with the dynamically applied annotation.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> B());
</p>
<p>
The following is the list of annotations builders provided that can be constructed
and passed into the builder class:
<ul class='javatreec'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeanAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeancAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeancAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanIgnoreAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeanIgnoreAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanpAnnotation.html" title="class in org.apache.juneau.annotation"><code>BeanpAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/ExampleAnnotation.html" title="class in org.apache.juneau.annotation"><code>ExampleAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/NamePropertyAnnotation.html" title="class in org.apache.juneau.annotation"><code>NamePropertyAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/ParentPropertyAnnotation.html" title="class in org.apache.juneau.annotation"><code>ParentPropertyAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/SwapAnnotation.html" title="class in org.apache.juneau.annotation"><code>SwapAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/UriAnnotation.html" title="class in org.apache.juneau.annotation"><code>UriAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/csv/annotation/CsvAnnotation.html" title="class in org.apache.juneau.csv.annotation"><code>CsvAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/html/annotation/HtmlAnnotation.html" title="class in org.apache.juneau.html.annotation"><code>HtmlAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/json/annotation/JsonAnnotation.html" title="class in org.apache.juneau.json.annotation"><code>JsonAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/SchemaAnnotation.html" title="class in org.apache.juneau.annotation"><code>SchemaAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/msgpack/annotation/MsgPackAnnotation.html" title="class in org.apache.juneau.msgpack.annotation"><code>MsgPackAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/oapi/annotation/OpenApiAnnotation.html" title="class in org.apache.juneau.oapi.annotation"><code>OpenApiAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/plaintext/annotation/PlainTextAnnotation.html" title="class in org.apache.juneau.plaintext.annotation"><code>PlainTextAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/soap/annotation/SoapXmlAnnotation.html" title="class in org.apache.juneau.soap.annotation"><code>SoapXmlAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/uon/annotation/UonAnnotation.html" title="class in org.apache.juneau.uon.annotation"><code>UonAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/urlencoding/annotation/UrlEncodingAnnotation.html" title="class in org.apache.juneau.urlencoding.annotation"><code>UrlEncodingAnnotation</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/xml/annotation/XmlAnnotation.html" title="class in org.apache.juneau.xml.annotation"><code>XmlAnnotation</code></a>
</ul>
<p>
The syntax for the <l>on()</l> pattern match parameter depends on whether it applies to a class, method, field, or constructor.
The valid pattern matches are:
<ul class='spaced-list'>
<li>Classes:
<ul>
<li>Fully qualified:
<ul>
<li><js>"com.foo.MyClass"</js>
</ul>
<li>Fully qualified inner class:
<ul>
<li><js>"com.foo.MyClass$Inner1$Inner2"</js>
</ul>
<li>Simple:
<ul>
<li><js>"MyClass"</js>
</ul>
<li>Simple inner:
<ul>
<li><js>"MyClass$Inner1$Inner2"</js>
<li><js>"Inner1$Inner2"</js>
<li><js>"Inner2"</js>
</ul>
</ul>
<li>Methods:
<ul>
<li>Fully qualified with args:
<ul>
<li><js>"com.foo.MyClass.myMethod(String,int)"</js>
<li><js>"com.foo.MyClass.myMethod(java.lang.String,int)"</js>
<li><js>"com.foo.MyClass.myMethod()"</js>
</ul>
<li>Fully qualified:
<ul>
<li><js>"com.foo.MyClass.myMethod"</js>
</ul>
<li>Simple with args:
<ul>
<li><js>"MyClass.myMethod(String,int)"</js>
<li><js>"MyClass.myMethod(java.lang.String,int)"</js>
<li><js>"MyClass.myMethod()"</js>
</ul>
<li>Simple:
<ul>
<li><js>"MyClass.myMethod"</js>
</ul>
<li>Simple inner class:
<ul>
<li><js>"MyClass$Inner1$Inner2.myMethod"</js>
<li><js>"Inner1$Inner2.myMethod"</js>
<li><js>"Inner2.myMethod"</js>
</ul>
</ul>
<li>Fields:
<ul>
<li>Fully qualified:
<ul>
<li><js>"com.foo.MyClass.myField"</js>
</ul>
<li>Simple:
<ul>
<li><js>"MyClass.myField"</js>
</ul>
<li>Simple inner class:
<ul>
<li><js>"MyClass$Inner1$Inner2.myField"</js>
<li><js>"Inner1$Inner2.myField"</js>
<li><js>"Inner2.myField"</js>
</ul>
</ul>
<li>Constructors:
<ul>
<li>Fully qualified with args:
<ul>
<li><js>"com.foo.MyClass(String,int)"</js>
<li><js>"com.foo.MyClass(java.lang.String,int)"</js>
<li><js>"com.foo.MyClass()"</js>
</ul>
<li>Simple with args:
<ul>
<li><js>"MyClass(String,int)"</js>
<li><js>"MyClass(java.lang.String,int)"</js>
<li><js>"MyClass()"</js>
</ul>
<li>Simple inner class:
<ul>
<li><js>"MyClass$Inner1$Inner2()"</js>
<li><js>"Inner1$Inner2()"</js>
<li><js>"Inner2()"</js>
</ul>
</ul>
<li>A comma-delimited list of anything on this list.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html" title="annotation in org.apache.juneau.annotation"><code>BeanConfig</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#annotations-java.lang.annotation.Annotation...-">annotations</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The annotations to register with the context.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="apply-org.apache.juneau.AnnotationWorkList-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.200">apply</a>(<a href="../../../../org/apache/juneau/AnnotationWorkList.html" title="class in org.apache.juneau">AnnotationWorkList</a>&nbsp;work)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#apply-org.apache.juneau.AnnotationWorkList-">Context.Builder</a></code></span></div>
<div class="block">Applies a set of applied to this builder.
<p>
An <a href="../../../../org/apache/juneau/AnnotationWork.html" title="class in org.apache.juneau"><code>AnnotationWork</code></a> consists of a single pair of <a href="../../../../org/apache/juneau/reflect/AnnotationInfo.html" title="class in org.apache.juneau.reflect"><code>AnnotationInfo</code></a> that represents an annotation instance,
and <a href="../../../../org/apache/juneau/AnnotationApplier.html" title="class in org.apache.juneau"><code>AnnotationApplier</code></a> which represents the code used to apply the values in that annotation to a specific builder.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A class annotated with a config annotation.</jc>
<ja>@BeanConfig</ja>(sortProperties=<js>"$S{sortProperties,false}"</js>)
<jk>public class</jk> MyClass {...}
<jc>// Find all annotations that themselves are annotated with @ContextPropertiesApply.</jc>
AnnotationList <jv>annotations</jv> = ClassInfo.<jsm>of</jsm>(MyClass.<jk>class</jk>).getAnnotationList(<jsf>CONTEXT_APPLY_FILTER</jsf>);
VarResolverSession <jv>vrs</jv> = VarResolver.<jsf>DEFAULT</jsf>.createSession();
AnnotationWorkList <jv>work</jv> = AnnotationWorkList.of(<jv>vrs</jv>, <jv>annotations</jv>);
<jc>// Apply any settings found on the annotations.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.apply(<jv>work</jv>)
.build();
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#apply-org.apache.juneau.AnnotationWorkList-">apply</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>work</code> - The list of annotations and appliers to apply to this builder.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="applyAnnotations-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>applyAnnotations</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.206">applyAnnotations</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;fromClasses)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#applyAnnotations-java.lang.Class...-">Context.Builder</a></code></span></div>
<div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified class to this context.
<p>
Any annotations found that themselves are annotated with <a href="../../../../org/apache/juneau/annotation/ContextApply.html" title="annotation in org.apache.juneau.annotation"><code>ContextApply</code></a> will be resolved and
applied as properties to this builder. These annotations include:
<ul class='javatreec'>
<li class ='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html" title="annotation in org.apache.juneau.annotation"><code>BeanConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/csv/annotation/CsvConfig.html" title="annotation in org.apache.juneau.csv.annotation"><code>CsvConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/html/annotation/HtmlConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/html/annotation/HtmlDocConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlDocConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/json/annotation/JsonConfig.html" title="annotation in org.apache.juneau.json.annotation"><code>JsonConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.html" title="annotation in org.apache.juneau.jsonschema.annotation"><code>JsonSchemaConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/msgpack/annotation/MsgPackConfig.html" title="annotation in org.apache.juneau.msgpack.annotation"><code>MsgPackConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/oapi/annotation/OpenApiConfig.html" title="annotation in org.apache.juneau.oapi.annotation"><code>OpenApiConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/parser/annotation/ParserConfig.html" title="annotation in org.apache.juneau.parser.annotation"><code>ParserConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/plaintext/annotation/PlainTextConfig.html" title="annotation in org.apache.juneau.plaintext.annotation"><code>PlainTextConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/serializer/annotation/SerializerConfig.html" title="annotation in org.apache.juneau.serializer.annotation"><code>SerializerConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/soap/annotation/SoapXmlConfig.html" title="annotation in org.apache.juneau.soap.annotation"><code>SoapXmlConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/uon/annotation/UonConfig.html" title="annotation in org.apache.juneau.uon.annotation"><code>UonConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html" title="annotation in org.apache.juneau.urlencoding.annotation"><code>UrlEncodingConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/xml/annotation/XmlConfig.html" title="annotation in org.apache.juneau.xml.annotation"><code>XmlConfig</code></a>
<li class ='ja'><c>RdfConfig</c>
</ul>
<p>
Annotations on classes are appended in the following order:
<ol>
<li>On the package of this class.
<li>On interfaces ordered parent-to-child.
<li>On parent classes ordered parent-to-child.
<li>On this class.
</ol>
<p>
The default var resolver <a href="../../../../org/apache/juneau/svl/VarResolver.html#DEFAULT"><code>VarResolver.DEFAULT</code></a> is used to resolve any variables in annotation field values.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A class annotated with a config annotation.</jc>
<ja>@BeanConfig</ja>(sortProperties=<js>"$S{sortProperties,false}"</js>)
<jk>public class</jk> MyClass {...}
<jc>// Apply any settings found on the annotations.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.applyAnnotations(MyClass.<jk>class</jk>)
.build();
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#applyAnnotations-java.lang.Class...-">applyAnnotations</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fromClasses</code> - The classes on which the annotations are defined.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="applyAnnotations-java.lang.reflect.Method...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>applyAnnotations</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.212">applyAnnotations</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>...&nbsp;fromMethods)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#applyAnnotations-java.lang.reflect.Method...-">Context.Builder</a></code></span></div>
<div class="block">Applies any of the various <ja>@XConfig</ja> annotations on the specified method to this context.
<p>
Any annotations found that themselves are annotated with <a href="../../../../org/apache/juneau/annotation/ContextApply.html" title="annotation in org.apache.juneau.annotation"><code>ContextApply</code></a> will be resolved and
applied as properties to this builder. These annotations include:
<ul class='javatreec'>
<li class ='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html" title="annotation in org.apache.juneau.annotation"><code>BeanConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/csv/annotation/CsvConfig.html" title="annotation in org.apache.juneau.csv.annotation"><code>CsvConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/html/annotation/HtmlConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/html/annotation/HtmlDocConfig.html" title="annotation in org.apache.juneau.html.annotation"><code>HtmlDocConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/json/annotation/JsonConfig.html" title="annotation in org.apache.juneau.json.annotation"><code>JsonConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.html" title="annotation in org.apache.juneau.jsonschema.annotation"><code>JsonSchemaConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/msgpack/annotation/MsgPackConfig.html" title="annotation in org.apache.juneau.msgpack.annotation"><code>MsgPackConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/oapi/annotation/OpenApiConfig.html" title="annotation in org.apache.juneau.oapi.annotation"><code>OpenApiConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/parser/annotation/ParserConfig.html" title="annotation in org.apache.juneau.parser.annotation"><code>ParserConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/plaintext/annotation/PlainTextConfig.html" title="annotation in org.apache.juneau.plaintext.annotation"><code>PlainTextConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/serializer/annotation/SerializerConfig.html" title="annotation in org.apache.juneau.serializer.annotation"><code>SerializerConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/soap/annotation/SoapXmlConfig.html" title="annotation in org.apache.juneau.soap.annotation"><code>SoapXmlConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/uon/annotation/UonConfig.html" title="annotation in org.apache.juneau.uon.annotation"><code>UonConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/urlencoding/annotation/UrlEncodingConfig.html" title="annotation in org.apache.juneau.urlencoding.annotation"><code>UrlEncodingConfig</code></a>
<li class ='ja'><a href="../../../../org/apache/juneau/xml/annotation/XmlConfig.html" title="annotation in org.apache.juneau.xml.annotation"><code>XmlConfig</code></a>
<li class ='ja'><c>RdfConfig</c>
</ul>
<p>
Annotations on methods are appended in the following order:
<ol>
<li>On the package of the method class.
<li>On interfaces ordered parent-to-child.
<li>On parent classes ordered parent-to-child.
<li>On the method class.
<li>On this method and matching methods ordered parent-to-child.
</ol>
<p>
The default var resolver <a href="../../../../org/apache/juneau/svl/VarResolver.html#DEFAULT"><code>VarResolver.DEFAULT</code></a> is used to resolve any variables in annotation field values.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A method annotated with a config annotation.</jc>
<jk>public class</jk> MyClass {
<ja>@BeanConfig</ja>(sortProperties=<js>"$S{sortProperties,false}"</js>)
<jk>public void</jk> myMethod() {...}
}
<jc>// Apply any settings found on the annotations.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.applyAnnotations(MyClass.<jk>class</jk>.getMethod(<js>"myMethod"</js>))
.build();
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#applyAnnotations-java.lang.reflect.Method...-">applyAnnotations</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fromMethods</code> - The methods on which the annotations are defined.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="cache-org.apache.juneau.internal.Cache-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cache</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.218">cache</a>(<a href="../../../../org/apache/juneau/internal/Cache.html" title="class in org.apache.juneau.internal">Cache</a>&lt;<a href="../../../../org/apache/juneau/utils/HashKey.html" title="class in org.apache.juneau.utils">HashKey</a>,? extends <a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#cache-org.apache.juneau.internal.Cache-">Context.Builder</a></code></span></div>
<div class="block">Specifies a cache to use for hashkey-based caching.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#cache-org.apache.juneau.internal.Cache-">cache</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The cache.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="debug--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>debug</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.224">debug</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#debug--">Context.Builder</a></code></span></div>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> Debug mode.
<p>
Enables the following additional information during serialization:
<ul class='spaced-list'>
<li>
When bean getters throws exceptions, the exception includes the object stack information
in order to determine how that method was invoked.
<li>
Enables <a href="../../../../org/apache/juneau/BeanTraverseContext.Builder.html#detectRecursions--"><code>BeanTraverseContext.Builder.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
in order to determine how that method was invoked.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer with debug enabled.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.debug()
.build();
<jc>// Create a POJO model with a recursive loop.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Object <jf>f</jf>;
}
MyBean <jv>bean</jv> = <jk>new</jk> MyBean();
<jv>bean</jv>.<jf>f</jf> = <jv>bean</jv>;
<jc>// Throws a SerializeException and not a StackOverflowError</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jv>bean</jv>);
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#debug--"><code>BeanConfig.debug()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/ContextSession.Builder.html#debug-java.lang.Boolean-"><code>ContextSession.Builder.debug(Boolean)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#debug--">debug</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="debug-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>debug</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.230">debug</a>(boolean&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#debug-boolean-">Context.Builder</a></code></span></div>
<div class="block">Same as <a href="../../../../org/apache/juneau/Context.Builder.html#debug--"><code>Context.Builder.debug()</code></a> but allows you to explicitly specify the value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#debug-boolean-">debug</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="impl-org.apache.juneau.Context-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>impl</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.236">impl</a>(<a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#impl-org.apache.juneau.Context-">Context.Builder</a></code></span></div>
<div class="block">Specifies a pre-instantiated bean for the <a href="../../../../org/apache/juneau/Context.Builder.html#build--"><code>Context.Builder.build()</code></a> method to return.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#impl-org.apache.juneau.Context-">impl</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="type-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>type</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.242">type</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/Context.html" title="class in org.apache.juneau">Context</a>&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/Context.Builder.html#type-java.lang.Class-">Context.Builder</a></code></span></div>
<div class="block">Associates a context class with this builder.
<p>
This is the type of object that this builder creates when the <a href="../../../../org/apache/juneau/Context.Builder.html#build--"><code>Context.Builder.build()</code></a> method is called.
<p>
By default, it's the outer class of where the builder class is defined.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#type-java.lang.Class-">type</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The context class that this builder should create.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanClassVisibility-org.apache.juneau.Visibility-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanClassVisibility</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.248">beanClassVisibility</a>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanClassVisibility-org.apache.juneau.Visibility-">BeanContextable.Builder</a></code></span></div>
<div class="block">Minimum bean class visibility.
<p>
Classes are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is <jsf>PUBLIC</jsf> and the bean class is <jk>protected</jk>, then the class
will not be interpreted as a bean class and be serialized as a string.
Use this setting to reduce the visibility requirement.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a protected class and one field.</jc>
<jk>protected class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
}
<jc>// Create a serializer that's capable of serializing the class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanClassVisibility(<jsf>PROTECTED</jsf>)
.build();
<jc>// Produces: {"foo","bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>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 non-public bean class to override this setting.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean class to ignore it as a bean.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beanClassVisibility--"><code>BeanConfig.beanClassVisibility()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanClassVisibility-org.apache.juneau.Visibility-">beanClassVisibility</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.
<br>The default is <a href="../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanConstructorVisibility-org.apache.juneau.Visibility-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanConstructorVisibility</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.254">beanConstructorVisibility</a>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanConstructorVisibility-org.apache.juneau.Visibility-">BeanContextable.Builder</a></code></span></div>
<div class="block">Minimum bean constructor visibility.
<p>
Only look for constructors with the specified minimum visibility.
<p>
This setting affects the logic for finding no-arg constructors for bean. Normally, only <jk>public</jk> no-arg
constructors are used. Use this setting if you want to reduce the visibility requirement.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a protected constructor and one field.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>;
<jk>protected</jk> MyBean() {}
}
<jc>// Create a parser capable of calling the protected constructor.</jc>
ReaderParser <jv>parser</jv> = ReaderParser
.<jsm>create</jsm>()
.beanConstructorVisibility(<jsf>PROTECTED</jsf>)
.build();
<jc>// Use it.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Beanc.html" title="annotation in org.apache.juneau.annotation"><code>@Beanc</code></a> annotation can also be used to expose a non-public constructor.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean constructor to ignore it.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beanConstructorVisibility--"><code>BeanConfig.beanConstructorVisibility()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanConstructorVisibility-org.apache.juneau.Visibility-">beanConstructorVisibility</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.
<br>The default is <a href="../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanContext-org.apache.juneau.BeanContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanContext</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.260">beanContext</a>(<a href="../../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanContext-org.apache.juneau.BeanContext-">BeanContextable.Builder</a></code></span></div>
<div class="block">Specifies an already-instantiated bean context to use.
<p>
Provides an optimization for cases where serializers and parsers can use an existing
bean context without having to go through <c><jv>beanContext</jv>.copy().build()</c>.
An example is <a href="../../../../org/apache/juneau/BeanContext.html#getBeanToStringSerializer--"><code>BeanContext.getBeanToStringSerializer()</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanContext-org.apache.juneau.BeanContext-">beanContext</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The bean context to use.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanContext-org.apache.juneau.BeanContext.Builder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanContext</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.266">beanContext</a>(<a href="../../../../org/apache/juneau/BeanContext.Builder.html" title="class in org.apache.juneau">BeanContext.Builder</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanContext-org.apache.juneau.BeanContext.Builder-">BeanContextable.Builder</a></code></span></div>
<div class="block">Overrides the bean context builder.
<p>
Used when sharing bean context builders across multiple context objects.
For example, <a href="../../../../org/apache/juneau/jsonschema/JsonSchemaGenerator.Builder.html" title="class in org.apache.juneau.jsonschema"><code>JsonSchemaGenerator.Builder</code></a> uses this to apply common bean settings with the JSON
serializer and parser.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanContext-org.apache.juneau.BeanContext.Builder-">beanContext</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanDictionary-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanDictionary</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.272">beanDictionary</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanDictionary-java.lang.Class...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean dictionary.
<p>
The list of classes that make up the bean dictionary in this bean context.
<p>
Values are prepended to the list so that later calls can override classes of earlier calls.
<p>
A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred
through reflection. The names are defined through the <a href="../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>@Bean(typeName)</code></a> annotation defined
on the bean class. For example, if a class <c>Foo</c> has a type-name of <js>"myfoo"</js>, then it would end up
serialized as <js>"{_type:'myfoo',...}"</js> in JSON
or <js>"&lt;myfoo&gt;...&lt;/myfoo&gt;"</js> in XML.
<p>
This setting tells the parsers which classes to look for when resolving <js>"_type"</js> attributes.
<p>
Values can consist of any of the following types:
<ul>
<li>Any bean class that specifies a value for <a href="../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>@Bean(typeName)</code></a>.
<li>Any subclass of <a href="../../../../org/apache/juneau/BeanDictionaryList.html" title="class in org.apache.juneau"><code>BeanDictionaryList</code></a> containing a collection of bean classes with type name annotations.
<li>Any subclass of <a href="../../../../org/apache/juneau/BeanDictionaryMap.html" title="class in org.apache.juneau"><code>BeanDictionaryMap</code></a> containing a mapping of type names to classes without type name annotations.
<li>Any array or collection of the objects above.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// POJOs with @Bean(name) annotations.</jc>
<ja>@Bean</ja>(typeName=<js>"foo"</js>)
<jk>public class</jk> Foo {...}
<ja>@Bean</ja>(typeName=<js>"bar"</js>)
<jk>public class</jk> Bar {...}
<jc>// Create a parser and tell it which classes to try to resolve.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>)
.addBeanTypes()
.build();
<jc>// A bean with a field with an indeterminate type.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Object <jf>mySimpleField</jf>;
}
<jc>// Parse bean.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{mySimpleField:{_type:'foo',...}}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
Another option is to use the <a href="../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a> annotation on the POJO class itself:
<p class='bjava'>
<jc>// Instead of by parser, define a bean dictionary on a class through an annotation.</jc>
<jc>// This applies to all properties on this class and all subclasses.</jc>
<ja>@Bean</ja>(dictionary={Foo.<jk>class</jk>,Bar.<jk>class</jk>})
<jk>public class</jk> MyBean {
<jk>public</jk> Object <jf>mySimpleField</jf>; <jc>// May contain Foo or Bar object.</jc>
<jk>public</jk> Map&lt;String,Object&gt; <jf>myMapField</jf>; <jc>// May contain Foo or Bar objects.</jc>
}
</p>
<p>
A typical usage is to allow for HTML documents to be parsed back into HTML beans:
<p class='bjava'>
<jc>// Use the predefined HTML5 bean dictionary which is a BeanDictionaryList.</jc>
ReaderParser <jv>parser</jv> = HtmlParser
.<jsm>create</jsm>()
.dictionary(HtmlBeanDictionary.<jk>class</jk>)
.build();
<jc>// Parse an HTML body into HTML beans.</jc>
Body <jv>body</jv> = <jv>parser</jv>.parse(<js>"&lt;body&gt;&lt;ul&gt;&lt;li&gt;foo&lt;/li&gt;&lt;li&gt;bar&lt;/li&gt;&lt;/ul&gt;"</js>, Body.<jk>class</jk>);
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Beanp.html#dictionary--"><code>Beanp.dictionary()</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#dictionary--"><code>BeanConfig.dictionary()</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#dictionary_replace--"><code>BeanConfig.dictionary_replace()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanDictionary-java.lang.Class...-">beanDictionary</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanFieldVisibility-org.apache.juneau.Visibility-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanFieldVisibility</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.278">beanFieldVisibility</a>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanFieldVisibility-org.apache.juneau.Visibility-">BeanContextable.Builder</a></code></span></div>
<div class="block">Minimum bean field visibility.
<p>
Only look for bean fields with the specified minimum visibility.
<p>
This affects which fields on a bean class are considered bean properties. Normally only <jk>public</jk> fields are considered.
Use this setting if you want to reduce the visibility requirement.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a protected field.</jc>
<jk>public class</jk> MyBean {
<jk>protected</jk> String <jf>foo</jf> = <js>"bar"</js>;
}
<jc>// Create a serializer that recognizes the protected field.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanFieldVisibility(<jsf>PROTECTED</jsf>)
.build();
<jc>// Produces: {"foo":"bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
Bean fields can be ignored as properties entirely by setting the value to <a href="../../../../org/apache/juneau/Visibility.html#NONE"><code>Visibility.NONE</code></a>
<p class='bjava'>
<jc>// Disable using fields as properties entirely.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanFieldVisibility(<jsf>NONE</jsf>)
.build();
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used to expose a non-public field.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean field to ignore it as a bean property.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beanFieldVisibility--"><code>BeanConfig.beanFieldVisibility()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanFieldVisibility-org.apache.juneau.Visibility-">beanFieldVisibility</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.
<br>The default is <a href="../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanInterceptor-java.lang.Class-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanInterceptor</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.284">beanInterceptor</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/swap/BeanInterceptor.html" title="class in org.apache.juneau.swap">BeanInterceptor</a>&lt;?&gt;&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanInterceptor-java.lang.Class-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean interceptor.
<p>
Bean interceptors can be used to intercept calls to getters and setters and alter their values in transit.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Interceptor that strips out sensitive information.</jc>
<jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor&lt;Address&gt; {
<jk>public</jk> Object readProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
<jk>if</jk> (<js>"taxInfo"</js>.equals(<jv>name</jv>))
<jk>return</jk> <js>"redacted"</js>;
<jk>return</jk> <jv>value</jv>;
}
<jk>public</jk> Object writeProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
<jk>if</jk> (<js>"taxInfo"</js>.equals(<jv>name</jv>) &amp;&amp; <js>"redacted"</js>.equals(<jv>value</jv>))
<jk>return</jk> TaxInfoUtils.<jsm>lookup</jsm>(<jv>bean</jv>.getStreet(), <jv>bean</jv>.getCity(), <jv>bean</jv>.getState());
<jk>return</jk> <jv>value</jv>;
}
}
<jc>// Our bean class.</jc>
<jk>public class</jk> Address {
<jk>public</jk> String getTaxInfo() {...}
<jk>public void</jk> setTaxInfo(String <jv>value</jv>) {...}
}
<jc>// Register filter on serializer or parser.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanInterceptor(Address.<jk>class</jk>, AddressInterceptor.<jk>class</jk>)
.build();
<jc>// Produces: {"taxInfo":"redacted"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> Address());
</p>
<ul class='seealso'>
<li class='jc'><a href="../../../../org/apache/juneau/swap/BeanInterceptor.html" title="class in org.apache.juneau.swap"><code>BeanInterceptor</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#interceptor--"><code>Bean(interceptor)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanInterceptor-java.lang.Class-java.lang.Class-">beanInterceptor</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The bean that the filter applies to.</dd>
<dd><code>value</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanMapPutReturnsOldValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanMapPutReturnsOldValue</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.290">beanMapPutReturnsOldValue</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanMapPutReturnsOldValue--">BeanContextable.Builder</a></code></span></div>
<div class="block">BeanMap.put() returns old property value.
<p>
When enabled, 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. Otherwise, it returns <jk>null</jk>.
<p>
Disabled by default because it introduces a slight performance penalty during serialization.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a context that creates BeanMaps with normal put() behavior.</jc>
BeanContext <jv>context</jv> = BeanContext
.<jsm>create</jsm>()
.beanMapPutReturnsOldValue()
.build();
BeanMap&lt;MyBean&gt; <jv>beanMap</jv> = <jv>context</jv>.createSession().toBeanMap(<jk>new</jk> MyBean());
<jv>beanMap</jv>.put(<js>"foo"</js>, <js>"bar"</js>);
Object <jv>oldValue</jv> = <jv>beanMap</jv>.put(<js>"foo"</js>, <js>"baz"</js>); <jc>// oldValue == "bar"</jc>
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beanMapPutReturnsOldValue--"><code>BeanConfig.beanMapPutReturnsOldValue()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#beanMapPutReturnsOldValue--"><code>BeanContext.Builder.beanMapPutReturnsOldValue()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanMapPutReturnsOldValue--">beanMapPutReturnsOldValue</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanMethodVisibility-org.apache.juneau.Visibility-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanMethodVisibility</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.296">beanMethodVisibility</a>(<a href="../../../../org/apache/juneau/Visibility.html" title="enum in org.apache.juneau">Visibility</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanMethodVisibility-org.apache.juneau.Visibility-">BeanContextable.Builder</a></code></span></div>
<div class="block">Minimum bean method visibility.
<p>
Only look for bean methods with the specified minimum visibility.
<p>
This affects which methods are detected as getters and setters on a bean class. Normally only <jk>public</jk> getters and setters are considered.
Use this setting if you want to reduce the visibility requirement.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a protected getter.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String getFoo() { <jk>return</jk> <js>"foo"</js>; }
<jk>protected</jk> String getBar() { <jk>return</jk> <js>"bar"</js>; }
}
<jc>// Create a serializer that looks for protected getters and setters.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanMethodVisibility(<jsf>PROTECTED</jsf>)
.build();
<jc>// Produces: {"foo":"foo","bar":"bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used to expose a non-public method.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a public bean getter/setter to ignore it as a bean property.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beanMethodVisibility--"><code>BeanConfig.beanMethodVisibility()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanMethodVisibility-org.apache.juneau.Visibility-">beanMethodVisibility</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.
<br>The default is <a href="../../../../org/apache/juneau/Visibility.html#PUBLIC"><code>Visibility.PUBLIC</code></a></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanProperties-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.302">beanProperties</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.util.Map-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property includes.
<p>
Specifies the set and order of names of properties associated with bean classes.
<p>
For example, <c>beanProperties(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"foo,bar"</js>))</c> means only serialize the <c>foo</c> and
<c>bar</c> properties on the specified bean. Likewise, parsing will ignore any bean properties not specified
and either throw an exception or silently ignore them depending on whether <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreUnknownBeanProperties--"><code>BeanContextable.Builder.ignoreUnknownBeanProperties()</code></a>
has been called.
<p>
This value is entirely optional if you simply want to expose all the getters and public fields on
a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be
serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code,
whereas on Oracle JREs, the order is entirely random.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String
<jf>foo</jf> = <js>"foo"</js>,
<jf>bar</jf> = <js>"bar"</js>,
<jf>baz</jf> = <js>"baz"</js>;
}
<jc>// Create a serializer that includes only the 'foo' and 'bar' properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanProperties(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"foo,bar"</js>))
.build();
<jc>// Produces: {"foo":"foo","bar":"bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
This method is functionally equivalent to the following code for each entry:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).properties(<jv>value</jv>.toString()).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#properties--"><code>Bean.properties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#p--"><code>Bean.p()</code></a>- On an annotation on the bean class itself.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanProperties-java.util.Map-">beanProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this builder.
<br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.
<br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanProperties-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.308">beanProperties</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property includes.
<p>
Specifies the set and order of names of properties associated with the bean class.
<p>
For example, <c>beanProperties(MyBean.<jk>class</jk>, <js>"foo,bar"</js>)</c> means only serialize the <c>foo</c> and
<c>bar</c> properties on the specified bean. Likewise, parsing will ignore any bean properties not specified
and either throw an exception or silently ignore them depending on whether <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreUnknownBeanProperties--"><code>BeanContextable.Builder.ignoreUnknownBeanProperties()</code></a>
has been called.
<p>
This value is entirely optional if you simply want to expose all the getters and public fields on
a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be
serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code,
whereas on Oracle JREs, the order is entirely random.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String
<jf>foo</jf> = <js>"foo"</js>,
<jf>bar</jf> = <js>"bar"</js>,
<jf>baz</jf> = <js>"baz"</js>;
}
<jc>// Create a serializer that includes only the 'foo' and 'bar' properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanProperties(MyBean.<jk>class</jk>, <js>"foo,bar"</js>)
.build();
<jc>// Produces: {"foo":"foo","bar":"bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).properties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jm'><a href="../../../../org/apache/juneau/annotation/Bean.html#properties--"><code>Bean.properties()</code></a>/<a href="../../../../org/apache/juneau/annotation/Bean.html#p--"><code>Bean.p()</code></a> - On an annotation on the bean class itself.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanProperties-java.lang.Class-java.lang.String-">beanProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClass</code> - The bean class.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanProperties-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.314">beanProperties</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.String-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property includes.
<p>
Specifies the set and order of names of properties associated with the bean class.
<p>
For example, <c>beanProperties(<js>"MyBean"</js>, <js>"foo,bar"</js>)</c> means only serialize the <c>foo</c> and
<c>bar</c> properties on the specified bean. Likewise, parsing will ignore any bean properties not specified
and either throw an exception or silently ignore them depending on whether <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreUnknownBeanProperties--"><code>BeanContextable.Builder.ignoreUnknownBeanProperties()</code></a>
has been called.
<p>
This value is entirely optional if you simply want to expose all the getters and public fields on
a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be
serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code,
whereas on Oracle JREs, the order is entirely random.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String
<jf>foo</jf> = <js>"foo"</js>,
<jf>bar</jf> = <js>"bar"</js>,
<jf>baz</jf> = <js>"baz"</js>;
}
<jc>// Create a serializer that includes only the 'foo' and 'bar' properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanProperties(<js>"MyBean"</js>, <js>"foo,bar"</js>)
.build();
<jc>// Produces: {"foo":"foo","bar":"bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).properties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#properties--"><code>Bean.properties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#p--"><code>Bean.p()</code></a> - On an annotation on the bean class itself.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanProperties-java.lang.String-java.lang.String-">beanProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClassName</code> - The bean class name.
<br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesExcludes-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesExcludes</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.320">beanPropertiesExcludes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.util.Map-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property excludes.
<p>
Specifies to exclude the specified list of properties for the specified bean classes.
<p>
Same as <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.util.Map-"><code>BeanContextable.Builder.beanProperties(Map)</code></a> except you specify a list of bean property names that you want to exclude from
serialization.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String
<jf>foo</jf> = <js>"foo"</js>,
<jf>bar</jf> = <js>"bar"</js>,
<jf>baz</jf> = <js>"baz"</js>;
}
<jc>// Create a serializer that excludes the "bar" and "baz" properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesExcludes(AMap.of(<js>"MyBean"</js>, <js>"bar,baz"</js>))
.build();
<jc>// Produces: {"foo":"foo"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
This method is functionally equivalent to the following code for each entry:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).excludeProperties(<jv>value</jv>.toString()).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#excludeProperties--"><code>Bean.excludeProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#xp--"><code>Bean.xp()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesExcludes-java.util.Map-">beanPropertiesExcludes</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this builder.
<br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.
<br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesExcludes-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesExcludes</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.326">beanPropertiesExcludes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property excludes.
<p>
Specifies to exclude the specified list of properties for the specified bean class.
<p>
Same as <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>BeanContextable.Builder.beanProperties(Class, String)</code></a> except you specify a list of bean property names that you want to exclude from
serialization.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String
<jf>foo</jf> = <js>"foo"</js>,
<jf>bar</jf> = <js>"bar"</js>,
<jf>baz</jf> = <js>"baz"</js>;
}
<jc>// Create a serializer that excludes the "bar" and "baz" properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesExcludes(MyBean.<jk>class</jk>, <js>"bar,baz"</js>)
.build();
<jc>// Produces: {"foo":"foo"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).excludeProperties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#excludeProperties--"><code>Bean.excludeProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#xp--"><code>Bean.xp()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-">beanPropertiesExcludes</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClass</code> - The bean class.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesExcludes-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesExcludes</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.332">beanPropertiesExcludes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.String-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property excludes.
<p>
Specifies to exclude the specified list of properties for the specified bean class.
<p>
Same as <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.String-java.lang.String-"><code>BeanContextable.Builder.beanPropertiesExcludes(String, String)</code></a> except you specify a list of bean property names that you want to exclude from
serialization.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String
<jf>foo</jf> = <js>"foo"</js>,
<jf>bar</jf> = <js>"bar"</js>,
<jf>baz</jf> = <js>"baz"</js>;
}
<jc>// Create a serializer that excludes the "bar" and "baz" properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesExcludes(<js>"MyBean"</js>, <js>"bar,baz"</js>)
.build();
<jc>// Produces: {"foo":"foo"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).excludeProperties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#excludeProperties--"><code>Bean.excludeProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#xp--"><code>Bean.xp()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesExcludes-java.lang.String-java.lang.String-">beanPropertiesExcludes</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClassName</code> - The bean class name.
<br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesReadOnly-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesReadOnly</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.338">beanPropertiesReadOnly</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesReadOnly-java.util.Map-">BeanContextable.Builder</a></code></span></div>
<div class="block">Read-only bean properties.
<p>
Specifies one or more properties on beans that are read-only despite having valid getters.
Serializers will serialize such properties as usual, but parsers will silently ignore them.
Note that this is different from the <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>beanProperties</code></a>/<a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-"><code>beanPropertiesExcludes</code></a> settings which include or exclude properties
for both serializers and parsers.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>;
}
<jc>// Create a serializer with read-only property settings.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesReadOnly(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>))
.build();
<jc>// All 3 properties will be serialized.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a parser with read-only property settings.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.beanPropertiesReadOnly(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>))
.ignoreUnknownBeanProperties()
.build();
<jc>// Parser ignores bar and baz properties.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This method is functionally equivalent to the following code for each entry:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).readOnlyProperties(<jv>value</jv>.toString()).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#readOnlyProperties--"><code>Bean.readOnlyProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#ro--"><code>Bean.ro()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesReadOnly-java.util.Map-">beanPropertiesReadOnly</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this builder.
<br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.
<br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesReadOnly-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesReadOnly</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.344">beanPropertiesReadOnly</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesReadOnly-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Read-only bean properties.
<p>
Specifies one or more properties on a bean that are read-only despite having valid getters.
Serializers will serialize such properties as usual, but parsers will silently ignore them.
Note that this is different from the <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>beanProperties</code></a>/<a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-"><code>beanPropertiesExcludes</code></a> settings which include or exclude properties
for both serializers and parsers.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>;
}
<jc>// Create a serializer with read-only property settings.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesReadOnly(MyBean.<jk>class</jk>, <js>"bar,baz"</js>)
.build();
<jc>// All 3 properties will be serialized.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a parser with read-only property settings.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.beanPropertiesReadOnly(MyBean.<jk>class</jk>, <js>"bar,baz"</js>)
.ignoreUnknownBeanProperties()
.build();
<jc>// Parser ignores bar and baz properties.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).readOnlyProperties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#readOnlyProperties--"><code>Bean.readOnlyProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#ro--"><code>Bean.ro()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesReadOnly-java.lang.Class-java.lang.String-">beanPropertiesReadOnly</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClass</code> - The bean class.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesReadOnly-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesReadOnly</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.350">beanPropertiesReadOnly</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesReadOnly-java.lang.String-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Read-only bean properties.
<p>
Specifies one or more properties on a bean that are read-only despite having valid getters.
Serializers will serialize such properties as usual, but parsers will silently ignore them.
Note that this is different from the <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>beanProperties</code></a>/<a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-"><code>beanPropertiesExcludes</code></a> settings which include or exclude properties
for both serializers and parsers.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>;
}
<jc>// Create a serializer with read-only property settings.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesReadOnly(<js>"MyBean"</js>, <js>"bar,baz"</js>)
.build();
<jc>// All 3 properties will be serialized.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a parser with read-only property settings.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.beanPropertiesReadOnly(<js>"MyBean"</js>, <js>"bar,baz"</js>)
.ignoreUnknownBeanProperties()
.build();
<jc>// Parser ignores bar and baz properties.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).readOnlyProperties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#readOnlyProperties--"><code>Bean.readOnlyProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#ro--"><code>Bean.ro()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesReadOnly-java.lang.String-java.lang.String-">beanPropertiesReadOnly</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClassName</code> - The bean class name.
<br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesWriteOnly-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesWriteOnly</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.356">beanPropertiesWriteOnly</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesWriteOnly-java.util.Map-">BeanContextable.Builder</a></code></span></div>
<div class="block">Write-only bean properties.
<p>
Specifies one or more properties on a bean that are write-only despite having valid setters.
Parsers will parse such properties as usual, but serializers will silently ignore them.
Note that this is different from the <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>beanProperties</code></a>/<a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-"><code>beanPropertiesExcludes</code></a> settings which include or exclude properties
for both serializers and parsers.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>;
}
<jc>// Create a serializer with write-only property settings.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesWriteOnly(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>))
.build();
<jc>// Only foo will be serialized.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a parser with write-only property settings.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.beanPropertiesWriteOnly(AMap.<jsm>of</jsm>(<js>"MyBean"</js>, <js>"bar,baz"</js>))
.build();
<jc>// Parser parses all 3 properties.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This method is functionally equivalent to the following code for each entry:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).writeOnlyProperties(<jv>value</jv>.toString()).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#writeOnlyProperties--"><code>Bean.writeOnlyProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#wo--"><code>Bean.wo()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesWriteOnly-java.util.Map-">beanPropertiesWriteOnly</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this builder.
<br>Keys are bean class names which can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.
<br>Values are comma-delimited lists of property names. Non-String objects are first converted to Strings.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesWriteOnly-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesWriteOnly</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.362">beanPropertiesWriteOnly</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;beanClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesWriteOnly-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Write-only bean properties.
<p>
Specifies one or more properties on a bean that are write-only despite having valid setters.
Parsers will parse such properties as usual, but serializers will silently ignore them.
Note that this is different from the <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>beanProperties</code></a>/<a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-"><code>beanPropertiesExcludes</code></a> settings which include or exclude properties
for both serializers and parsers.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>;
}
<jc>// Create a serializer with write-only property settings.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesWriteOnly(MyBean.<jk>class</jk>, <js>"bar,baz"</js>)
.build();
<jc>// Only foo will be serialized.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a parser with write-only property settings.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.beanPropertiesWriteOnly(MyBean.<jk>class</jk>, <js>"bar,baz"</js>)
.build();
<jc>// Parser parses all 3 properties.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).writeOnlyProperties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#writeOnlyProperties--"><code>Bean.writeOnlyProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#wo--"><code>Bean.wo()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesWriteOnly-java.lang.Class-java.lang.String-">beanPropertiesWriteOnly</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClass</code> - The bean class.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beanPropertiesWriteOnly-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beanPropertiesWriteOnly</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.368">beanPropertiesWriteOnly</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;beanClassName,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;properties)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesWriteOnly-java.lang.String-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Write-only bean properties.
<p>
Specifies one or more properties on a bean that are write-only despite having valid setters.
Parsers will parse such properties as usual, but serializers will silently ignore them.
Note that this is different from the <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanProperties-java.lang.Class-java.lang.String-"><code>beanProperties</code></a>/<a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanPropertiesExcludes-java.lang.Class-java.lang.String-"><code>beanPropertiesExcludes</code></a> settings which include or exclude properties
for both serializers and parsers.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>, <jf>bar</jf>, <jf>baz</jf>;
}
<jc>// Create a serializer with write-only property settings.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beanPropertiesWriteOnly(<js>"MyBean"</js>, <js>"bar,baz"</js>)
.build();
<jc>// Only foo will be serialized.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a parser with write-only property settings.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.beanPropertiesWriteOnly(<js>"MyBean"</js>, <js>"bar,baz"</js>)
.build();
<jc>// Parser parses all 3 properties.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar',baz:'baz'}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This method is functionally equivalent to the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).writeOnlyProperties(<jv>properties</jv>).build());
</p>
<ul class='seealso'>
<li class='jma'><a href="../../../../org/apache/juneau/annotation/Bean.html#writeOnlyProperties--"><code>Bean.writeOnlyProperties()</code></a> / <a href="../../../../org/apache/juneau/annotation/Bean.html#wo--"><code>Bean.wo()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beanPropertiesWriteOnly-java.lang.String-java.lang.String-">beanPropertiesWriteOnly</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>beanClassName</code> - The bean class name.
<br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.</dd>
<dd><code>properties</code> - Comma-delimited list of property names.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beansRequireDefaultConstructor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beansRequireDefaultConstructor</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.374">beansRequireDefaultConstructor</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beansRequireDefaultConstructor--">BeanContextable.Builder</a></code></span></div>
<div class="block">Beans require no-arg constructors.
<p>
When enabled, a Java class must implement a default no-arg constructor to be considered a bean.
Otherwise, the bean will be serialized as a string using the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean without a no-arg constructor.</jc>
<jk>public class</jk> MyBean {
<jc>// A property method.</jc>
<jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
<jc>// A no-arg constructor</jc>
<jk>public</jk> MyBean(String <jv>foo</jv>) {
<jk>this</jk>.<jf>foo</jf> = <jv>foo</jv>;
}
<ja>@Override</ja>
<jk>public</jk> String toString() {
<jk>return</jk> <js>"bar"</js>;
}
}
<jc>// Create a serializer that ignores beans without default constructors.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beansRequireDefaultConstructor()
.build();
<jc>// Produces: "bar"</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>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 bean class to override this setting.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a class to ignore it as a bean.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beansRequireDefaultConstructor--"><code>BeanConfig.beansRequireDefaultConstructor()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#beansRequireDefaultConstructor--"><code>BeanContext.Builder.beansRequireDefaultConstructor()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beansRequireDefaultConstructor--">beansRequireDefaultConstructor</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beansRequireSerializable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beansRequireSerializable</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.380">beansRequireSerializable</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beansRequireSerializable--">BeanContextable.Builder</a></code></span></div>
<div class="block">Beans require Serializable interface.
<p>
When enabled, a Java class must implement the <a href="https://docs.oracle.com/javase/8/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.
Otherwise, the bean will be serialized as a string using the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean without a Serializable interface.</jc>
<jk>public class</jk> MyBean {
<jc>// A property method.</jc>
<jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
<ja>@Override</ja>
<jk>public</jk> String toString() {
<jk>return</jk> <js>"bar"</js>;
}
}
<jc>// Create a serializer that ignores beans not implementing Serializable.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beansRequireSerializable()
.build();
<jc>// Produces: "bar"</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>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 bean class to override this setting.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on a class to ignore it as a bean.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beansRequireSerializable--"><code>BeanConfig.beansRequireSerializable()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#beansRequireSerializable--"><code>BeanContext.Builder.beansRequireSerializable()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beansRequireSerializable--">beansRequireSerializable</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="beansRequireSettersForGetters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beansRequireSettersForGetters</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.386">beansRequireSettersForGetters</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beansRequireSettersForGetters--">BeanContextable.Builder</a></code></span></div>
<div class="block">Beans require setters for getters.
<p>
When enabled, ignore read-only properties (properties with getters but not setters).
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean without a Serializable interface.</jc>
<jk>public class</jk> MyBean {
<jc>// A read/write property.</jc>
<jk>public</jk> String getFoo() { <jk>return</jk> <js>"foo"</js>; }
<jk>public void</jk> setFoo(String <jv>foo</jv>) { ... }
<jc>// A read-only property.</jc>
<jk>public</jk> String getBar() { <jk>return</jk> <js>"bar"</js>; }
}
<jc>// Create a serializer that ignores bean properties without setters.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.beansRequireSettersForGetters()
.build();
<jc>// Produces: {"foo":"foo"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can be used on the getter to override this setting.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on getters to ignore them as bean properties.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#beansRequireSettersForGetters--"><code>BeanConfig.beansRequireSettersForGetters()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#beansRequireSettersForGetters--"><code>BeanContext.Builder.beansRequireSettersForGetters()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#beansRequireSettersForGetters--">beansRequireSettersForGetters</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="dictionaryOn-java.lang.Class-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dictionaryOn</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.392">dictionaryOn</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#dictionaryOn-java.lang.Class-java.lang.Class...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean dictionary.
<p>
This is identical to <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#beanDictionary-java.lang.Class...-"><code>BeanContextable.Builder.beanDictionary(Class...)</code></a>, but specifies a dictionary within the context of
a single class as opposed to globally.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// POJOs with @Bean(name) annotations.</jc>
<ja>@Bean</ja>(typeName=<js>"foo"</js>)
<jk>public class</jk> Foo {...}
<ja>@Bean</ja>(typeName=<js>"bar"</js>)
<jk>public class</jk> Bar {...}
<jc>// A bean with a field with an indeterminate type.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Object <jf>mySimpleField</jf>;
}
<jc>// Create a parser and tell it which classes to try to resolve.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.dictionaryOn(MyBean.<jk>class</jk>, Foo.<jk>class</jk>, Bar.<jk>class</jk>)
.build();
<jc>// Parse bean.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{mySimpleField:{_type:'foo',...}}"</js>, MyBean.<jk>class</jk>);
</p>
<p>
This is functionally equivalent to the <a href="../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a> annotation.
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#dictionary--"><code>Bean.dictionary()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#beanDictionary-java.lang.Class...-"><code>BeanContext.Builder.beanDictionary(Class...)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#dictionaryOn-java.lang.Class-java.lang.Class...-">dictionaryOn</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class that the dictionary values apply to.</dd>
<dd><code>values</code> - The new values for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="disableBeansRequireSomeProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableBeansRequireSomeProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.398">disableBeansRequireSomeProperties</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#disableBeansRequireSomeProperties--">BeanContextable.Builder</a></code></span></div>
<div class="block">Beans don't require at least one property.
<p>
When enabled, then a Java class doesn't need to contain at least 1 property to be considered a bean.
Otherwise, the bean will be serialized as a string using the <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a> method.
<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>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with no properties.</jc>
<jk>public class</jk> MyBean {
}
<jc>// Create a serializer that serializes beans even if they have zero properties.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.disableBeansRequireSomeProperties()
.build();
<jc>// Produces: {}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>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 the class to force it to be recognized as a bean class
even if it has no properties.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#disableBeansRequireSomeProperties--"><code>BeanConfig.disableBeansRequireSomeProperties()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#disableBeansRequireSomeProperties--"><code>BeanContext.Builder.disableBeansRequireSomeProperties()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#disableBeansRequireSomeProperties--">disableBeansRequireSomeProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="disableIgnoreMissingSetters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableIgnoreMissingSetters</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.404">disableIgnoreMissingSetters</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#disableIgnoreMissingSetters--">BeanContextable.Builder</a></code></span></div>
<div class="block">Don't silently ignore missing setters.
<p>
When enabled, trying to set a value on a bean property without a setter will throw a <a href="../../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a>.
Otherwise, it will be silently ignored.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a property with a getter but not a setter.</jc>
<jk>public class</jk> MyBean {
<jk>public void</jk> getFoo() {
<jk>return</jk> <js>"foo"</js>;
}
}
<jc>// Create a parser that throws an exception if a setter is not found but a getter is.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.disableIgnoreMissingSetters()
.build();
<jc>// Throws a ParseException.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on getters and fields to ignore them.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#disableIgnoreMissingSetters--"><code>BeanConfig.disableIgnoreMissingSetters()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#disableIgnoreMissingSetters--"><code>BeanContext.Builder.disableIgnoreMissingSetters()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#disableIgnoreMissingSetters--">disableIgnoreMissingSetters</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="disableIgnoreTransientFields--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableIgnoreTransientFields</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.410">disableIgnoreTransientFields</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#disableIgnoreTransientFields--">BeanContextable.Builder</a></code></span></div>
<div class="block">Don't ignore transient fields.
<p>
When enabled, methods and fields marked as <jk>transient</jk> will not be ignored as bean properties.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a transient field.</jc>
<jk>public class</jk> MyBean {
<jk>public transient</jk> String <jf>foo</jf> = <js>"foo"</js>;
}
<jc>// Create a serializer that doesn't ignore transient fields.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.disableIgnoreTransientFields()
.build();
<jc>// Produces: {"foo":"foo"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used on transient fields to keep them from being ignored.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#disableIgnoreTransientFields--"><code>BeanConfig.disableIgnoreTransientFields()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#disableIgnoreTransientFields--"><code>BeanContext.Builder.disableIgnoreTransientFields()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#disableIgnoreTransientFields--">disableIgnoreTransientFields</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="disableIgnoreUnknownNullBeanProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableIgnoreUnknownNullBeanProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.416">disableIgnoreUnknownNullBeanProperties</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#disableIgnoreUnknownNullBeanProperties--">BeanContextable.Builder</a></code></span></div>
<div class="block">Don't ignore unknown properties with null values.
<p>
When enabled, trying to set a <jk>null</jk> value on a non-existent bean property will throw a <a href="../../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a>.
Otherwise it will be silently ignored.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a single property.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>;
}
<jc>// Create a parser that throws an exception on an unknown property even if the value being set is null.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.disableIgnoreUnknownNullBeanProperties()
.build();
<jc>// Throws a BeanRuntimeException wrapped in a ParseException on the unknown 'bar' property.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:null}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#disableIgnoreUnknownNullBeanProperties--"><code>BeanConfig.disableIgnoreUnknownNullBeanProperties()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#disableIgnoreUnknownNullBeanProperties--"><code>BeanContext.Builder.disableIgnoreUnknownNullBeanProperties()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#disableIgnoreUnknownNullBeanProperties--">disableIgnoreUnknownNullBeanProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="disableInterfaceProxies--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableInterfaceProxies</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.422">disableInterfaceProxies</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#disableInterfaceProxies--">BeanContextable.Builder</a></code></span></div>
<div class="block">Don't use interface proxies.
<p>
When enabled, interfaces will be instantiated as proxy classes through the use of an
<a href="https://docs.oracle.com/javase/8/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.
Otherwise, throws a <a href="../../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a>.
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#disableInterfaceProxies--"><code>BeanConfig.disableInterfaceProxies()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#disableInterfaceProxies--"><code>BeanContext.Builder.disableInterfaceProxies()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#disableInterfaceProxies--">disableInterfaceProxies</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="example-java.lang.Class-java.lang.Object-">
<!-- -->
</a><a name="example-java.lang.Class-T-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>example</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.428">example</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;pojoClass,
T&nbsp;o)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#example-java.lang.Class-T-">BeanContextable.Builder</a></code></span></div>
<div class="block">POJO example.
<p>
Specifies an example of the specified class.
<p>
Examples are used in cases such as POJO examples in Swagger documents.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer that excludes the 'foo' and 'bar' properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.example(MyBean.<jk>class</jk>, <jk>new</jk> MyBean().setFoo(<js>"foo"</js>).setBar(123))
.build();
</p>
<p>
This is a shorthand method for the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>pojoClass</jv>).example(SimpleJson.<jsf>DEFAULT</jsf>.toString(<jv>object</jv>)).build())
</p>
<ul class='notes'>
<li class='note'>Using this method assumes the serialized form of the object is the same as that produced
by the default serializer. This may not be true based on settings or swaps on the constructed serializer.
</ul>
<p>
POJO examples can also be defined on classes via the following:
<ul class='spaced-list'>
<li>The <a href="../../../../org/apache/juneau/annotation/Marshalled.html#example--"><code>Marshalled.example()</code></a> annotation on the class itself.
<li>A static field annotated with <a href="../../../../org/apache/juneau/annotation/Example.html" title="annotation in org.apache.juneau.annotation"><code>@Example</code></a>.
<li>A static method annotated with <a href="../../../../org/apache/juneau/annotation/Example.html" title="annotation in org.apache.juneau.annotation"><code>@Example</code></a> with zero arguments or one <a href="../../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau"><code>BeanSession</code></a> argument.
<li>A static method with name <c>example</c> with no arguments or one <a href="../../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau"><code>BeanSession</code></a> argument.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#example-java.lang.Class-T-">example</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The POJO class.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pojoClass</code> - The POJO class.</dd>
<dd><code>o</code> - An instance of the POJO class used for examples.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="example-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>example</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.434">example</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;pojoClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;json)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#example-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">POJO example.
<p>
Specifies an example in JSON of the specified class.
<p>
Examples are used in cases such as POJO examples in Swagger documents.
<p>
Setting applies to specified class and all subclasses.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer that excludes the 'foo' and 'bar' properties on the MyBean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.example(MyBean.<jk>class</jk>, <js>"{foo:'bar'}"</js>)
.build();
</p>
<p>
This is a shorthand method for the following code:
<p class='bjava'>
<jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>pojoClass</jv>).example(<jv>json</jv>).build())
</p>
<p>
POJO examples can also be defined on classes via the following:
<ul class='spaced-list'>
<li>A static field annotated with <a href="../../../../org/apache/juneau/annotation/Example.html" title="annotation in org.apache.juneau.annotation"><code>@Example</code></a>.
<li>A static method annotated with <a href="../../../../org/apache/juneau/annotation/Example.html" title="annotation in org.apache.juneau.annotation"><code>@Example</code></a> with zero arguments or one <a href="../../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau"><code>BeanSession</code></a> argument.
<li>A static method with name <c>example</c> with no arguments or one <a href="../../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau"><code>BeanSession</code></a> argument.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Marshalled.html#example--"><code>Marshalled.example()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#example-java.lang.Class-java.lang.String-">example</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The POJO class type.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pojoClass</code> - The POJO class.</dd>
<dd><code>json</code> - The simple JSON representation of the example.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="findFluentSetters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findFluentSetters</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.440">findFluentSetters</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#findFluentSetters--">BeanContextable.Builder</a></code></span></div>
<div class="block">Find fluent setters.
<p>
When enabled, fluent setters are detected on beans during parsing.
<p>
Fluent setters must have the following attributes:
<ul>
<li>Public.
<li>Not static.
<li>Take in one parameter.
<li>Return the bean itself.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a fluent setter.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> MyBean foo(String <jv>value</jv>) {...}
}
<jc>// Create a parser that finds fluent setters.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.findFluentSetters()
.build();
<jc>// Parse into bean using fluent setter.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Beanp.html" title="annotation in org.apache.juneau.annotation"><code>@Beanp</code></a> annotation can also be used on methods to individually identify them as fluent setters.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Bean.html#findFluentSetters--"><code>@Bean.fluentSetters()</code></a> annotation can also be used on classes to specify to look for fluent setters.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#findFluentSetters--"><code>Bean.findFluentSetters()</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#findFluentSetters--"><code>BeanConfig.findFluentSetters()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#findFluentSetters--"><code>BeanContext.Builder.findFluentSetters()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#findFluentSetters--">findFluentSetters</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="findFluentSetters-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findFluentSetters</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.446">findFluentSetters</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#findFluentSetters-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Find fluent setters.
<p>
Identical to <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#findFluentSetters--"><code>BeanContextable.Builder.findFluentSetters()</code></a> but enables it on a specific class only.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a fluent setter.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> MyBean foo(String <jv>value</jv>) {...}
}
<jc>// Create a parser that finds fluent setters.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.findFluentSetters(MyBean.<jk>class</jk>)
.build();
<jc>// Parse into bean using fluent setter.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='notes'>
<li class='note'>This method is functionally equivalent to using the <a href="../../../../org/apache/juneau/annotation/Bean.html#findFluentSetters--"><code>Bean.findFluentSetters()</code></a> annotation.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#findFluentSetters--"><code>Bean.findFluentSetters()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#findFluentSetters--"><code>BeanContext.Builder.findFluentSetters()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#findFluentSetters-java.lang.Class-">findFluentSetters</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class that this applies to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="ignoreInvocationExceptionsOnGetters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignoreInvocationExceptionsOnGetters</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.452">ignoreInvocationExceptionsOnGetters</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreInvocationExceptionsOnGetters--">BeanContextable.Builder</a></code></span></div>
<div class="block">Ignore invocation errors on getters.
<p>
When enabled, errors thrown when calling bean getter methods will silently be ignored.
Otherwise, a <code>BeanRuntimeException</code> is thrown.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a property that throws an exception.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String getFoo() {
<jk>throw new</jk> RuntimeException(<js>"foo"</js>);
}
}
<jc>// Create a serializer that ignores bean getter exceptions.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.ingoreInvocationExceptionsOnGetters()
.build();
<jc>// Exception is ignored.</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#ignoreInvocationExceptionsOnGetters--"><code>BeanConfig.ignoreInvocationExceptionsOnGetters()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#ignoreInvocationExceptionsOnGetters--"><code>BeanContext.Builder.ignoreInvocationExceptionsOnGetters()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#ignoreInvocationExceptionsOnGetters--">ignoreInvocationExceptionsOnGetters</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="ignoreInvocationExceptionsOnSetters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignoreInvocationExceptionsOnSetters</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.458">ignoreInvocationExceptionsOnSetters</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreInvocationExceptionsOnSetters--">BeanContextable.Builder</a></code></span></div>
<div class="block">Ignore invocation errors on setters.
<p>
When enabled, errors thrown when calling bean setter methods will silently be ignored.
Otherwise, a <code>BeanRuntimeException</code> is thrown.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a property that throws an exception.</jc>
<jk>public class</jk> MyBean {
<jk>public void</jk> setFoo(String <jv>foo</jv>) {
<jk>throw new</jk> RuntimeException(<js>"foo"</js>);
}
}
<jc>// Create a parser that ignores bean setter exceptions.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.ignoreInvocationExceptionsOnSetters()
.build();
<jc>// Exception is ignored.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'bar'}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#ignoreInvocationExceptionsOnSetters--"><code>BeanConfig.ignoreInvocationExceptionsOnSetters()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#ignoreInvocationExceptionsOnSetters--"><code>BeanContext.Builder.ignoreInvocationExceptionsOnSetters()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#ignoreInvocationExceptionsOnSetters--">ignoreInvocationExceptionsOnSetters</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="ignoreUnknownBeanProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignoreUnknownBeanProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.464">ignoreUnknownBeanProperties</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreUnknownBeanProperties--">BeanContextable.Builder</a></code></span></div>
<div class="block">Ignore unknown properties.
<p>
When enabled, trying to set a value on a non-existent bean property will silently be ignored.
Otherwise, a <code>BeanRuntimeException</code> is thrown.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a single property.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf>;
}
<jc>// Create a parser that ignores missing bean properties.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.ignoreUnknownBeanProperties()
.build();
<jc>// Doesn't throw an exception on unknown 'bar' property.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"{foo:'foo',bar:'bar'}"</js>, MyBean.<jk>class</jk>);
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#ignoreUnknownBeanProperties--"><code>BeanConfig.ignoreUnknownBeanProperties()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#ignoreUnknownBeanProperties--"><code>BeanContext.Builder.ignoreUnknownBeanProperties()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#ignoreUnknownBeanProperties--">ignoreUnknownBeanProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="ignoreUnknownEnumValues--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ignoreUnknownEnumValues</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.470">ignoreUnknownEnumValues</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#ignoreUnknownEnumValues--">BeanContextable.Builder</a></code></span></div>
<div class="block">Ignore unknown enum values.
<p>
When enabled, unknown enum values are set to <jk>null</jk> instead of throwing a parse exception.
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#ignoreUnknownEnumValues--"><code>BeanConfig.ignoreUnknownEnumValues()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#ignoreUnknownEnumValues--"><code>BeanContext.Builder.ignoreUnknownEnumValues()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#ignoreUnknownEnumValues--">ignoreUnknownEnumValues</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="implClass-java.lang.Class-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>implClass</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.476">implClass</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;interfaceClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;implClass)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#implClass-java.lang.Class-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Implementation classes.
<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).
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean interface.</jc>
<jk>public interface</jk> MyBean {
...
}
<jc>// A bean implementation.</jc>
<jk>public class</jk> MyBeanImpl <jk>implements</jk> MyBean {
...
}
<jc>// Create a parser that instantiates MyBeanImpls when parsing MyBeans.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.implClass(MyBean.<jk>class</jk>, MyBeanImpl.<jk>class</jk>)
.build();
<jc>// Instantiates a MyBeanImpl,</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"..."</js>, MyBean.<jk>class</jk>);
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#implClass-java.lang.Class-java.lang.Class-">implClass</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>interfaceClass</code> - The interface class.</dd>
<dd><code>implClass</code> - The implementation class.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="implClasses-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>implClasses</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.482">implClasses</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&gt;&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#implClasses-java.util.Map-">BeanContextable.Builder</a></code></span></div>
<div class="block">Implementation classes.
<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).
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a single property.</jc>
<jk>public interface</jk> MyBean {
...
}
<jc>// A bean with a single property.</jc>
<jk>public class</jk> MyBeanImpl <jk>implements</jk> MyBean {
...
}
<jc>// Create a parser that instantiates MyBeanImpls when parsing MyBeans.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.implClasses(AMap.<jsm>of</jsm>(MyBean.<jk>class</jk>, MyBeanImpl.<jk>class</jk>))
.build();
<jc>// Instantiates a MyBeanImpl,</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"..."</js>, MyBean.<jk>class</jk>);
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#implClasses-java.util.Map-">implClasses</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="interfaceClass-java.lang.Class-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>interfaceClass</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.488">interfaceClass</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#interfaceClass-java.lang.Class-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Identifies a class to be used as the interface class for the specified class and all subclasses.
<p>
When specified, only the list of properties defined on the interface class will be used during serialization.
Additional properties on subclasses will be ignored.
<p class='bjava'>
<jc>// Parent class or interface</jc>
<jk>public abstract class</jk> A {
<jk>public</jk> String <jf>foo</jf> = <js>"foo"</js>;
}
<jc>// Sub class</jc>
<jk>public class</jk> A1 <jk>extends</jk> A {
<jk>public</jk> String <jf>bar</jf> = <js>"bar"</js>;
}
<jc>// Create a serializer and define our interface class mapping.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.interfaceClass(A1.<jk>class</jk>, A.<jk>class</jk>)
.build();
<jc>// Produces "{"foo":"foo"}"</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> A1());
</p>
<p>
This annotation can be used on the parent class so that it filters to all child classes, or can be set
individually on the child classes.
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Bean.html#interfaceClass--"><code>@Bean(interfaceClass)</code></a> annotation is the equivalent annotation-based solution.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#interfaceClass-java.lang.Class-java.lang.Class-">interfaceClass</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class that the interface class applies to.</dd>
<dd><code>value</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="interfaces-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>interfaces</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.494">interfaces</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#interfaces-java.lang.Class...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Identifies a set of interfaces.
<p>
When specified, only the list of properties defined on the interface class will be used during serialization
of implementation classes. Additional properties on subclasses will be ignored.
<p class='bjava'>
<jc>// Parent class or interface</jc>
<jk>public abstract class</jk> A {
<jk>public</jk> String <jf>foo</jf> = <js>"foo"</js>;
}
<jc>// Sub class</jc>
<jk>public class</jk> A1 <jk>extends</jk> A {
<jk>public</jk> String <jf>bar</jf> = <js>"bar"</js>;
}
<jc>// Create a serializer and define our interface class mapping.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.interfaces(A.<jk>class</jk>)
.build();
<jc>// Produces "{"foo":"foo"}"</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> A1());
</p>
<p>
This annotation can be used on the parent class so that it filters to all child classes, or can be set
individually on the child classes.
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Bean.html#interfaceClass--"><code>@Bean(interfaceClass)</code></a> annotation is the equivalent annotation-based solution.
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#interfaces-java.lang.Class...-">interfaces</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="locale-java.util.Locale-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>locale</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.500">locale</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#locale-java.util.Locale-">BeanContextable.Builder</a></code></span></div>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> Locale.
<p>
Specifies the default locale for serializer and parser sessions when not specified via <a href="../../../../org/apache/juneau/BeanSession.Builder.html#locale-java.util.Locale-"><code>BeanSession.Builder.locale(Locale)</code></a>.
Typically used for POJO swaps that need to deal with locales such as swaps that convert <l>Date</l> and <l>Calendar</l>
objects to strings by accessing it via the session passed into the <a href="../../../../org/apache/juneau/swap/ObjectSwap.html#swap-org.apache.juneau.BeanSession-T-"><code>ObjectSwap.swap(BeanSession, Object)</code></a> and
<a href="../../../../org/apache/juneau/swap/ObjectSwap.html#unswap-org.apache.juneau.BeanSession-S-org.apache.juneau.ClassMeta-java.lang.String-"><code>ObjectSwap.unswap(BeanSession, Object, ClassMeta, String)</code></a> methods.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Define a POJO swap that skips serializing beans if we're in the UK.</jc>
<jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap&lt;MyBean&gt; {
<ja>@Override</ja>
<jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
<jk>if</jk> (<jv>session</jv>.getLocale().equals(Locale.<jsf>UK</jsf>))
<jk>return null</jk>;
<jk>return</jk> <jv>bean</jv>.toString();
}
}
<jc>// Create a serializer that uses the specified locale if it's not passed in through session args.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.locale(Locale.<jsf>UK</jsf>)
.swaps(MyBeanSwap.<jk>class</jk>)
.build();
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#locale--"><code>BeanConfig.locale()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#locale-java.util.Locale-"><code>BeanContext.Builder.locale(Locale)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanSession.Builder.html#locale-java.util.Locale-"><code>BeanSession.Builder.locale(Locale)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#locale-java.util.Locale-">locale</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="mediaType-org.apache.juneau.MediaType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mediaType</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.506">mediaType</a>(<a href="../../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#mediaType-org.apache.juneau.MediaType-">BeanContextable.Builder</a></code></span></div>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> Media type.
<p>
Specifies the default media type for serializer and parser sessions when not specified via <a href="../../../../org/apache/juneau/BeanSession.Builder.html#mediaType-org.apache.juneau.MediaType-"><code>BeanSession.Builder.mediaType(MediaType)</code></a>.
Typically used for POJO swaps that need to serialize the same POJO classes differently depending on
the specific requested media type. For example, a swap could handle a request for media types <js>"application/json"</js>
and <js>"application/json+foo"</js> slightly differently even though they're both being handled by the same JSON
serializer or parser.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Define a POJO swap that skips serializing beans if the media type is application/json.</jc>
<jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap&lt;MyBean&gt; {
<ja>@Override</ja>
<jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
<jk>if</jk> (<jv>session</jv>.getMediaType().equals(<js>"application/json"</js>))
<jk>return null</jk>;
<jk>return</jk> <jv>bean</jv>.toString();
}
}
<jc>// Create a serializer that uses the specified media type if it's not passed in through session args.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.mediaType(MediaType.<jsf>JSON</jsf>)
.build();
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#mediaType--"><code>BeanConfig.mediaType()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#mediaType-org.apache.juneau.MediaType-"><code>BeanContext.Builder.mediaType(MediaType)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanSession.Builder.html#mediaType-org.apache.juneau.MediaType-"><code>BeanSession.Builder.mediaType(MediaType)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#mediaType-org.apache.juneau.MediaType-">mediaType</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="notBeanClasses-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notBeanClasses</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.512">notBeanClasses</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#notBeanClasses-java.lang.Class...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean class exclusions.
<p>
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to <c>Strings</c> during serialization.
<p>
Values can consist of any of the following types:
<ul>
<li>Classes.
<li>Arrays and collections of classes.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a single property.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
<jk>public</jk> String toString() {
<jk>return</jk> <js>"baz"</js>;
}
}
<jc>// Create a serializer that doesn't treat MyBean as a bean class.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.notBeanClasses(MyBean.<jk>class</jk>)
.build();
<jc>// Produces "baz" instead of {"foo":"bar"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>@BeanIgnore</code></a> annotation can also be used on classes to prevent them from being recognized as beans.
</ul>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanIgnore.html" title="annotation in org.apache.juneau.annotation"><code>BeanIgnore</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#notBeanClasses--"><code>BeanConfig.notBeanClasses()</code></a>
<li class='jf'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#notBeanClasses--"><code>BeanContext.Builder.notBeanClasses()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#notBeanClasses-java.lang.Class...-">notBeanClasses</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this setting.
<br>Values can consist of any of the following types:
<ul>
<li>Classes.
<li>Arrays and collections of classes.
</ul></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="notBeanPackages-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notBeanPackages</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.518">notBeanPackages</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>...&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#notBeanPackages-java.lang.String...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean package exclusions.
<p>
Used as a convenient way of defining the <a href="../../../../org/apache/juneau/BeanContext.Builder.html#notBeanClasses-java.lang.Class...-"><code>BeanContext.Builder.notBeanClasses(Class...)</code></a> property for entire packages.
Any classes within these packages will be serialized to strings using <a href="https://docs.oracle.com/javase/8/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 suffix patterns to include all subpackages.
<p>
Values can consist of any of the following types:
<ul>
<li>Strings.
<li>Arrays and collections of strings.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer that ignores beans in the specified packages.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.notBeanPackages(<js>"org.apache.foo"</js>, <js>"org.apache.bar.*"</js>)
.build();
</p>
<ul class='seealso'>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#notBeanPackages-java.lang.String...-"><code>BeanContext.Builder.notBeanPackages(String...)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#notBeanPackages-java.lang.String...-">notBeanPackages</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this setting.
<br>Values can consist of any of the following types:
<ul>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Package.html?is-external=true" title="class or interface in java.lang"><code>Package</code></a> objects.
<li>Strings.
<li>Arrays and collections of anything in this list.
</ul></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="propertyNamer-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>propertyNamer</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.524">propertyNamer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#propertyNamer-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property namer
<p>
The class to use for calculating bean property names.
<p>
Predefined classes:
<ul>
<li><a href="../../../../org/apache/juneau/BasicPropertyNamer.html" title="class in org.apache.juneau"><code>BasicPropertyNamer</code></a> - Default.
<li><a href="../../../../org/apache/juneau/PropertyNamerDLC.html" title="class in org.apache.juneau"><code>PropertyNamerDLC</code></a> - Dashed-lower-case names.
<li><a href="../../../../org/apache/juneau/PropertyNamerULC.html" title="class in org.apache.juneau"><code>PropertyNamerULC</code></a> - Dashed-upper-case names.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a single property.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>fooBarBaz</jf> = <js>"fooBarBaz"</js>;
}
<jc>// Create a serializer that uses Dashed-Lower-Case property names.</jc>
<jc>// (e.g. "foo-bar-baz" instead of "fooBarBaz")</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.propertyNamer(PropertyNamerDLC.<jk>class</jk>)
.build();
<jc>// Produces: {"foo-bar-baz":"fooBarBaz"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='seealso'>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#propertyNamer-java.lang.Class-"><code>BeanContext.Builder.propertyNamer(Class)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#propertyNamer-java.lang.Class-">propertyNamer</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.
<br>The default is <a href="../../../../org/apache/juneau/BasicPropertyNamer.html" title="class in org.apache.juneau"><code>BasicPropertyNamer</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="propertyNamer-java.lang.Class-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>propertyNamer</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.530">propertyNamer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/PropertyNamer.html" title="interface in org.apache.juneau">PropertyNamer</a>&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#propertyNamer-java.lang.Class-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean property namer
<p>
Same as <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#propertyNamer-java.lang.Class-"><code>BeanContextable.Builder.propertyNamer(Class)</code></a> but allows you to specify a namer for a specific class.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with a single property.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>fooBarBaz</jf> = <js>"fooBarBaz"</js>;
}
<jc>// Create a serializer that uses Dashed-Lower-Case property names for the MyBean class only.</jc>
<jc>// (e.g. "foo-bar-baz" instead of "fooBarBaz")</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.propertyNamer(MyBean.<jk>class</jk>, PropertyNamerDLC.<jk>class</jk>)
.build();
<jc>// Produces: {"foo-bar-baz":"fooBarBaz"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#propertyNamer--"><code>Bean(propertyNamer)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#propertyNamer-java.lang.Class-"><code>BeanContext.Builder.propertyNamer(Class)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#propertyNamer-java.lang.Class-java.lang.Class-">propertyNamer</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class that the namer applies to.</dd>
<dd><code>value</code> - The new value for this setting.
<br>The default is <a href="../../../../org/apache/juneau/BasicPropertyNamer.html" title="class in org.apache.juneau"><code>BasicPropertyNamer</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="sortProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sortProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.536">sortProperties</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#sortProperties--">BeanContextable.Builder</a></code></span></div>
<div class="block">Sort bean properties.
<p>
When enabled, all bean properties will be serialized and access in alphabetical order.
Otherwise, the natural order of the bean properties is used which is dependent on the JVM vendor.
On IBM JVMs, the bean properties are ordered based on their ordering in the Java file.
On Oracle JVMs, the bean properties are not ordered (which follows the official JVM specs).
<p>
this setting 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
in the Java file.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>c</jf> = <js>"1"</js>;
<jk>public</jk> String <jf>b</jf> = <js>"2"</js>;
<jk>public</jk> String <jf>a</jf> = <js>"3"</js>;
}
<jc>// Create a serializer that sorts bean properties.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.sortProperties()
.build();
<jc>// Produces: {"a":"3","b":"2","c":"1"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Bean.html#sort--"><code>@Bean.sort()</code></a> annotation can also be used to sort properties on just a single class.
</ul>
<ul class='seealso'>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#sortProperties--"><code>BeanContext.Builder.sortProperties()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#sortProperties--">sortProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="sortProperties-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sortProperties</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.542">sortProperties</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;on)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#sortProperties-java.lang.Class...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Sort bean properties.
<p>
Same as <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#sortProperties--"><code>BeanContextable.Builder.sortProperties()</code></a> but allows you to specify individual bean classes instead of globally.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// A bean with 3 properties.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> String <jf>c</jf> = <js>"1"</js>;
<jk>public</jk> String <jf>b</jf> = <js>"2"</js>;
<jk>public</jk> String <jf>a</jf> = <js>"3"</js>;
}
<jc>// Create a serializer that sorts properties on MyBean.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.sortProperties(MyBean.<jk>class</jk>)
.build();
<jc>// Produces: {"a":"3","b":"2","c":"1"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#sort--"><code>Bean(sort)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#sortProperties--"><code>BeanContext.Builder.sortProperties()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#sortProperties-java.lang.Class...-">sortProperties</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The bean classes to sort properties on.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="stopClass-java.lang.Class-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopClass</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.548">stopClass</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#stopClass-java.lang.Class-java.lang.Class-">BeanContextable.Builder</a></code></span></div>
<div class="block">Identifies a stop class for the annotated class.
<p>
Identical in purpose to the stop class specified by <a href="https://docs.oracle.com/javase/8/docs/api/java/beans/Introspector.html?is-external=true#getBeanInfo-java.lang.Class-java.lang.Class-" title="class or interface in java.beans"><code>Introspector.getBeanInfo(Class, Class)</code></a>.
Any properties in the stop class or in its base classes will be ignored during analysis.
<p>
For example, in the following class hierarchy, instances of <c>C3</c> will include property <c>p3</c>,
but not <c>p1</c> or <c>p2</c>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jk>public class</jk> C1 {
<jk>public int</jk> getP1();
}
<jk>public class</jk> C2 <jk>extends</jk> C1 {
<jk>public int</jk> getP2();
}
<jk>public class</jk> C3 <jk>extends</jk> C2 {
<jk>public int</jk> getP3();
}
<jc>// Create a serializer specifies a stop class for C3.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.stopClass(C3.<jk>class</jk>, C2.<jk>class</jk>)
.build();
<jc>// Produces: {"p3":"..."}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> C3());
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#stopClass-java.lang.Class-java.lang.Class-">stopClass</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class on which the stop class is being applied.</dd>
<dd><code>value</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swap</h4>
<pre>public&nbsp;&lt;T,S&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.554">swap</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;normalClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;S&gt;&nbsp;swappedClass,
<a href="../../../../org/apache/juneau/utils/ThrowingFunction.html" title="interface in org.apache.juneau.utils">ThrowingFunction</a>&lt;T,S&gt;&nbsp;swapFunction)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-">BeanContextable.Builder</a></code></span></div>
<div class="block">A shortcut for defining a <a href="../../../../org/apache/juneau/swap/FunctionalSwap.html" title="class in org.apache.juneau.swap"><code>FunctionalSwap</code></a>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer that performs a custom format for Date objects.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.swap(Date.<jk>class</jk>, String.<jk>class</jk>, <jv>x</jv> -&gt; <jsm>format</jsm>(<jv>x</jv>))
.build();
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-">swap</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The object type being swapped out.</dd>
<dd><code>S</code> - The object type being swapped in.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>normalClass</code> - The object type being swapped out.</dd>
<dd><code>swappedClass</code> - The object type being swapped in.</dd>
<dd><code>swapFunction</code> - The function to convert the object.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-org.apache.juneau.utils.ThrowingFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swap</h4>
<pre>public&nbsp;&lt;T,S&gt;&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.560">swap</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;normalClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;S&gt;&nbsp;swappedClass,
<a href="../../../../org/apache/juneau/utils/ThrowingFunction.html" title="interface in org.apache.juneau.utils">ThrowingFunction</a>&lt;T,S&gt;&nbsp;swapFunction,
<a href="../../../../org/apache/juneau/utils/ThrowingFunction.html" title="interface in org.apache.juneau.utils">ThrowingFunction</a>&lt;S,T&gt;&nbsp;unswapFunction)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-org.apache.juneau.utils.ThrowingFunction-">BeanContextable.Builder</a></code></span></div>
<div class="block">A shortcut for defining a <a href="../../../../org/apache/juneau/swap/FunctionalSwap.html" title="class in org.apache.juneau.swap"><code>FunctionalSwap</code></a>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer that performs a custom format for Date objects.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.swap(Date.<jk>class</jk>, String.<jk>class</jk>, <jv>x</jv> -&gt; <jsm>format</jsm>(<jv>x</jv>), <jv>x</jv> -&gt; <jsm>parse</jsm>(<jv>x</jv>))
.build();
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#swap-java.lang.Class-java.lang.Class-org.apache.juneau.utils.ThrowingFunction-org.apache.juneau.utils.ThrowingFunction-">swap</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The object type being swapped out.</dd>
<dd><code>S</code> - The object type being swapped in.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>normalClass</code> - The object type being swapped out.</dd>
<dd><code>swappedClass</code> - The object type being swapped in.</dd>
<dd><code>swapFunction</code> - The function to convert the object during serialization.</dd>
<dd><code>unswapFunction</code> - The function to convert the object during parsing.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="swaps-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swaps</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.566">swaps</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;...&nbsp;values)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#swaps-java.lang.Class...-">BeanContextable.Builder</a></code></span></div>
<div class="block">Java object swaps.
<p>
Swaps are used to "swap out" non-serializable classes with serializable equivalents during serialization,
and "swap in" the non-serializable class during parsing.
<p>
An example of a swap would be a <c>Calendar</c> object that gets swapped out for an ISO8601 string.
<p>
Multiple swaps can be associated with a single class.
When multiple swaps are applicable to the same class, the media type pattern defined by
<a href="../../../../org/apache/juneau/swap/ObjectSwap.html#forMediaTypes--"><code>ObjectSwap.forMediaTypes()</code></a> or <a href="../../../../org/apache/juneau/annotation/Swap.html#mediaTypes--"><code>@Swap(mediaTypes)</code></a> are used to come up with the best match.
<p>
Values can consist of any of the following types:
<ul>
<li>Any subclass of <a href="../../../../org/apache/juneau/swap/ObjectSwap.html" title="class in org.apache.juneau.swap"><code>ObjectSwap</code></a>.
<li>Any instance of <a href="../../../../org/apache/juneau/swap/ObjectSwap.html" title="class in org.apache.juneau.swap"><code>ObjectSwap</code></a>.
<li>Any surrogate class. A shortcut for defining a <a href="../../../../org/apache/juneau/swap/SurrogateSwap.html" title="class in org.apache.juneau.swap"><code>SurrogateSwap</code></a>.
<li>Any array or collection of the objects above.
</ul>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Sample swap for converting Dates to ISO8601 strings.</jc>
<jk>public class</jk> MyDateSwap <jk>extends</jk> StringSwap&lt;Date&gt; {
<jc>// ISO8601 formatter.</jc>
<jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
<ja>@Override</ja>
<jk>public</jk> String swap(BeanSession <jv>session</jv>, Date <jv>date</jv>) {
<jk>return</jk> <jf>format</jf>.format(<jv>date</jv>);
}
<ja>@Override</ja>
<jk>public</jk> Date unswap(BeanSession <jv>session</jv>, String <jv>string</jv>, ClassMeta <jv>hint</jv>) <jk>throws</jk> Exception {
<jk>return</jk> <jf>format</jf>.parse(<jv>string</jv>);
}
}
<jc>// Sample bean with a Date field.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Date <jf>date</jf> = <jk>new</jk> Date(112, 2, 3, 4, 5, 6);
}
<jc>// Create a serializer that uses our date swap.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.swaps(MyDateSwap.<jk>class</jk>)
.build();
<jc>// Produces: {"date":"2012-03-03T04:05:06-0500"}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Create a serializer that uses our date swap.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.swaps(MyDateSwap.<jk>class</jk>)
.build();
<jc>// Use our parser to parse a bean.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<jv>json</jv>, MyBean.<jk>class</jk>);
</p>
<ul class='notes'>
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Swap.html" title="annotation in org.apache.juneau.annotation"><code>@Swap</code></a> annotation can also be used on classes to identify swaps for the class.
<li class='note'>The <a href="../../../../org/apache/juneau/annotation/Swap.html" title="annotation in org.apache.juneau.annotation"><code>@Swap</code></a> annotation can also be used on bean methods and fields to identify swaps for values of those bean properties.
</ul>
<ul class='seealso'>
<li class='jf'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#swaps-java.lang.Class...-"><code>BeanContext.Builder.swaps(Class...)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#swaps-java.lang.Class...-">swaps</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>values</code> - The values to add to this setting.
<br>Values can consist of any of the following types:
<ul>
<li>Any subclass of <a href="../../../../org/apache/juneau/swap/ObjectSwap.html" title="class in org.apache.juneau.swap"><code>ObjectSwap</code></a>.
<li>Any surrogate class. A shortcut for defining a <a href="../../../../org/apache/juneau/swap/SurrogateSwap.html" title="class in org.apache.juneau.swap"><code>SurrogateSwap</code></a>.
<li>Any array or collection of the objects above.
</ul></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="timeZone-java.util.TimeZone-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timeZone</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.572">timeZone</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#timeZone-java.util.TimeZone-">BeanContextable.Builder</a></code></span></div>
<div class="block"><i><l>Context</l> configuration property:&emsp;</i> TimeZone.
<p>
Specifies the default time zone for serializer and parser sessions when not specified via <a href="../../../../org/apache/juneau/BeanSession.Builder.html#timeZone-java.util.TimeZone-"><code>BeanSession.Builder.timeZone(TimeZone)</code></a>.
Typically used for POJO swaps that need to deal with timezones such as swaps that convert <l>Date</l> and <l>Calendar</l>
objects to strings by accessing it via the session passed into the <a href="../../../../org/apache/juneau/swap/ObjectSwap.html#swap-org.apache.juneau.BeanSession-T-"><code>ObjectSwap.swap(BeanSession, Object)</code></a> and
<a href="../../../../org/apache/juneau/swap/ObjectSwap.html#unswap-org.apache.juneau.BeanSession-S-org.apache.juneau.ClassMeta-java.lang.String-"><code>ObjectSwap.unswap(BeanSession, Object, ClassMeta, String)</code></a> methods.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Define a POJO swap that skips serializing beans if the time zone is GMT.</jc>
<jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap&lt;MyBean&gt; {
<ja>@Override</ja>
<jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
<jk>if</jk> (<jv>session</jv>.getTimeZone().equals(TimeZone.<jsf>GMT</jsf>))
<jk>return null</jk>;
<jk>return</jk> <jv>bean</jv>.toString();
}
}
<jc>// Create a serializer that uses GMT if the timezone is not specified in the session args.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.timeZone(TimeZone.<jsf>GMT</jsf>)
.build();
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#timeZone--"><code>BeanConfig.timeZone()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#timeZone-java.util.TimeZone-"><code>BeanContext.Builder.timeZone(TimeZone)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanSession.Builder.html#timeZone-java.util.TimeZone-"><code>BeanSession.Builder.timeZone(TimeZone)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#timeZone-java.util.TimeZone-">timeZone</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="typeName-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typeName</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.578">typeName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#typeName-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">An identifying name for this class.
<p>
The name is used to identify the class type during parsing when it cannot be inferred through reflection.
For example, if a bean property is of type <c>Object</c>, then the serializer will add the name to the
output so that the class can be determined during parsing.
<p>
It is also used to specify element names in XML.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Use _type='mybean' to identify this bean.</jc>
<jk>public class</jk> MyBean {...}
<jc>// Create a serializer and specify the type name..</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.typeName(MyBean.<jk>class</jk>, <js>"mybean"</js>)
.build();
<jc>// Produces: {"_type":"mybean",...}</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='notes'>
<li class='note'>Equivalent to the <a href="../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>Bean(typeName)</code></a> annotation.
</ul>
<ul class='seealso'>
<li class='jc'><a href="../../../../org/apache/juneau/annotation/Bean.html#typeName--"><code>Bean(typeName)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#beanDictionary-java.lang.Class...-"><code>BeanContext.Builder.beanDictionary(Class...)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#typeName-java.lang.Class-java.lang.String-">typeName</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class the type name is being defined on.</dd>
<dd><code>value</code> - The new value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="typePropertyName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typePropertyName</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.584">typePropertyName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#typePropertyName-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean type property name.
<p>
This specifies 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.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// POJOs with @Bean(name) annotations.</jc>
<ja>@Bean</ja>(typeName=<js>"foo"</js>)
<jk>public class</jk> Foo {...}
<ja>@Bean</ja>(typeName=<js>"bar"</js>)
<jk>public class</jk> Bar {...}
<jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.typePropertyName(<js>"t"</js>)
.dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>)
.build();
<jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.typePropertyName(<js>"t"</js>)
.dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>)
.build();
<jc>// A bean with a field with an indeterminate type.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Object <jf>mySimpleField</jf>;
}
<jc>// Produces "{mySimpleField:{t:'foo',...}}".</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
<jc>// Parse bean.</jc>
MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<jv>json</jv>, MyBean.<jk>class</jk>);
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#typePropertyName--"><code>Bean.typePropertyName()</code></a>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/BeanConfig.html#typePropertyName--"><code>BeanConfig.typePropertyName()</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#typePropertyName-java.lang.String-"><code>BeanContext.Builder.typePropertyName(String)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#typePropertyName-java.lang.String-">typePropertyName</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this setting.
<br>The default is <js>"_type"</js>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="typePropertyName-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typePropertyName</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.590">typePropertyName</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;on,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#typePropertyName-java.lang.Class-java.lang.String-">BeanContextable.Builder</a></code></span></div>
<div class="block">Bean type property name.
<p>
Same as <a href="../../../../org/apache/juneau/BeanContextable.Builder.html#typePropertyName-java.lang.String-"><code>BeanContextable.Builder.typePropertyName(String)</code></a> except targets a specific bean class instead of globally.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// POJOs with @Bean(name) annotations.</jc>
<ja>@Bean</ja>(typeName=<js>"foo"</js>)
<jk>public class</jk> Foo {...}
<ja>@Bean</ja>(typeName=<js>"bar"</js>)
<jk>public class</jk> Bar {...}
<jc>// A bean with a field with an indeterminate type.</jc>
<jk>public class</jk> MyBean {
<jk>public</jk> Object <jf>mySimpleField</jf>;
}
<jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.typePropertyName(MyBean.<jk>class</jk>, <js>"t"</js>)
.dictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>)
.build();
<jc>// Produces "{mySimpleField:{t:'foo',...}}".</jc>
String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
</p>
<ul class='seealso'>
<li class='ja'><a href="../../../../org/apache/juneau/annotation/Bean.html#typePropertyName--"><code>Bean(typePropertyName)</code></a>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#typePropertyName-java.lang.String-"><code>BeanContext.Builder.typePropertyName(String)</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#typePropertyName-java.lang.Class-java.lang.String-">typePropertyName</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>on</code> - The class the type property name applies to.</dd>
<dd><code>value</code> - The new value for this setting.
<br>The default is <js>"_type"</js>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="useEnumNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>useEnumNames</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.596">useEnumNames</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#useEnumNames--">BeanContextable.Builder</a></code></span></div>
<div class="block">Use enum names.
<p>
When enabled, enums are always serialized by name, not using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a>.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer with debug enabled.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.useEnumNames()
.build();
<jc>// Enum with overridden toString().</jc>
<jc>// Will be serialized as ONE/TWO/THREE even though there's a toString() method.</jc>
<jk>public enum</jk> Option {
<jsf>ONE</jsf>(1),
<jsf>TWO</jsf>(2),
<jsf>THREE</jsf>(3);
<jk>private int</jk> <jf>value</jf>;
Option(<jk>int</jk> <jv>value</jv>) {
<jk>this</jk>.<jf>value</jf> = <jv>value</jv>;
}
<ja>@Override</ja>
<jk>public</jk> String toString() {
<jk>return</jk> String.<jsm>valueOf</jsm>(<jf>value</jf>);
}
}
</p>
<ul class='seealso'>
<li class='jm'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#useEnumNames--"><code>BeanContext.Builder.useEnumNames()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#useEnumNames--">useEnumNames</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="useJavaBeanIntrospector--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>useJavaBeanIntrospector</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.602">useJavaBeanIntrospector</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/BeanContextable.Builder.html#useJavaBeanIntrospector--">BeanContextable.Builder</a></code></span></div>
<div class="block">Use Java Introspector.
<p>
Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
<br>Most <a href="../../../../org/apache/juneau/annotation/Bean.html" title="annotation in org.apache.juneau.annotation"><code>@Bean</code></a> annotations will be ignored.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a serializer that only uses the built-in java bean introspector for finding properties.</jc>
WriterSerializer <jv>serializer</jv> = JsonSerializer
.<jsm>create</jsm>()
.useJavaBeanIntrospector()
.build();
</p>
<ul class='seealso'>
<li class='jmf'><a href="../../../../org/apache/juneau/BeanContext.Builder.html#useJavaBeanIntrospector--"><code>BeanContext.Builder.useJavaBeanIntrospector()</code></a>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#useJavaBeanIntrospector--">useJavaBeanIntrospector</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="autoCloseStreams--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autoCloseStreams</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.608">autoCloseStreams</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#autoCloseStreams--">Parser.Builder</a></code></span></div>
<div class="block">Auto-close streams.
<p>
When enabled, <l>InputStreams</l> and <l>Readers</l> passed into parsers will be closed
after parsing is complete.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser using strict mode.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.autoCloseStreams()
.build();
Reader <jv>myReader</jv> = <jk>new</jk> FileReader(<js>"/tmp/myfile.json"</js>);
MyBean <jv>myBean</jv> = <jv>parser</jv>.parse(<jv>myReader</jv>, MyBean.<jk>class</jk>);
<jsm>assertTrue</jsm>(<jv>myReader</jv>.isClosed());
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#autoCloseStreams--">autoCloseStreams</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="autoCloseStreams-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autoCloseStreams</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.614">autoCloseStreams</a>(boolean&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#autoCloseStreams-boolean-">Parser.Builder</a></code></span></div>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#autoCloseStreams--"><code>Parser.Builder.autoCloseStreams()</code></a> but allows you to explicitly specify the value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#autoCloseStreams-boolean-">autoCloseStreams</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="consumes-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>consumes</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.620">consumes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#consumes-java.lang.String-">Parser.Builder</a></code></span></div>
<div class="block">Specifies the media type that this parser consumes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#consumes-java.lang.String-">consumes</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="debugOutputLines-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>debugOutputLines</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.626">debugOutputLines</a>(int&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#debugOutputLines-int-">Parser.Builder</a></code></span></div>
<div class="block">Debug output lines.
<p>
When parse errors occur, this specifies the number of lines of input before and after the
error location to be printed as part of the exception message.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser whose exceptions print out 100 lines before and after the parse error location.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.debug() <jc>// Enable debug mode to capture Reader contents as strings.</jc>
.debugOuputLines(100)
.build();
Reader <jv>myReader</jv> = <jk>new</jk> FileReader(<js>"/tmp/mybadfile.json"</js>);
<jk>try</jk> {
<jv>parser</jv>.parse(<jv>myReader</jv>, Object.<jk>class</jk>);
} <jk>catch</jk> (ParseException <jv>e</jv>) {
System.<jsf>err</jsf>.println(<jv>e</jv>.getMessage()); <jc>// Will display 200 lines of the output.</jc>
}
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#debugOutputLines-int-">debugOutputLines</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.
<br>The default value is <c>5</c>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="listener-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listener</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.632">listener</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/juneau/parser/ParserListener.html" title="class in org.apache.juneau.parser">ParserListener</a>&gt;&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#listener-java.lang.Class-">Parser.Builder</a></code></span></div>
<div class="block">Parser listener.
<p>
Class used to listen for errors and warnings that occur during parsing.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Define our parser listener.</jc>
<jc>// Simply captures all unknown bean property events.</jc>
<jk>public class</jk> MyParserListener <jk>extends</jk> ParserListener {
<jc>// A simple property to store our events.</jc>
<jk>public</jk> List&lt;String&gt; <jf>events</jf> = <jk>new</jk> LinkedList&lt;&gt;();
<ja>@Override</ja>
<jk>public</jk> &lt;T&gt; <jk>void</jk> onUnknownBeanProperty(ParserSession <jv>session</jv>, String <jv>propertyName</jv>, Class&lt;T&gt; <jv>beanClass</jv>, T <jv>bean</jv>) {
Position <jv>position</jv> = <jv>parser</jv>.getPosition();
<jf>events</jf>.add(<jv>propertyName</jv> + <js>","</js> + <jv>position</jv>.getLine() + <js>","</js> + <jv>position</jv>.getColumn());
}
}
<jc>// Create a parser using our listener.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.listener(MyParserListener.<jk>class</jk>)
.build();
<jc>// Create a session object.</jc>
<jc>// Needed because listeners are created per-session.</jc>
<jk>try</jk> (ReaderParserSession <jv>session</jv> = <jv>parser</jv>.createSession()) {
<jc>// Parse some JSON object.</jc>
MyBean <jv>myBean</jv> = <jv>session</jv>.parse(<js>"{...}"</js>, MyBean.<jk>class</jk>);
<jc>// Get the listener.</jc>
MyParserListener <jv>listener</jv> = <jv>session</jv>.getListener(MyParserListener.<jk>class</jk>);
<jc>// Dump the results to the console.</jc>
SimpleJson.<jsf>DEFAULT</jsf>.println(<jv>listener</jv>.<jf>events</jf>);
}
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#listener-java.lang.Class-">listener</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The new value for this property.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="strict--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>strict</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.638">strict</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#strict--">Parser.Builder</a></code></span></div>
<div class="block">Strict mode.
<p>
When enabled, strict mode for the parser is enabled.
<p>
Strict mode can mean different things for different parsers.
<table class='styled'>
<tr><th>Parser class</th><th>Strict behavior</th></tr>
<tr>
<td>All reader-based parsers</td>
<td>
When enabled, throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser"><code>ParseExceptions</code></a> on malformed charset input.
Otherwise, malformed input is ignored.
</td>
</tr>
<tr>
<td><a href="../../../../org/apache/juneau/json/JsonParser.html" title="class in org.apache.juneau.json"><code>JsonParser</code></a></td>
<td>
When enabled, throws exceptions on the following invalid JSON syntax:
<ul>
<li>Unquoted attributes.
<li>Missing attribute values.
<li>Concatenated strings.
<li>Javascript comments.
<li>Numbers and booleans when Strings are expected.
<li>Numbers valid in Java but not JSON (e.g. octal notation, etc...)
</ul>
</td>
</tr>
</table>
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser using strict mode.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.strict()
.build();
<jc>// Use it.</jc>
<jk>try</jk> {
String <jv>json</jv> = <js>"{unquotedAttr:'value'}"</js>;
<jv>parser</jv>.parse(<jv>json</jv>, MyBean.<jk>class</jk>);
} <jk>catch</jk> (ParseException <jv>e</jv>) {
<jsm>assertTrue</jsm>(<jv>e</jv>.getMessage().contains(<js>"Unquoted attribute detected."</js>);
}
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#strict--">strict</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="strict-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>strict</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.644">strict</a>(boolean&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#strict-boolean-">Parser.Builder</a></code></span></div>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#strict--"><code>Parser.Builder.strict()</code></a> but allows you to explicitly specify the value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#strict-boolean-">strict</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="trimStrings--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimStrings</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.650">trimStrings</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#trimStrings--">Parser.Builder</a></code></span></div>
<div class="block">Trim parsed strings.
<p>
When enabled, string values will be trimmed of whitespace using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#trim--" title="class or interface in java.lang"><code>String.trim()</code></a> before being added to
the POJO.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser with trim-strings enabled.</jc>
ReaderParser <jv>parser</jv> = JsonParser
.<jsm>create</jsm>()
.trimStrings()
.build();
<jc>// Use it.</jc>
String <jv>json</jv> = <js>"{' foo ':' bar '}"</js>;
Map&lt;String,String&gt; <jv>myMap</jv> = <jv>parser</jv>.parse(<jv>json</jv>, HashMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>);
<jc>// Make sure strings are parsed.</jc>
<jsm>assertEquals</jsm>(<js>"bar"</js>, <jv>myMap</jv>.get(<js>"foo"</js>));
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#trimStrings--">trimStrings</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="trimStrings-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trimStrings</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.656">trimStrings</a>(boolean&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#trimStrings-boolean-">Parser.Builder</a></code></span></div>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#trimStrings--"><code>Parser.Builder.trimStrings()</code></a> but allows you to explicitly specify the value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#trimStrings-boolean-">trimStrings</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="unbuffered--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbuffered</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.662">unbuffered</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#unbuffered--">Parser.Builder</a></code></span></div>
<div class="block">Unbuffered.
<p>
When enabled, don't use internal buffering during parsing.
<p>
This is useful in cases when you want to parse the same input stream or reader multiple times
because it may contain multiple independent POJOs to parse.
<br>Buffering would cause the parser to read past the current POJO in the stream.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<jc>// Create a parser using strict mode.</jc>
ReaderParser <jv>parser</jv> = JsonParser.
.<jsm>create</jsm>()
.unbuffered(<jk>true</jk>)
.build();
<jc>// If you're calling parse on the same input multiple times, use a session instead of the parser directly.</jc>
<jc>// It's more efficient because we don't need to recalc the session settings again. </jc>
ReaderParserSession <jv>session</jv> = <jv>parser</jv>.createSession();
<jc>// Read input with multiple POJOs</jc>
Reader <jv>json</jv> = <jk>new</jk> StringReader(<js>"{foo:'bar'}{foo:'baz'}"</js>);
MyBean <jv>myBean1</jv> = <jv>session</jv>.parse(<jv>json</jv>, MyBean.<jk>class</jk>);
MyBean <jv>myBean2</jv> = <jv>session</jv>.parse(<jv>json</jv>, MyBean.<jk>class</jk>);
</p>
<ul class='notes'>
<li class='note'>
This only allows for multi-input streams for the following parsers:
<ul>
<li class='jc'><a href="../../../../org/apache/juneau/json/JsonParser.html" title="class in org.apache.juneau.json"><code>JsonParser</code></a>
<li class='jc'><a href="../../../../org/apache/juneau/uon/UonParser.html" title="class in org.apache.juneau.uon"><code>UonParser</code></a>
</ul>
It has no effect on the following parsers:
<ul>
<li class='jc'><a href="../../../../org/apache/juneau/msgpack/MsgPackParser.html" title="class in org.apache.juneau.msgpack"><code>MsgPackParser</code></a> - It already doesn't use buffering.
<li class='jc'><a href="../../../../org/apache/juneau/xml/XmlParser.html" title="class in org.apache.juneau.xml"><code>XmlParser</code></a>, <a href="../../../../org/apache/juneau/html/HtmlParser.html" title="class in org.apache.juneau.html"><code>HtmlParser</code></a> - These use StAX which doesn't allow for more than one root element anyway.
<li>RDF parsers - These read everything into an internal model before any parsing begins.
</ul>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#unbuffered--">unbuffered</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
<a name="unbuffered-boolean-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unbuffered</h4>
<pre>public&nbsp;<a href="../../../../org/apache/juneau/parser/ReaderParser.Builder.html" title="class in org.apache.juneau.parser">ReaderParser.Builder</a>&nbsp;<a href="../../../../src-html/org/apache/juneau/parser/ReaderParser.Builder.html#line.668">unbuffered</a>(boolean&nbsp;value)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#unbuffered-boolean-">Parser.Builder</a></code></span></div>
<div class="block">Same as <a href="../../../../org/apache/juneau/parser/Parser.Builder.html#unbuffered--"><code>Parser.Builder.unbuffered()</code></a> but allows you to explicitly specify the value.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html#unbuffered-boolean-">unbuffered</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/juneau/parser/Parser.Builder.html" title="class in org.apache.juneau.parser">Parser.Builder</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The value for this setting.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This object.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/juneau/parser/ReaderParserSession.html" title="class in org.apache.juneau.parser"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/juneau/parser/ReaderParser.Builder.html" target="_top">Frames</a></li>
<li><a href="ReaderParser.Builder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>