http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/b3409c1c/content/site/apidocs/org/apache/juneau/BeanSession.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/BeanSession.html b/content/site/apidocs/org/apache/juneau/BeanSession.html new file mode 100644 index 0000000..8a2dcc4 --- /dev/null +++ b/content/site/apidocs/org/apache/juneau/BeanSession.html @@ -0,0 +1,1470 @@ +<!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>BeanSession (Apache Juneau (incubating) 6.0.2-incubating-SNAPSHOT)</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="BeanSession (Apache Juneau (incubating) 6.0.2-incubating-SNAPSHOT)"; + } + } + 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}; +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="class-use/BeanSession.html">Use</a></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/BeanRuntimeException.html" title="class in org.apache.juneau"><span class="typeNameLink">Prev Class</span></a></li> +<li><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><span class="typeNameLink">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../index.html?org/apache/juneau/BeanSession.html" target="_top">Frames</a></li> +<li><a href="BeanSession.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../allclasses-noframe.html">All 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: </li> +<li>Nested | </li> +<li>Field | </li> +<li><a href="#constructor.summary">Constr</a> | </li> +<li><a href="#method.summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor.detail">Constr</a> | </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</div> +<h2 title="Class BeanSession" class="title">Class BeanSession</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="http://docs.oracle.com/javase/7/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/Session.html" title="class in org.apache.juneau">org.apache.juneau.Session</a></li> +<li> +<ul class="inheritance"> +<li>org.apache.juneau.BeanSession</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/parser/ParserSession.html" title="class in org.apache.juneau.parser">ParserSession</a>, <a href="../../../org/apache/juneau/serializer/SerializerSession.html" title="class in org.apache.juneau.serializer">SerializerSession</a></dd> +</dl> +<hr> +<br> +<pre>public class <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.35">BeanSession</a> +extends <a href="../../../org/apache/juneau/Session.html" title="class in org.apache.juneau">Session</a></pre> +<div class="block">Session object that lives for the duration of a single use of <a href="../../../org/apache/juneau/serializer/Serializer.html" title="class in org.apache.juneau.serializer"><code>Serializer</code></a> or <a href="../../../org/apache/juneau/parser/Parser.html" title="class in org.apache.juneau.parser"><code>Parser</code></a>. + <p> + This class is NOT thread safe. It is meant to be discarded after one-time use.</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"> </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/BeanSession.html#BeanSession-org.apache.juneau.BeanContext-org.apache.juneau.ObjectMap-java.util.Locale-java.util.TimeZone-org.apache.juneau.MediaType-">BeanSession</a></span>(<a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> ctx, + <a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> op, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> timeZone, + <a href="../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a> mediaType)</code> +<div class="block">Create a new session using properties specified in the context.</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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#Z:Z_class--">_class</a></span>()</code> +<div class="block">Returns a reusable <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> representation for the class <code>Class</code>.</div> +</td> +</tr> +<tr id="i1" class="rowColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#asMap--">asMap</a></span>()</code> +<div class="block">Returns the properties defined on this bean context as a simple map for debugging purposes.</div> +</td> +</tr> +<tr id="i2" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#close--">close</a></span>()</code> +<div class="block">Perform cleanup on this context object if necessary.</div> +</td> +</tr> +<tr id="i3" class="rowColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Class-">convertToType</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</code> +<div class="block">Converts the specified value to the specified class type.</div> +</td> +</tr> +<tr id="i4" class="altColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-org.apache.juneau.ClassMeta-">convertToType</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> type)</code> +<div class="block">Casts the specified value into the specified type.</div> +</td> +</tr> +<tr id="i5" class="rowColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Object-java.lang.Class-">convertToType</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</code> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Class-"><code>convertToType(Object, Class)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +</td> +</tr> +<tr id="i6" class="altColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Object-org.apache.juneau.ClassMeta-">convertToType</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> type)</code> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-org.apache.juneau.ClassMeta-"><code>convertToType(Object, ClassMeta)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau">BeanMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getBeanMeta-java.lang.Class-">getBeanMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Returns the <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau"><code>BeanMeta</code></a> class for the specified class.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/BeanRegistry.html" title="class in org.apache.juneau">BeanRegistry</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getBeanRegistry--">getBeanRegistry</a></span>()</code> +<div class="block">Returns the bean registry defined in this bean context defined by <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanDictionary"><code>BeanContext.BEAN_beanDictionary</code></a>.</div> +</td> +</tr> +<tr id="i9" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getBeanTypePropertyName--">getBeanTypePropertyName</a></span>()</code> +<div class="block">Returns the type property name as defined by <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanTypePropertyName"><code>BeanContext.BEAN_beanTypePropertyName</code></a>.</div> +</td> +</tr> +<tr id="i10" class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassLoader--">getClassLoader</a></span>()</code> +<div class="block">Returns the classloader associated with this bean context.</div> +</td> +</tr> +<tr id="i11" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassMeta-java.lang.Class-">getClassMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Returns a <code>ClassMeta</code> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> object.</div> +</td> +</tr> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassMeta-java.lang.Object...-">getClassMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... c)</code> +<div class="block">Returns a <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> class.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassMeta-java.lang.Object-">getClassMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> c)</code> +<div class="block">Returns a <code>ClassMeta</code> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect"><code>Type</code></a> object.</div> +</td> +</tr> +<tr id="i14" class="altColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassMeta-java.lang.reflect.Type-">getClassMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> o)</code> +<div class="block">Constructs a ClassMeta object given the specified object and parameters.</div> +</td> +</tr> +<tr id="i15" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassMetaForObject-T-">getClassMetaForObject</a></span>(T o)</code> +<div class="block">Shortcut for calling <code>getClassMeta(o.getClass())</code>.</div> +</td> +</tr> +<tr id="i16" class="altColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><?>[]</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getClassMetas-java.lang.Class:A-">getClassMetas</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>[] classes)</code> +<div class="block">Given an array of <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> objects, returns an array of corresponding <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> objects.</div> +</td> +</tr> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code><E,T extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><E>><br><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getCollectionClassMeta-java.lang.Class-java.lang.Class-">getCollectionClassMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><E> elementType)</code> +<div class="block">Convenience method for creating a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> class meta.</div> +</td> +</tr> +<tr id="i18" class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getLocale--">getLocale</a></span>()</code> +<div class="block">Returns the locale defined on this session.</div> +</td> +</tr> +<tr id="i19" class="rowColor"> +<td class="colFirst"><code><K,V,T extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><K,V>><br><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getMapClassMeta-java.lang.Class-java.lang.Class-java.lang.Class-">getMapClassMeta</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><K> keyType, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><V> valueType)</code> +<div class="block">Convenience method for creating a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> class meta.</div> +</td> +</tr> +<tr id="i20" class="altColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getMediaType--">getMediaType</a></span>()</code> +<div class="block">Returns the media type specified for this session.</div> +</td> +</tr> +<tr id="i21" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getStringBuilder--">getStringBuilder</a></span>()</code> +<div class="block">Creates a reusable <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a> object from an internal pool.</div> +</td> +</tr> +<tr id="i22" class="altColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#getTimeZone--">getTimeZone</a></span>()</code> +<div class="block">Returns the timezone defined on this session.</div> +</td> +</tr> +<tr id="i23" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#isBean-java.lang.Class-">isBean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> c)</code> +<div class="block">Determines whether the specified class matches the requirements on this context of being a bean.</div> +</td> +</tr> +<tr id="i24" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#isBean-java.lang.Object-">isBean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</code> +<div class="block">Determines whether the specified object matches the requirements on this context of being a bean.</div> +</td> +</tr> +<tr id="i25" class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#isDebug--">isDebug</a></span>()</code> +<div class="block">Returns the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_debug"><code>BeanContext.BEAN_debug</code></a> setting value for this session.</div> +</td> +</tr> +<tr id="i26" class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#isIgnoreUnknownBeanProperties--">isIgnoreUnknownBeanProperties</a></span>()</code> +<div class="block">Bean property getter: <property>ignoreUnknownBeanProperties</property>.</div> +</td> +</tr> +<tr id="i27" class="rowColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#newBean-java.lang.Class-">newBean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Creates a new empty bean of the specified type, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +</td> +</tr> +<tr id="i28" class="altColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#newBean-java.lang.Object-java.lang.Class-">newBean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#newBean-java.lang.Class-"><code>newBean(Class)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +</td> +</tr> +<tr id="i29" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#newBeanMap-java.lang.Class-">newBeanMap</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Creates a new <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> object (i.e.</div> +</td> +</tr> +<tr id="i30" class="altColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#newBeanMap-java.lang.Object-java.lang.Class-">newBeanMap</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#newBeanMap-java.lang.Class-"><code>newBeanMap(Class)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +</td> +</tr> +<tr id="i31" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#normalizeClassMeta-org.apache.juneau.ClassMeta-">normalizeClassMeta</a></span>(<a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> cm)</code> +<div class="block">Returns the class type bound to this bean context if the specified class type + is from another bean context.</div> +</td> +</tr> +<tr id="i32" class="altColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#object--">object</a></span>()</code> +<div class="block">Returns a reusable <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> representation for the class <code>Object</code>.</div> +</td> +</tr> +<tr id="i33" class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#returnStringBuilder-java.lang.StringBuilder-">returnStringBuilder</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> sb)</code> +<div class="block">Returns a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a> object back into the internal reuse pool.</div> +</td> +</tr> +<tr id="i34" class="altColor"> +<td class="colFirst"><code><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#string--">string</a></span>()</code> +<div class="block">Returns a reusable <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> representation for the class <code>String</code>.</div> +</td> +</tr> +<tr id="i35" class="rowColor"> +<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#toArray-org.apache.juneau.ClassMeta-java.util.Collection-">toArray</a></span>(<a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><?> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><?> list)</code> +<div class="block">Converts the contents of the specified list into an array.</div> +</td> +</tr> +<tr id="i36" class="altColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#toBeanMap-T-">toBeanMap</a></span>(T o)</code> +<div class="block">Wraps an object inside a <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> object (i.e.</div> +</td> +</tr> +<tr id="i37" class="rowColor"> +<td class="colFirst"><code><T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/juneau/BeanSession.html#toBeanMap-T-java.lang.Class-">toBeanMap</a></span>(T o, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? super T> c)</code> +<div class="block">Wraps an object inside a <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> object (i.e.: a modifiable <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>) + defined as a bean for one of its class, a super class, or an implemented interface.</div> +</td> +</tr> +</table> +<ul class="blockList"> +<li class="blockList"><a name="methods.inherited.from.class.org.apache.juneau.Session"> +<!-- --> +</a> +<h3>Methods inherited from class org.apache.juneau.<a href="../../../org/apache/juneau/Session.html" title="class in org.apache.juneau">Session</a></h3> +<code><a href="../../../org/apache/juneau/Session.html#addToCache-java.util.Map-">addToCache</a>, <a href="../../../org/apache/juneau/Session.html#addToCache-java.lang.String-java.lang.Object-">addToCache</a>, <a href="../../../org/apache/juneau/Session.html#addWarning-java.lang.String-java.lang.Object...-">addWarning</a>, <a href="../../../org/apache/juneau/Session.html#finalize--">finalize</a>, <a href="../../../org/apache/juneau/Session.html#getFromCache-java.lang.Class-java.lang.String-">getFromCache</a>, <a href="../../../org/apache/juneau/Session.html#getLogger--">getLogger</a>, <a href="../../../org/apache/juneau/Session.html#getProperties--">getProperties</a>, <a href="../../../org/apache/juneau/Session.html#getWarnings--">getWarnings</a>, <a href="../../../org/apache/juneau/Session.html#hasWarnings--">hasWarnings</a>, <a href="../../../org/apache/juneau/Session.html#toString--">toString</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 java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/la ng/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/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="BeanSession-org.apache.juneau.BeanContext-org.apache.juneau.ObjectMap-java.util.Locale-java.util.TimeZone-org.apache.juneau.MediaType-"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BeanSession</h4> +<pre>protected <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.57">BeanSession</a>(<a href="../../../org/apache/juneau/BeanContext.html" title="class in org.apache.juneau">BeanContext</a> ctx, + <a href="../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a> op, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> timeZone, + <a href="../../../org/apache/juneau/MediaType.html" title="class in org.apache.juneau">MediaType</a> mediaType)</pre> +<div class="block">Create a new session using properties specified in the context.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>op</code> - The override properties. + These override any context properties defined in the context.</dd> +<dd><code>ctx</code> - The context creating this session object. + The context contains all the configuration settings for this object.</dd> +<dd><code>locale</code> - The session locale. + If <jk>null</jk>, then the locale defined on the context is used.</dd> +<dd><code>timeZone</code> - The session timezone. + If <jk>null</jk>, then the timezone defined on the context is used.</dd> +<dd><code>mediaType</code> - The session media type (e.g. <js>"application/json"</js>).</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="getLocale--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getLocale</h4> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.86">getLocale</a>()</pre> +<div class="block">Returns the locale defined on this session. + <p> + The locale is determined in the following order: + <ol> + <li><code>locale</code> parameter passed in through constructor. + <li><a href="../../../org/apache/juneau/BeanContext.html#BEAN_locale"><code>BeanContext.BEAN_locale</code></a> entry in <code>properties</code> parameter passed in through constructor. + <li><a href="../../../org/apache/juneau/BeanContext.html#BEAN_locale"><code>BeanContext.BEAN_locale</code></a> setting on bean context. + <li>Locale returned by <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true#getDefault--" title="class or interface in java.util"><code>Locale.getDefault()</code></a>. + </ol></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The session locale.</dd> +</dl> +</li> +</ul> +<a name="getTimeZone--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getTimeZone</h4> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html?is-external=true" title="class or interface in java.util">TimeZone</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.101">getTimeZone</a>()</pre> +<div class="block">Returns the timezone defined on this session. + The timezone is determined in the following order: + <ol> + <li><code>timeZone</code> parameter passed in through constructor. + <li><a href="../../../org/apache/juneau/BeanContext.html#BEAN_timeZone"><code>BeanContext.BEAN_timeZone</code></a> entry in <code>properties</code> parameter passed in through constructor. + <li><a href="../../../org/apache/juneau/BeanContext.html#BEAN_timeZone"><code>BeanContext.BEAN_timeZone</code></a> setting on bean context. + </ol></div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The session timezone, or <jk>null</jk> if timezone not specified.</dd> +</dl> +</li> +</ul> +<a name="isDebug--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isDebug</h4> +<pre>public final boolean <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.110">isDebug</a>()</pre> +<div class="block">Returns the <a href="../../../org/apache/juneau/BeanContext.html#BEAN_debug"><code>BeanContext.BEAN_debug</code></a> setting value for this session.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The <a href="../../../org/apache/juneau/BeanContext.html#BEAN_debug"><code>BeanContext.BEAN_debug</code></a> setting value for this session.</dd> +</dl> +</li> +</ul> +<a name="isIgnoreUnknownBeanProperties--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isIgnoreUnknownBeanProperties</h4> +<pre>public final boolean <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.120">isIgnoreUnknownBeanProperties</a>()</pre> +<div class="block">Bean property getter: <property>ignoreUnknownBeanProperties</property>. + See <a href="../../../org/apache/juneau/BeanContext.html#BEAN_ignoreUnknownBeanProperties"><code>BeanContext.BEAN_ignoreUnknownBeanProperties</code></a>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The value of the <property>ignoreUnknownBeanProperties</property> property on this bean.</dd> +</dl> +</li> +</ul> +<a name="convertToType-java.lang.Object-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>convertToType</h4> +<pre>public final <T> T <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.135">convertToType</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type) + throws <a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></pre> +<div class="block">Converts the specified value to the specified class type. + <p> + See <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-org.apache.juneau.ClassMeta-"><code>convertToType(Object, ClassMeta)</code></a> for the list of valid conversions.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type to convert the value to.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - The value to convert.</dd> +<dd><code>type</code> - The class type to convert the value to.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The converted value.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></code> - If the specified value cannot be converted to the specified type.</dd> +</dl> +</li> +</ul> +<a name="convertToType-java.lang.Object-java.lang.Object-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>convertToType</h4> +<pre>public final <T> T <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.154">convertToType</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type) + throws <a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></pre> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-java.lang.Class-"><code>convertToType(Object, Class)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type to convert the value to.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>outer</code> - If class is a member class, this is the instance of the containing class. + Should be <jk>null</jk> if not a member class.</dd> +<dd><code>value</code> - The value to convert.</dd> +<dd><code>type</code> - The class type to convert the value to.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The converted value.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></code> - If the specified value cannot be converted to the specified type.</dd> +</dl> +</li> +</ul> +<a name="convertToType-java.lang.Object-org.apache.juneau.ClassMeta-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>convertToType</h4> +<pre>public final <T> T <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.291">convertToType</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> type) + throws <a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></pre> +<div class="block">Casts the specified value into the specified type. + <p> + If the value isn't an instance of the specified type, then converts + the value if possible.<br> + <p> + The following conversions are valid: + <table class='styled'> + <tr><th>Convert to type</th><th>Valid input value types</th><th>Notes</th></tr> + <tr> + <td> + A class that is the normal type of a registered <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. + </td> + <td> + A value whose class matches the transformed type of that registered <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. + </td> + <td> </td> + </tr> + <tr> + <td> + A class that is the transformed type of a registered <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. + </td> + <td> + A value whose class matches the normal type of that registered <a href="../../../org/apache/juneau/transform/PojoSwap.html" title="class in org.apache.juneau.transform"><code>PojoSwap</code></a>. + </td> + <td> </td> + </tr> + <tr> + <td> + <code>Number</code> (e.g. <code>Integer</code>, <code>Short</code>, <code>Float</code>,...)<br> + <code>Number.<jsf>TYPE</jsf></code> (e.g. <code>Integer.<jsf>TYPE</jsf></code>, <code>Short.<jsf>TYPE</jsf></code>, <code>Float.<jsf>TYPE</jsf></code>,...) + </td> + <td> + <code>Number</code>, <code>String</code>, <jk>null</jk> + </td> + <td> + For primitive <code>TYPES</code>, <jk>null</jk> returns the JVM default value for that type. + </td> + </tr> + <tr> + <td> + <code>Map</code> (e.g. <code>Map</code>, <code>HashMap</code>, <code>TreeMap</code>, <code>ObjectMap</code>) + </td> + <td> + <code>Map</code> + </td> + <td> + If <code>Map</code> is not constructible, a <code>ObjectMap</code> is created. + </td> + </tr> + <tr> + <td> + <code>Collection</code> (e.g. <code>List</code>, <code>LinkedList</code>, <code>HashSet</code>, <code>ObjectList</code>) + </td> + <td> + <code>Collection<Object></code><br> + <code>Object[]</code> + </td> + <td> + If <code>Collection</code> is not constructible, a <code>ObjectList</code> is created. + </td> + </tr> + <tr> + <td> + <code>X[]</code> (array of any type X)<br> + </td> + <td> + <code>List<X></code><br> + </td> + <td> </td> + </tr> + <tr> + <td> + <code>X[][]</code> (multi-dimensional arrays)<br> + </td> + <td> + <code>List<List<X>></code><br> + <code>List<X[]></code><br> + <code>List[]<X></code><br> + </td> + <td> </td> + </tr> + <tr> + <td> + <code>Enum</code><br> + </td> + <td> + <code>String</code><br> + </td> + <td> </td> + </tr> + <tr> + <td> + Bean<br> + </td> + <td> + <code>Map</code><br> + </td> + <td> </td> + </tr> + <tr> + <td> + <code>String</code><br> + </td> + <td> + Anything<br> + </td> + <td> + Arrays are converted to JSON arrays<br> + </td> + </tr> + <tr> + <td> + Anything with one of the following methods:<br> + <code><jk>public static</jk> T fromString(String)</code><br> + <code><jk>public static</jk> T valueOf(String)</code><br> + <code><jk>public</jk> T(String)</code><br> + </td> + <td> + <code>String</code><br> + </td> + <td> + <br> + </td> + </tr> + </table></div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type to convert the value to.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>value</code> - The value to be converted.</dd> +<dd><code>type</code> - The target object type.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The converted type.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></code> - If the specified value cannot be converted to the specified type.</dd> +</dl> +</li> +</ul> +<a name="convertToType-java.lang.Object-java.lang.Object-org.apache.juneau.ClassMeta-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>convertToType</h4> +<pre>public final <T> T <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.307">convertToType</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, + <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> type) + throws <a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></pre> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#convertToType-java.lang.Object-org.apache.juneau.ClassMeta-"><code>convertToType(Object, ClassMeta)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type to convert the value to.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>outer</code> - If class is a member class, this is the instance of the containing class. + Should be <jk>null</jk> if not a member class.</dd> +<dd><code>value</code> - The value to convert.</dd> +<dd><code>type</code> - The class type to convert the value to.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The converted value.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../org/apache/juneau/InvalidDataConversionException.html" title="class in org.apache.juneau">InvalidDataConversionException</a></code> - If the specified value cannot be converted to the specified type.</dd> +</dl> +</li> +</ul> +<a name="toArray-org.apache.juneau.ClassMeta-java.util.Collection-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toArray</h4> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.586">toArray</a>(<a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><?> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><?> list)</pre> +<div class="block">Converts the contents of the specified list into an array. + <p> + Works on both object and primitive arrays. + <p> + In the case of multi-dimensional arrays, the incoming list must + contain elements of type n-1 dimension. i.e. if <code>type</code> is <code><jk>int</jk>[][]</code> + then <code>list</code> must have entries of type <code><jk>int</jk>[]</code>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>type</code> - The type to convert to. Must be an array type.</dd> +<dd><code>list</code> - The contents to populate the array with.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new object or primitive array.</dd> +</dl> +</li> +</ul> +<a name="toBeanMap-java.lang.Object-"> +<!-- --> +</a><a name="toBeanMap-T-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toBeanMap</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.626">toBeanMap</a>(T o)</pre> +<div class="block">Wraps an object inside a <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> object (i.e. a modifiable <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>). + <p> + If object is not a true bean, then throws a <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a> with an explanation of why it's not a bean. + + <h6 class='topic'>Example:</h6> + <p class='bcode'> + <jc>// Construct a bean map around a bean instance</jc> + BeanMap<Person> bm = BeanContext.<jsf>DEFAULT</jsf>.forBean(<jk>new</jk> Person()); + </p></div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class of the object being wrapped.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o</code> - The object to wrap in a map interface. Must not be null.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The wrapped object.</dd> +</dl> +</li> +</ul> +<a name="isBean-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isBean</h4> +<pre>public final boolean <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.636">isBean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</pre> +<div class="block">Determines whether the specified object matches the requirements on this context of being a bean.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o</code> - The object being tested.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><jk>true</jk> if the specified object is considered a bean.</dd> +</dl> +</li> +</ul> +<a name="isBean-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isBean</h4> +<pre>public final boolean <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.648">isBean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> c)</pre> +<div class="block">Determines whether the specified class matches the requirements on this context of being a bean.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class being tested.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd><jk>true</jk> if the specified class is considered a bean.</dd> +</dl> +</li> +</ul> +<a name="toBeanMap-java.lang.Object-java.lang.Class-"> +<!-- --> +</a><a name="toBeanMap-T-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toBeanMap</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.676">toBeanMap</a>(T o, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? super T> c) + throws <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></pre> +<div class="block">Wraps an object inside a <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> object (i.e.: a modifiable <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>) + defined as a bean for one of its class, a super class, or an implemented interface. + <p> + If object is not a true bean, throws a <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a> with an explanation of why it's not a bean. + + <h6 class='topic'>Example:</h6> + <p class='bcode'> + <jc>// Construct a bean map for new bean using only properties defined in a superclass</jc> + BeanMap<MySubBean> bm = BeanContext.<jsf>DEFAULT</jsf>.forBean(<jk>new</jk> MySubBean(), MySuperBean.<jk>class</jk>); + + <jc>// Construct a bean map for new bean using only properties defined in an interface</jc> + BeanMap<MySubBean> bm = BeanContext.<jsf>DEFAULT</jsf>.forBean(<jk>new</jk> MySubBean(), MySuperInterface.<jk>class</jk>); + </p></div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class of the object being wrapped.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o</code> - The object to wrap in a bean interface. Must not be null.</dd> +<dd><code>c</code> - The superclass to narrow the bean properties to. Must not be null.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The bean representation, or <jk>null</jk> if the object is not a true bean.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - If either parameter is null.</dd> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If the specified object is not an an instance of the specified class.</dd> +<dd><code><a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></code> - If specified object is not a bean according to the bean rules + specified in this context class.</dd> +</dl> +</li> +</ul> +<a name="newBeanMap-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newBeanMap</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.706">newBeanMap</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> +<div class="block">Creates a new <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau"><code>BeanMap</code></a> object (i.e. a modifiable <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>) of the given class with uninitialized property values. + <p> + If object is not a true bean, then throws a <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau"><code>BeanRuntimeException</code></a> with an explanation of why it's not a bean. + + <h6 class='topic'>Example:</h6> + <p class='bcode'> + <jc>// Construct a new bean map wrapped around a new Person object</jc> + BeanMap<Person> bm = BeanContext.<jsf>DEFAULT</jsf>.newBeanMap(Person.<jk>class</jk>); + </p></div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class of the object being wrapped.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The name of the class to create a new instance of.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new instance of the class.</dd> +</dl> +</li> +</ul> +<a name="newBeanMap-java.lang.Object-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newBeanMap</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/BeanMap.html" title="class in org.apache.juneau">BeanMap</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.720">newBeanMap</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#newBeanMap-java.lang.Class-"><code>newBeanMap(Class)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class of the object being wrapped.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The name of the class to create a new instance of.</dd> +<dd><code>outer</code> - If class is a member class, this is the instance of the containing class. + Should be <jk>null</jk> if not a member class.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new instance of the class.</dd> +</dl> +</li> +</ul> +<a name="newBean-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newBean</h4> +<pre>public final <T> T <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.749">newBean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c) + throws <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></pre> +<div class="block">Creates a new empty bean of the specified type, except used for instantiating inner member classes that must + be instantiated within another class instance. + + <h6 class='topic'>Example:</h6> + <p class='bcode'> + <jc>// Construct a new instance of the specified bean class</jc> + Person p = BeanContext.<jsf>DEFAULT</jsf>.newBean(Person.<jk>class</jk>); + </p></div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type of the bean being created.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class type of the bean being created.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new bean object.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></code> - If the specified class is not a valid bean.</dd> +</dl> +</li> +</ul> +<a name="newBean-java.lang.Object-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>newBean</h4> +<pre>public final <T> T <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.764">newBean</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> outer, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c) + throws <a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></pre> +<div class="block">Same as <a href="../../../org/apache/juneau/BeanSession.html#newBean-java.lang.Class-"><code>newBean(Class)</code></a>, except used for instantiating inner member classes that must + be instantiated within another class instance.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type of the bean being created.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class type of the bean being created.</dd> +<dd><code>outer</code> - If class is a member class, this is the instance of the containing class. + Should be <jk>null</jk> if not a member class.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new bean object.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../org/apache/juneau/BeanRuntimeException.html" title="class in org.apache.juneau">BeanRuntimeException</a></code> - If the specified class is not a valid bean.</dd> +</dl> +</li> +</ul> +<a name="getBeanMeta-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBeanMeta</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau">BeanMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.793">getBeanMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> +<div class="block">Returns the <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau"><code>BeanMeta</code></a> class for the specified class.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type to get the meta-data on.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class to get the meta-data on.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The <a href="../../../org/apache/juneau/BeanMeta.html" title="class in org.apache.juneau"><code>BeanMeta</code></a> for the specified class, or <jk>null</jk> if the class + is not a bean per the settings on this context.</dd> +</dl> +</li> +</ul> +<a name="normalizeClassMeta-org.apache.juneau.ClassMeta-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>normalizeClassMeta</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.812">normalizeClassMeta</a>(<a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> cm)</pre> +<div class="block">Returns the class type bound to this bean context if the specified class type + is from another bean context. + <p> + For example, this method allows you to pass in an object from <code>BeanContext.<jsf>DEFAULT</jsf>.getMapClassMeta(...)</code> + to any of the <code>ReaderParser.parse(Reader, ClassMeta, ParserContext)</code> methods, and the parsers + will use this method to replace the class type with the one registered with the parser. + This ensures that registered transforms are applied correctly.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>cm</code> - The class type.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The class type bound by this bean context.</dd> +</dl> +</li> +</ul> +<a name="getClassMeta-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getClassMeta</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.823">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</pre> +<div class="block">Returns a <code>ClassMeta</code> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> object.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type being wrapped.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class being wrapped.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The class meta object containing information about the class.</dd> +</dl> +</li> +</ul> +<a name="getClassMeta-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getClassMeta</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.834">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> c)</pre> +<div class="block">Returns a <code>ClassMeta</code> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect"><code>Type</code></a> object.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type being wrapped.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The class being wrapped.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The class meta object containing information about the class.</dd> +</dl> +</li> +</ul> +<a name="getClassMeta-java.lang.Object...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getClassMeta</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.852">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... c)</pre> +<div class="block">Returns a <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> wrapper around a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> class. + <p> + Handles the following object arrays: + <ul> + <li><code>Object[2]</code> containing <code>{Class<? extends Collection>, Object}</code> + where the 2nd entry is the entry type which can be a Class/Type or another array. + <li><code>Object[3]</code> containing <code>{Class<? extends Map>, Object, Object}</code> + where the 2nd entry is the key type which can be a Class/Type and 3rd entry is the value type which can be a Class/Type or another array. + </ul></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The object array being resolved.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The class meta object containing information about the class.</dd> +</dl> +</li> +</ul> +<a name="getMapClassMeta-java.lang.Class-java.lang.Class-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getMapClassMeta</h4> +<pre>public final <K,V,T extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><K,V>> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.870">getMapClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><K> keyType, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><V> valueType)</pre> +<div class="block">Convenience method for creating a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> class meta. + <p> + Equivalent to calling <code>getClassMeta(c, keyType, valueType)</code>.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>K</code> - The map key class type.</dd> +<dd><code>V</code> - The map value class type.</dd> +<dd><code>T</code> - The map class type.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The map class type.</dd> +<dd><code>keyType</code> - The map key class type.</dd> +<dd><code>valueType</code> - The map value class type.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>If the key and value types are Object, returns a cached <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object.<br> + Otherwise, returns a new <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object every time.</dd> +</dl> +</li> +</ul> +<a name="getCollectionClassMeta-java.lang.Class-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getCollectionClassMeta</h4> +<pre>public final <E,T extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><E>> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.886">getCollectionClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><E> elementType)</pre> +<div class="block">Convenience method for creating a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> class meta. + <p> + Equivalent to calling <code>getClassMeta(c, keyType, valueType)</code>.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>E</code> - The collection element class type.</dd> +<dd><code>T</code> - The collection class type.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>c</code> - The collection class type.</dd> +<dd><code>elementType</code> - The collection element class type.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>If the element type is <code>OBJECT</code>, returns a cached <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object.<br> + Otherwise, returns a new <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object every time.</dd> +</dl> +</li> +</ul> +<a name="getClassMeta-java.lang.reflect.Type-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getClassMeta</h4> +<pre>public final <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.903">getClassMeta</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> o)</pre> +<div class="block">Constructs a ClassMeta object given the specified object and parameters.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o</code> - The parent class type. + Can be any of the following types: + <ul class='spaced-list'> + <li><a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> object, which just returns the same object. + <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> object (e.g. <code>String.<jk>class</jk></code>). + <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect"><code>Type</code></a> object (e.g. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a>. + <li>Anything else is interpreted as <code>getClassMeta(o.getClass(), parameters);</code> + </ul></dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A ClassMeta object, or <jk>null</jk> if the object is null.</dd> +</dl> +</li> +</ul> +<a name="getClassMetas-java.lang.Class:A-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getClassMetas</h4> +<pre>public final <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><?>[] <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.914">getClassMetas</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>[] classes)</pre> +<div class="block">Given an array of <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> objects, returns an array of corresponding <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> objects. + Constructs a new array on each call.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>classes</code> - The array of classes to get class metas for.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>An array of <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a> objects corresponding to the classes. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getClassMetaForObject-java.lang.Object-"> +<!-- --> +</a><a name="getClassMetaForObject-T-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getClassMetaForObject</h4> +<pre>public final <T> <a href="../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau">ClassMeta</a><T> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.929">getClassMetaForObject</a>(T o)</pre> +<div class="block">Shortcut for calling <code>getClassMeta(o.getClass())</code>.</div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class of the object being passed in.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o</code> - The class to find the class type for.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The ClassMeta object, or <jk>null</jk> if <code>o</code> is <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getBeanTypePropertyName--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBeanTypePropertyName</h4> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.940">getBeanTypePropertyName</a>()</pre> +<div class="block">Returns the type property name as defined by <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanTypePropertyName"><code>BeanContext.BEAN_beanTypePropertyName</code></a>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The type property name. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getBeanRegistry--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getBeanRegistry</h4> +<pre>public final <a href="../../../org/apache/juneau/BeanRegistry.html" title="class in org.apache.juneau">BeanRegistry</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.949">getBeanRegistry</a>()</pre> +<div class="block">Returns the bean registry defined in this bean context defined by <a href="../../../org/apache/juneau/BeanContext.html#BEAN_beanDictionary"><code>BeanContext.BEAN_beanDictionary</code></a>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The bean registry defined in this bean context. Never <jk>null</jk>.</dd> +</dl> +</li> +</ul> +<a name="getStringBuilder--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getStringBuilder</h4> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.960">getStringBuilder</a>()</pre> +<div class="block">Creates a reusable <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a> object from an internal pool. + <p> + String builders are returned to the pool by calling <a href="../../../org/apache/juneau/BeanSession.html#returnStringBuilder-java.lang.StringBuilder-"><code>returnStringBuilder(StringBuilder)</code></a>.</div> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>A new or previously returned string builder.</dd> +</dl> +</li> +</ul> +<a name="returnStringBuilder-java.lang.StringBuilder-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>returnStringBuilder</h4> +<pre>public final void <a href="../../../src-html/org/apache/juneau/BeanSession.html#line.971">returnStringBuilder</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> sb)</pre> +<div class="block">Returns a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang"><code>StringBuilder</code></a> object back into the internal reuse pool.</
<TRUNCATED>
