blob: 15e0af50909012644fff3d888e85484652a5e91f [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 -->
<title>ReflectionBasedAutoSerializer (Apache Geode 1.15.1)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.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="ReflectionBasedAutoSerializer (Apache Geode 1.15.1)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":42,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":42,"i15":10,"i16":10,"i17":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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/geode/pdx/PdxWriter.html" title="interface in org.apache.geode.pdx"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/geode/pdx/ReflectionBasedAutoSerializer.html" target="_top">Frames</a></li>
<li><a href="ReflectionBasedAutoSerializer.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.geode.pdx</div>
<h2 title="Class ReflectionBasedAutoSerializer" class="title">Class ReflectionBasedAutoSerializer</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>org.apache.geode.pdx.ReflectionBasedAutoSerializer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/apache/geode/cache/Declarable.html" title="interface in org.apache.geode.cache">Declarable</a>, <a href="../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx">PdxSerializer</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">ReflectionBasedAutoSerializer</span>
extends <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>
implements <a href="../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx">PdxSerializer</a>, <a href="../../../../org/apache/geode/cache/Declarable.html" title="interface in org.apache.geode.cache">Declarable</a></pre>
<div class="block">This class uses Java reflection in conjunction with <a href="../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx"><code>PdxSerialzer</code></a> to perform automatic serialization of domain objects. The implication is that the
domain classes do not need to implement the <code>PdxSerializable</code> interface.
<p>
This implementation will serialize all relevant fields
<p>
For example:
<pre>
Cache c = new CacheFactory().set(&quot;cache-xml-file&quot;, cacheXmlFileName)
.setPdxSerializer(new ReflectionBasedAutoSerializer("com.foo.DomainObject")).create();
</pre>
<p>
In this example <code>DomainObject</code> would not need to implement
<code>PdxSerializable</code> to be serialized.
<p>
The equivalent <code>cache.xml</code> entries might be as follows:
<pre>
&lt;pdx&gt;
&lt;pdx-serializer&gt;
&lt;class-name&gt;
org.apache.geode.pdx.ReflectionBasedAutoSerializer
&lt;/class-name&gt;
&lt;parameter name="classes"&gt;
&lt;string&gt; com.company.domain.DomainObject &lt;/string&gt;
&lt;/parameter&gt;
&lt;/pdx-serializer&gt;
&lt;/pdx&gt;
</pre>
See <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-java.lang.String...-"><code>reconfigure</code></a> for additional
details on the format of the parameter string.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6</dd>
</dl>
</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="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#ReflectionBasedAutoSerializer--">ReflectionBasedAutoSerializer</a></span>()</code>
<div class="block">Default constructor primarily used during declarative configuration via the cache.xml file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#ReflectionBasedAutoSerializer-boolean-java.lang.String...-">ReflectionBasedAutoSerializer</a></span>(boolean&nbsp;checkPortability,
<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;patterns)</code>
<div class="block">Constructor which takes a list of class name patterns which are to be auto-serialized.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#ReflectionBasedAutoSerializer-java.util.List-">ReflectionBasedAutoSerializer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</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>&gt;&nbsp;classes)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">as of 6.6.2 use ReflectionBasedAutoSerializer(String...) instead.</span></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#ReflectionBasedAutoSerializer-java.lang.String...-">ReflectionBasedAutoSerializer</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;patterns)</code>
<div class="block">Constructor which takes a list of class name patterns which are to be auto-serialized.</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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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="https://docs.oracle.com/javase/8/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/geode/pdx/ReflectionBasedAutoSerializer.html#fromData-java.lang.Class-org.apache.geode.pdx.PdxReader-">fromData</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;clazz,
<a href="../../../../org/apache/geode/pdx/PdxReader.html" title="interface in org.apache.geode.pdx">PdxReader</a>&nbsp;reader)</code>
<div class="block">Method implemented from <code>PdxSerializer</code> which performs object de-serialization.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#getConfig--">getConfig</a></span>()</code>
<div class="block">Return a <code>Properties</code> object with a representation of the current config.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#getFieldName-java.lang.reflect.Field-java.lang.Class-">getFieldName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</code>
<div class="block">Controls the field name that will be used in pdx for a field being auto serialized.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/pdx/FieldType.html" title="enum in org.apache.geode.pdx">FieldType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#getFieldType-java.lang.reflect.Field-java.lang.Class-">getFieldType</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</code>
<div class="block">Controls what pdx field type will be used when auto serializing.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#getManager--">getManager</a></span>()</code>
<div class="block">For internal use only.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/RegionService.html" title="interface in org.apache.geode.cache">RegionService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#getRegionService--">getRegionService</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#init-java.util.Properties-">init</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;props)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">as of Geode 1.5 use initialize instead</span></div>
</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#initialize-org.apache.geode.cache.Cache-java.util.Properties-">initialize</a></span>(<a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a>&nbsp;cache,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;props)</code>
<div class="block">Used for declarative class initialization from cache.xml.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#isClassAutoSerialized-java.lang.Class-">isClassAutoSerialized</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;clazz)</code>
<div class="block">Controls what classes will be auto serialized by this serializer.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#isFieldIncluded-java.lang.reflect.Field-java.lang.Class-">isFieldIncluded</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</code>
<div class="block">Controls what fields of a class will be auto serialized by this serializer.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#isIdentityField-java.lang.reflect.Field-java.lang.Class-">isIdentityField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</code>
<div class="block">Controls what fields of a class that is auto serialized will be marked as pdx identity fields.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#readTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-">readTransform</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz,
<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>&nbsp;serializedValue)</code>
<div class="block">Controls what field value is read during auto deserialization.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-boolean-java.lang.String...-">reconfigure</a></span>(boolean&nbsp;checkPortability,
<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;patterns)</code>
<div class="block">Method to reconfigure this serializer.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-java.lang.String...-">reconfigure</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;patterns)</code>
<div class="block">Method to reconfigure this serializer.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#setSerializableClasses-java.util.List-">setSerializableClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</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>&gt;&nbsp;patterns)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">as of 6.6.2 use <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-java.lang.String...-"><code>reconfigure(String...)</code></a> instead.</span></div>
</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#toData-java.lang.Object-org.apache.geode.pdx.PdxWriter-">toData</a></span>(<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>&nbsp;obj,
<a href="../../../../org/apache/geode/pdx/PdxWriter.html" title="interface in org.apache.geode.pdx">PdxWriter</a>&nbsp;writer)</code>
<div class="block">Method implemented from <code>PdxSerializer</code> which performs object serialization.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#transformFieldValue-java.lang.reflect.Field-java.lang.Class-">transformFieldValue</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</code>
<div class="block">Controls if a pdx field's value can be transformed during serialization.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#writeTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-">writeTransform</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz,
<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>&nbsp;originalValue)</code>
<div class="block">Controls what field value is written during auto serialization.</div>
</td>
</tr>
</table>
<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="ReflectionBasedAutoSerializer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ReflectionBasedAutoSerializer</h4>
<pre>public&nbsp;ReflectionBasedAutoSerializer()</pre>
<div class="block">Default constructor primarily used during declarative configuration via the cache.xml file.
Instances created with this constructor will not match any classes so use
<a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#ReflectionBasedAutoSerializer-java.lang.String...-"><code>ReflectionBasedAutoSerializer(String...)</code></a> instead.</div>
</li>
</ul>
<a name="ReflectionBasedAutoSerializer-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ReflectionBasedAutoSerializer</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;ReflectionBasedAutoSerializer(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</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>&gt;&nbsp;classes)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">as of 6.6.2 use ReflectionBasedAutoSerializer(String...) instead.</span></div>
<div class="block">Constructor which takes a list of class name patterns which are to be auto-serialized.
Portability of serialization will not be checked.
<p>
Each string in the list represents a definition in the following form:
<pre>
&lt;class pattern&gt;#identity=&lt;identity field pattern&gt;#exclude=&lt;exclude field pattern&gt;
</pre>
The hash (#) characters are separators and are not part of the parameter name. An example would
be:
<pre>
com.company.DomainObject.*#identity=id.*#exclude=creationDate
</pre>
This would select all classes with a class name beginning with
<code>com.company.DomainObject</code> and would select as PDX identity fields any fields
beginning with <code>id</code> and would not serialize the field called
<code>creationDate</code>.
<p>
There is no association between the the <i>identity</i> and <i>exclude</i> options, so the
above example could also be expressed as:
<pre>
com.company.DomainObject.*#identity=id.*
com.company.DomainObject.*#exclude=creationDate
</pre>
Note that <u>all</u> defined patterns are used when determining whether a field should be
considered as an identity field or should be excluded. Thus the order of the patterns is not
relevant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>classes</code> - the patterns which are matched against domain class names to determine whether
they should be serialized</dd>
</dl>
</li>
</ul>
<a name="ReflectionBasedAutoSerializer-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ReflectionBasedAutoSerializer</h4>
<pre>public&nbsp;ReflectionBasedAutoSerializer(<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;patterns)</pre>
<div class="block">Constructor which takes a list of class name patterns which are to be auto-serialized.
Portability of serialization will not be checked.
<p>
Each string in the list represents a definition in the following form:
<pre>
&lt;class pattern&gt;#identity=&lt;identity field pattern&gt;#exclude=&lt;exclude field pattern&gt;
</pre>
The hash (#) characters are separators and are not part of the parameter name. An example would
be:
<pre>
com.company.DomainObject.*#identity=id.*#exclude=creationDate
</pre>
This would select all classes with a class name beginning with
<code>com.company.DomainObject</code> and would select as PDX identity fields any fields
beginning with <code>id</code> and would not serialize the field called
<code>creationDate</code>.
<p>
There is no association between the the <i>identity</i> and <i>exclude</i> options, so the
above example could also be expressed as:
<pre>
com.company.DomainObject.*#identity=id.*
com.company.DomainObject.*#exclude=creationDate
</pre>
Note that <u>all</u> defined patterns are used when determining whether a field should be
considered as an identity field or should be excluded. Thus the order of the patterns is not
relevant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>patterns</code> - the patterns which are matched against domain class names to determine whether
they should be serialized</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="ReflectionBasedAutoSerializer-boolean-java.lang.String...-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ReflectionBasedAutoSerializer</h4>
<pre>public&nbsp;ReflectionBasedAutoSerializer(boolean&nbsp;checkPortability,
<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;patterns)</pre>
<div class="block">Constructor which takes a list of class name patterns which are to be auto-serialized.
<p>
Each string in the list represents a definition in the following form:
<pre>
&lt;class pattern&gt;#identity=&lt;identity field pattern&gt;#exclude=&lt;exclude field pattern&gt;
</pre>
The hash (#) characters are separators and are not part of the parameter name. An example would
be:
<pre>
com.company.DomainObject.*#identity=id.*#exclude=creationDate
</pre>
This would select all classes with a class name beginning with
<code>com.company.DomainObject</code> and would select as PDX identity fields any fields
beginning with <code>id</code> and would not serialize the field called
<code>creationDate</code>.
<p>
There is no association between the the <i>identity</i> and <i>exclude</i> options, so the
above example could also be expressed as:
<pre>
com.company.DomainObject.*#identity=id.*
com.company.DomainObject.*#exclude=creationDate
</pre>
Note that <u>all</u> defined patterns are used when determining whether a field should be
considered as an identity field or should be excluded. Thus the order of the patterns is not
relevant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>checkPortability</code> - if <code>true</code> then an serialization done by this serializer will
throw an exception if the object it not portable to non-java languages.</dd>
<dd><code>patterns</code> - the patterns which are matched against domain class names to determine whether
they should be serialized</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</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="setSerializableClasses-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSerializableClasses</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setSerializableClasses(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</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>&gt;&nbsp;patterns)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">as of 6.6.2 use <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-java.lang.String...-"><code>reconfigure(String...)</code></a> instead.</span></div>
<div class="block">Method to configure classes to consider for serialization, to set any identity fields and to
define any fields to exclude from serialization.
<p>
Each string in the list represents a definition in the following form:
<pre>
&lt;class pattern&gt;#identity=&lt;identity field pattern&gt;#exclude=&lt;exclude field pattern&gt;
</pre>
The hash (#) characters are separators and are not part of the parameter name. An example would
be:
<pre>
com.company.DomainObject.*#identity=id.*#exclude=creationDate
</pre>
This would select all classes with a class name beginning with
<code>com.company.DomainObject</code> and would select as PDX identity fields any fields
beginning with <code>id</code> and would not serialize the field called
<code>creationDate</code>.
<p>
There is no association between the the <i>identity</i> and <i>exclude</i> options, so the
above example could also be expressed as:
<pre>
com.company.DomainObject.*#identity=id.*
com.company.DomainObject.*#exclude=creationDate
</pre>
Note that <u>all</u> defined patterns are used when determining whether a field should be
considered as an identity field or should be excluded. Thus the order of the patterns is not
relevant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>patterns</code> - the list of definitions to apply</dd>
</dl>
</li>
</ul>
<a name="reconfigure-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reconfigure</h4>
<pre>public&nbsp;void&nbsp;reconfigure(<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;patterns)</pre>
<div class="block">Method to reconfigure this serializer. Any previous configuration is cleared. The serializer
will not check for portable serialization.
<p>
Each string in the list represents a definition in the following form:
<pre>
&lt;class pattern&gt;#identity=&lt;identity field pattern&gt;#exclude=&lt;exclude field pattern&gt;
</pre>
The hash (#) characters are separators and are not part of the parameter name. An example would
be:
<pre>
com.company.DomainObject.*#identity=id.*#exclude=creationDate
</pre>
This would select all classes with a class name beginning with
<code>com.company.DomainObject</code> and would select as PDX identity fields any fields
beginning with <code>id</code> and would not serialize the field called
<code>creationDate</code>.
<p>
There is no association between the the <i>identity</i> and <i>exclude</i> options, so the
above example could also be expressed as:
<pre>
com.company.DomainObject.*#identity=id.*
com.company.DomainObject.*#exclude=creationDate
</pre>
Note that <u>all</u> defined patterns are used when determining whether a field should be
considered as an identity field or should be excluded. Thus the order of the patterns is not
relevant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>patterns</code> - the definitions to apply</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="reconfigure-boolean-java.lang.String...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reconfigure</h4>
<pre>public&nbsp;void&nbsp;reconfigure(boolean&nbsp;checkPortability,
<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;patterns)</pre>
<div class="block">Method to reconfigure this serializer. Any previous configuration is cleared.
<p>
Each string in the list represents a definition in the following form:
<pre>
&lt;class pattern&gt;#identity=&lt;identity field pattern&gt;#exclude=&lt;exclude field pattern&gt;
</pre>
The hash (#) characters are separators and are not part of the parameter name. An example would
be:
<pre>
com.company.DomainObject.*#identity=id.*#exclude=creationDate
</pre>
This would select all classes with a class name beginning with
<code>com.company.DomainObject</code> and would select as PDX identity fields any fields
beginning with <code>id</code> and would not serialize the field called
<code>creationDate</code>.
<p>
There is no association between the the <i>identity</i> and <i>exclude</i> options, so the
above example could also be expressed as:
<pre>
com.company.DomainObject.*#identity=id.*
com.company.DomainObject.*#exclude=creationDate
</pre>
Note that <u>all</u> defined patterns are used when determining whether a field should be
considered as an identity field or should be excluded. Thus the order of the patterns is not
relevant.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>patterns</code> - the definitions to apply</dd>
<dd><code>checkPortability</code> - if <code>true</code> then an serialization done by this serializer will
throw an exception if the object it not portable to non-java languages.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="toData-java.lang.Object-org.apache.geode.pdx.PdxWriter-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toData</h4>
<pre>public&nbsp;boolean&nbsp;toData(<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>&nbsp;obj,
<a href="../../../../org/apache/geode/pdx/PdxWriter.html" title="interface in org.apache.geode.pdx">PdxWriter</a>&nbsp;writer)</pre>
<div class="block">Method implemented from <code>PdxSerializer</code> which performs object serialization.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/geode/pdx/PdxSerializer.html#toData-java.lang.Object-org.apache.geode.pdx.PdxWriter-">toData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx">PdxSerializer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>obj</code> - the object to serialize</dd>
<dd><code>writer</code> - the <code>PdxWriter</code> to use when serializing this object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the object was serialized, <code>false</code> otherwise</dd>
</dl>
</li>
</ul>
<a name="fromData-java.lang.Class-org.apache.geode.pdx.PdxReader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromData</h4>
<pre>public&nbsp;<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>&nbsp;fromData(<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;clazz,
<a href="../../../../org/apache/geode/pdx/PdxReader.html" title="interface in org.apache.geode.pdx">PdxReader</a>&nbsp;reader)</pre>
<div class="block">Method implemented from <code>PdxSerializer</code> which performs object de-serialization.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/geode/pdx/PdxSerializer.html#fromData-java.lang.Class-org.apache.geode.pdx.PdxReader-">fromData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx">PdxSerializer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - the class of the object to re-create</dd>
<dd><code>reader</code> - the <code>PdxReader</code> to use when creating this object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the deserialized object if this serializer handles the given class, null otherwise.</dd>
</dl>
</li>
</ul>
<a name="init-java.util.Properties-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;init(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;props)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">as of Geode 1.5 use initialize instead</span></div>
<div class="block">Used for declarative class initialization from cache.xml. The following property may be
specified:
<ul>
<li><b>classes</b> - a comma-delimited list of strings which represent the patterns used to
select classes for serialization, patterns to select identity fields and patterns to exclude
fields. See <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-java.lang.String...-"><code>reconfigure</code></a> for
specifics.</li>
<li><b>check-portability</b> - if true then an exception will be thrown if an attempt to
serialize data that is not portable to .NET is made.</li>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/geode/cache/Declarable.html#init-java.util.Properties-">init</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/geode/cache/Declarable.html" title="interface in org.apache.geode.cache">Declarable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>props</code> - properties used to configure the auto serializer</dd>
</dl>
</li>
</ul>
<a name="initialize-org.apache.geode.cache.Cache-java.util.Properties-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initialize</h4>
<pre>public&nbsp;void&nbsp;initialize(<a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a>&nbsp;cache,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;props)</pre>
<div class="block">Used for declarative class initialization from cache.xml. The following property may be
specified:
<ul>
<li><b>classes</b> - a comma-delimited list of strings which represent the patterns used to
select classes for serialization, patterns to select identity fields and patterns to exclude
fields. See <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#reconfigure-java.lang.String...-"><code>reconfigure</code></a> for
specifics.</li>
<li><b>check-portability</b> - if true then an exception will be thrown if an attempt to
serialize data that is not portable to .NET is made.</li>
</ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/geode/cache/Declarable.html#initialize-org.apache.geode.cache.Cache-java.util.Properties-">initialize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/geode/cache/Declarable.html" title="interface in org.apache.geode.cache">Declarable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cache</code> - the cache that owns this serializer</dd>
<dd><code>props</code> - properties used to configure the auto serializer</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Geode 1.5</dd>
</dl>
</li>
</ul>
<a name="getConfig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfig</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;getConfig()</pre>
<div class="block">Return a <code>Properties</code> object with a representation of the current config. Depending
on how this <code>ReflectionBasedAutoSerializer</code> was configured, the returned property
value will have the correct semantics but may differ from the the original configuration
string.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>Properties</code> object</dd>
</dl>
</li>
</ul>
<a name="isClassAutoSerialized-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClassAutoSerialized</h4>
<pre>public&nbsp;boolean&nbsp;isClassAutoSerialized(<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;clazz)</pre>
<div class="block">Controls what classes will be auto serialized by this serializer. Override this method to
customize what classes will be auto serialized.
<p>
The default implementation:
<ul>
<li>only serializes classes whose name matches one of the patterns
<li>excludes classes whose package begins with "org.apache.", "java.", or "javax." unless the
system property "gemfire.auto.serialization.no.hardcoded.excludes" is set to "true".
<li>excludes classes that do not have a public no-arg constructor
<li>excludes enum classes
<li>excludes classes that require standard java serialization. A class requires standard java
serialization if it extends Externalizable or if it extends Serializable and has either a
private writeObject method or a writeReplace method as defined by the java serialization
specification.
</ul>
<p>
This method is only called the first time it sees a new class. The result will be remembered
and used the next time the same class is seen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - the class that is being considered for auto serialization.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if instances of the class should be auto serialized; false if not.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="isFieldIncluded-java.lang.reflect.Field-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFieldIncluded</h4>
<pre>public&nbsp;boolean&nbsp;isFieldIncluded(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</pre>
<div class="block">Controls what fields of a class will be auto serialized by this serializer. Override this
method to customize what fields of a class will be auto serialized.
<p>
The default implementation:
<ul>
<li>excludes transient fields
<li>excludes static fields
<li>excludes any fields that match an "#exclude=" pattern.
</ul>
All other fields are included.
<p>
This method is only called the first time it sees a new class. The result will be remembered
and used the next time the same class is seen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field being considered for serialization</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the field should be serialized as a pdx field; false if it should be ignored.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="getFieldName-java.lang.reflect.Field-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFieldName</h4>
<pre>public&nbsp;<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;getFieldName(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</pre>
<div class="block">Controls the field name that will be used in pdx for a field being auto serialized. Override
this method to customize the field names that will be generated by auto serialization. It
allows you to convert a local, language dependent name, to a more portable name. The returned
name is the one that will show up in a <a href="../../../../org/apache/geode/pdx/PdxInstance.html" title="interface in org.apache.geode.pdx"><code>PdxInstance</code></a> and that one that will need to be
used to access the field when doing a query.
<p>
The default implementation returns the name obtained from <code>f</code>.
<p>
This method is only called the first time it sees a new class. The result will be remembered
and used the next time the same class is seen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field whose name is returned.</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of the field</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="isIdentityField-java.lang.reflect.Field-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isIdentityField</h4>
<pre>public&nbsp;boolean&nbsp;isIdentityField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</pre>
<div class="block">Controls what fields of a class that is auto serialized will be marked as pdx identity fields.
Override this method to customize what fields of an auto serialized class will be identity
fields. Identity fields are used when a <a href="../../../../org/apache/geode/pdx/PdxInstance.html" title="interface in org.apache.geode.pdx"><code>PdxInstance</code></a> computes its hash code and checks
to see if it is equal to another object.
<p>
The default implementation only marks fields that match an "#identity=" pattern as identity
fields.
<p>
This method is only called the first time it sees a new class. The result will be remembered
and used the next time the same class is seen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field to test to see if it is an identity field.</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the field should be marked as an identity field; false if not.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="getFieldType-java.lang.reflect.Field-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFieldType</h4>
<pre>public&nbsp;<a href="../../../../org/apache/geode/pdx/FieldType.html" title="enum in org.apache.geode.pdx">FieldType</a>&nbsp;getFieldType(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</pre>
<div class="block">Controls what pdx field type will be used when auto serializing. Override this method to
customize what pdx field type will be used for a given domain class field.
<p>
The default implementation uses <a href="../../../../org/apache/geode/pdx/FieldType.html#get-java.lang.Class-"><code>FieldType.get(Class)</code></a> by passing it
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getType--" title="class or interface in java.lang.reflect"><code>Field.getType()</code></a>.
<p>
This method is only called the first time it sees a new class. The result will be remembered
and used the next time the same class is seen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field whose pdx field type needs to be determined</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the pdx field type of the given domain class field.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="transformFieldValue-java.lang.reflect.Field-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transformFieldValue</h4>
<pre>public&nbsp;boolean&nbsp;transformFieldValue(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz)</pre>
<div class="block">Controls if a pdx field's value can be transformed during serialization. Override this method
to customize what fields can have their values transformed. If you return true then you need to
also override <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#writeTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-"><code>writeTransform(java.lang.reflect.Field, java.lang.Class&lt;?&gt;, java.lang.Object)</code></a> and <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#readTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-"><code>readTransform(java.lang.reflect.Field, java.lang.Class&lt;?&gt;, java.lang.Object)</code></a>.
<p>
The default implementation returns false.
<p>
This method is only called the first time it sees a new class. The result will be remembered
and used the next time the same class is seen.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field in question</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#writeTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-"><code>writeTransform(java.lang.reflect.Field, java.lang.Class&lt;?&gt;, java.lang.Object)</code></a> and <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#readTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-"><code>readTransform(java.lang.reflect.Field, java.lang.Class&lt;?&gt;, java.lang.Object)</code></a> need to be called when
serializing and deserializing this field's value.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="writeTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeTransform</h4>
<pre>public&nbsp;<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>&nbsp;writeTransform(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz,
<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>&nbsp;originalValue)</pre>
<div class="block">Controls what field value is written during auto serialization. Override this method to
customize the data that will be written during auto serialization. This method will only be
called if <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#transformFieldValue-java.lang.reflect.Field-java.lang.Class-"><code>transformFieldValue(java.lang.reflect.Field, java.lang.Class&lt;?&gt;)</code></a> returned true.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field in question</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dd><code>originalValue</code> - the value of the field that was read from the domain object.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the actual value to write for this field. Return <code>originalValue</code> if you
decide not to transform the value.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="readTransform-java.lang.reflect.Field-java.lang.Class-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readTransform</h4>
<pre>public&nbsp;<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>&nbsp;readTransform(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;f,
<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;clazz,
<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>&nbsp;serializedValue)</pre>
<div class="block">Controls what field value is read during auto deserialization. Override this method to
customize the data that will be read during auto deserialization. This method will only be
called if <a href="../../../../org/apache/geode/pdx/ReflectionBasedAutoSerializer.html#transformFieldValue-java.lang.reflect.Field-java.lang.Class-"><code>transformFieldValue(java.lang.reflect.Field, java.lang.Class&lt;?&gt;)</code></a> returned true.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - the field in question</dd>
<dd><code>clazz</code> - the original class being serialized that owns this field. Note that this field may
have been inherited from a super class by this class. If you want to find the class that
declared this field use <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang.reflect"><code>Field.getDeclaringClass()</code></a>.</dd>
<dd><code>serializedValue</code> - the value of the field that was serialized for this field.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the actual value to write for this field. Return <code>serializedValue</code> if you
decide not to transform the value.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="getRegionService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRegionService</h4>
<pre>public&nbsp;<a href="../../../../org/apache/geode/cache/RegionService.html" title="interface in org.apache.geode.cache">RegionService</a>&nbsp;getRegionService()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the cache that this serializer is installed on. Returns null if it is not installed.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="getManager--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getManager</h4>
<pre>public&nbsp;<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>&nbsp;getManager()</pre>
<div class="block">For internal use only.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the manager associated with this serializer</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 8.2</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/geode/pdx/PdxWriter.html" title="interface in org.apache.geode.pdx"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/geode/pdx/ReflectionBasedAutoSerializer.html" target="_top">Frames</a></li>
<li><a href="ReflectionBasedAutoSerializer.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 ======= -->
</body>
</html>