Archiviert
13
0
Dieses Repository wurde am 2021-01-06 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
ProtocolLib/Javadoc/com/comphenix/protocol/reflect/StructureModifier.html

548 Zeilen
30 KiB
HTML

2012-09-18 17:27:59 +02:00
<!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 (version 1.7.0_07) on Tue Sep 18 17:21:14 CEST 2012 -->
<title>StructureModifier</title>
<meta name="date" content="2012-09-18">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StructureModifier";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/StructureModifier.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-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/comphenix/protocol/reflect/PrimitiveUtils.html" title="class in com.comphenix.protocol.reflect"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/comphenix/protocol/reflect/StructureModifierTest.html" title="class in com.comphenix.protocol.reflect"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/reflect/StructureModifier.html" target="_top">Frames</a></li>
<li><a href="StructureModifier.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:&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">com.comphenix.protocol.reflect</div>
<h2 title="Class StructureModifier" class="title">Class StructureModifier&lt;TField&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.comphenix.protocol.reflect.StructureModifier&lt;TField&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">StructureModifier&lt;TField&gt;</span>
extends java.lang.Object</pre>
</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="overviewSummary" 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><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#StructureModifier(java.lang.Class, java.lang.Class, boolean)">StructureModifier</a></strong>(java.lang.Class&nbsp;targetType,
java.lang.Class&nbsp;superclassExclude,
boolean&nbsp;requireDefault)</code>
<div class="block">Creates a structure modifier.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.reflect.Field&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#getFields()">getFields</a></strong>()</code>
<div class="block">Retrieves a list of the fields matching the constraints of this structure modifier.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Class</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#getFieldType()">getFieldType</a></strong>()</code>
<div class="block">Retrieves the common type of each field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#getTarget()">getTarget</a></strong>()</code>
<div class="block">Retrieves the object we're currently modifying.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Class</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#getTargetType()">getTargetType</a></strong>()</code>
<div class="block">Retrieves the type of the object we're modifying.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#getValues()">getValues</a></strong>()</code>
<div class="block">Retrieve every value stored in the fields of the current type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#modify(int, com.google.common.base.Function)">modify</a></strong>(int&nbsp;fieldIndex,
com.google.common.base.Function&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>,<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;select)</code>
<div class="block">Correctly modifies the value of a field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#read(int)">read</a></strong>(int&nbsp;fieldIndex)</code>
<div class="block">Reads the value of a field given its index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#readSafely(int)">readSafely</a></strong>(int&nbsp;fieldIndex)</code>
<div class="block">Reads the value of a field if and ONLY IF it exists.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#size()">size</a></strong>()</code>
<div class="block">Retrieve the number of readable types.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#withTarget(java.lang.Object)">withTarget</a></strong>(java.lang.Object&nbsp;target)</code>
<div class="block">Retrieves a structure modifier of the same type for a different object target.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#withType(java.lang.Class)">withType</a></strong>(java.lang.Class&nbsp;fieldType)</code>
<div class="block">Retrieves a structure modifier that only reads and writes fields of a given type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#withType(java.lang.Class, com.comphenix.protocol.reflect.EquivalentConverter)">withType</a></strong>(java.lang.Class&nbsp;fieldType,
<a href="../../../../com/comphenix/protocol/reflect/EquivalentConverter.html" title="interface in com.comphenix.protocol.reflect">EquivalentConverter</a>&lt;T&gt;&nbsp;converter)</code>
<div class="block">Retrieves a structure modifier that only reads and writes fields of a given type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#write(int, TField)">write</a></strong>(int&nbsp;fieldIndex,
<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&nbsp;value)</code>
<div class="block">Writes the value of a field given its index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#writeDefaults()">writeDefaults</a></strong>()</code>
<div class="block">Sets all non-primitive fields to a more fitting default value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html#writeSafely(int, TField)">writeSafely</a></strong>(int&nbsp;fieldIndex,
<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&nbsp;value)</code>
<div class="block">Writes the value of a given field IF and ONLY if it exists.</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.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="StructureModifier(java.lang.Class, java.lang.Class, boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StructureModifier</h4>
<pre>public&nbsp;StructureModifier(java.lang.Class&nbsp;targetType,
java.lang.Class&nbsp;superclassExclude,
boolean&nbsp;requireDefault)</pre>
<div class="block">Creates a structure modifier.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>targetType</code> - - the structure to modify.</dd><dd><code>superclassExclude</code> - - a superclass to exclude.</dd><dd><code>requireDefault</code> - - whether or not we will be using writeDefaults().</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="read(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&nbsp;read(int&nbsp;fieldIndex)
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Reads the value of a field given its index.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldIndex</code> - - index of the field.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value of the field.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - The field doesn't exist, or it cannot be accessed under the current security contraints.</dd></dl>
</li>
</ul>
<a name="readSafely(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readSafely</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&nbsp;readSafely(int&nbsp;fieldIndex)
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Reads the value of a field if and ONLY IF it exists.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldIndex</code> - - index of the field.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Value of the field, or NULL if it doesn't exist.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - The field cannot be accessed under the current security contraints.</dd></dl>
</li>
</ul>
<a name="write(int,java.lang.Object)">
<!-- -->
</a><a name="write(int, TField)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;write(int&nbsp;fieldIndex,
<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&nbsp;value)
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Writes the value of a field given its index.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldIndex</code> - - index of the field.</dd><dd><code>value</code> - - new value of the field.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This structure modifier - for chaining.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - The field doesn't exist, or it cannot be accessed under the current security contraints.</dd></dl>
</li>
</ul>
<a name="writeSafely(int,java.lang.Object)">
<!-- -->
</a><a name="writeSafely(int, TField)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeSafely</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;writeSafely(int&nbsp;fieldIndex,
<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&nbsp;value)
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Writes the value of a given field IF and ONLY if it exists.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldIndex</code> - - index of the potential field.</dd><dd><code>value</code> - - new value of the field.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This structure modifer - for chaining.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - The field cannot be accessed under the current security contraints.</dd></dl>
</li>
</ul>
<a name="modify(int, com.google.common.base.Function)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>modify</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;modify(int&nbsp;fieldIndex,
com.google.common.base.Function&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>,<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;select)
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Correctly modifies the value of a field.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldIndex</code> - - index of the field to modify.</dd><dd><code>select</code> - - the function that modifies the field value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This structure modifier - for chaining.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - The field cannot be accessed under the current security contraints.</dd></dl>
</li>
</ul>
<a name="withType(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withType</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;T&gt;&nbsp;withType(java.lang.Class&nbsp;fieldType)</pre>
<div class="block">Retrieves a structure modifier that only reads and writes fields of a given type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldType</code> - - the type, or supertype, of every field to modify.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A structure modifier for fields of this type.</dd></dl>
</li>
</ul>
<a name="writeDefaults()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeDefaults</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;writeDefaults()
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Sets all non-primitive fields to a more fitting default value. See <a href="../../../../com/comphenix/protocol/reflect/instances/DefaultInstances.html#getDefault(java.lang.Class)"><code>DefaultInstances.getDefault(Class)</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The current structure modifier - for chaining.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - If we're unable to write to the fields due to a security limitation.</dd></dl>
</li>
</ul>
<a name="withType(java.lang.Class, com.comphenix.protocol.reflect.EquivalentConverter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withType</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;T&gt;&nbsp;withType(java.lang.Class&nbsp;fieldType,
<a href="../../../../com/comphenix/protocol/reflect/EquivalentConverter.html" title="interface in com.comphenix.protocol.reflect">EquivalentConverter</a>&lt;T&gt;&nbsp;converter)</pre>
<div class="block">Retrieves a structure modifier that only reads and writes fields of a given type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fieldType</code> - - the type, or supertype, of every field to modify.</dd><dd><code>converter</code> - - converts objects into the given type.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A structure modifier for fields of this type.</dd></dl>
</li>
</ul>
<a name="getFieldType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFieldType</h4>
<pre>public&nbsp;java.lang.Class&nbsp;getFieldType()</pre>
<div class="block">Retrieves the common type of each field.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Common type of each field.</dd></dl>
</li>
</ul>
<a name="getTargetType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTargetType</h4>
<pre>public&nbsp;java.lang.Class&nbsp;getTargetType()</pre>
<div class="block">Retrieves the type of the object we're modifying.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Type of the object.</dd></dl>
</li>
</ul>
<a name="getTarget()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTarget</h4>
<pre>public&nbsp;java.lang.Object&nbsp;getTarget()</pre>
<div class="block">Retrieves the object we're currently modifying.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Object we're modifying.</dd></dl>
</li>
</ul>
<a name="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
<div class="block">Retrieve the number of readable types.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Readable types.</dd></dl>
</li>
</ul>
<a name="withTarget(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withTarget</h4>
<pre>public&nbsp;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="class in com.comphenix.protocol.reflect">StructureModifier</a>&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;withTarget(java.lang.Object&nbsp;target)</pre>
<div class="block">Retrieves a structure modifier of the same type for a different object target.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - - different target of the same type.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Structure modifier with the new target.</dd></dl>
</li>
</ul>
<a name="getFields()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFields</h4>
<pre>public&nbsp;java.util.List&lt;java.lang.reflect.Field&gt;&nbsp;getFields()</pre>
<div class="block">Retrieves a list of the fields matching the constraints of this structure modifier.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>List of fields.</dd></dl>
</li>
</ul>
<a name="getValues()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getValues</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../com/comphenix/protocol/reflect/StructureModifier.html" title="type parameter in StructureModifier">TField</a>&gt;&nbsp;getValues()
throws <a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></pre>
<div class="block">Retrieve every value stored in the fields of the current type.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Every field value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../com/comphenix/protocol/reflect/FieldAccessException.html" title="class in com.comphenix.protocol.reflect">FieldAccessException</a></code> - Unable to access one or all of the fields</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/StructureModifier.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-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/comphenix/protocol/reflect/PrimitiveUtils.html" title="class in com.comphenix.protocol.reflect"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/comphenix/protocol/reflect/StructureModifierTest.html" title="class in com.comphenix.protocol.reflect"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/reflect/StructureModifier.html" target="_top">Frames</a></li>
<li><a href="StructureModifier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All 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>