ProtocolLib/Javadoc/com/comphenix/protocol/reflect/VolatileField.html

459 lines
17 KiB
HTML
Raw Normal View History

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>
2012-10-11 03:00:53 +02:00
<!-- Generated by javadoc (version 1.7.0_07) on Thu Oct 11 02:58:30 CEST 2012 -->
2012-09-18 17:27:59 +02:00
<title>VolatileField</title>
2012-10-11 03:00:53 +02:00
<meta name="date" content="2012-10-11">
2012-09-18 17:27:59 +02:00
<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="VolatileField";
}
//-->
</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/VolatileField.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">
2012-10-05 04:45:17 +02:00
<li><a href="../../../../com/comphenix/protocol/reflect/StructureModifierTest.html" title="class in com.comphenix.protocol.reflect"><span class="strong">Prev Class</span></a></li>
2012-09-18 17:27:59 +02:00
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/reflect/VolatileField.html" target="_top">Frames</a></li>
<li><a href="VolatileField.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 VolatileField" class="title">Class VolatileField</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.comphenix.protocol.reflect.VolatileField</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">VolatileField</span>
extends java.lang.Object</pre>
<div class="block">Represents a field that will revert to its original state when this class is garbaged collected.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Kristian</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="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/VolatileField.html#VolatileField(java.lang.reflect.Field, java.lang.Object)">VolatileField</a></strong>(java.lang.reflect.Field&nbsp;field,
java.lang.Object&nbsp;container)</code>
<div class="block">Initializes a volatile field with an associated object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#VolatileField(java.lang.reflect.Field, java.lang.Object, boolean)">VolatileField</a></strong>(java.lang.reflect.Field&nbsp;field,
java.lang.Object&nbsp;container,
boolean&nbsp;forceAccess)</code>
<div class="block">Initializes a volatile field with an associated object.</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>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#finalize()">finalize</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#getContainer()">getContainer</a></strong>()</code>
<div class="block">Retrieves the object the field is stored.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.reflect.Field</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#getField()">getField</a></strong>()</code>
<div class="block">Retrieves the current field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#getOldValue()">getOldValue</a></strong>()</code>
<div class="block">Retrieves the field value before the previous setValue(), unless saveValue() has been called.</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/VolatileField.html#getValue()">getValue</a></strong>()</code>
<div class="block">Retrieves the current field value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
2012-10-01 05:01:08 +02:00
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#isCurrentSet()">isCurrentSet</a></strong>()</code>
<div class="block">Determine whether or not we'll need to revert the value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
2012-09-18 17:27:59 +02:00
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#isForceAccess()">isForceAccess</a></strong>()</code>
<div class="block">Retrieves whether or not not to override any scope restrictions.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="rowColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#revertValue()">revertValue</a></strong>()</code>
<div class="block">Revert to the previously set value.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="altColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#saveValue()">saveValue</a></strong>()</code>
<div class="block">Ensure that the current value is still set after this class has been garbaged collected.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="rowColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#setForceAccess(boolean)">setForceAccess</a></strong>(boolean&nbsp;forceAccess)</code>
<div class="block">Sets whether or not not to override any scope restrictions.</div>
</td>
</tr>
2012-10-01 05:01:08 +02:00
<tr class="altColor">
2012-09-18 17:27:59 +02:00
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/reflect/VolatileField.html#setValue(java.lang.Object)">setValue</a></strong>(java.lang.Object&nbsp;newValue)</code>
<div class="block">Sets the current value.</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, 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="VolatileField(java.lang.reflect.Field, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>VolatileField</h4>
<pre>public&nbsp;VolatileField(java.lang.reflect.Field&nbsp;field,
java.lang.Object&nbsp;container)</pre>
<div class="block">Initializes a volatile field with an associated object.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>field</code> - - the field.</dd><dd><code>container</code> - - the object this field belongs to.</dd></dl>
</li>
</ul>
<a name="VolatileField(java.lang.reflect.Field, java.lang.Object, boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>VolatileField</h4>
<pre>public&nbsp;VolatileField(java.lang.reflect.Field&nbsp;field,
java.lang.Object&nbsp;container,
boolean&nbsp;forceAccess)</pre>
<div class="block">Initializes a volatile field with an associated object.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>field</code> - - the field.</dd><dd><code>container</code> - - the object this field belongs to.</dd><dd><code>forceAccess</code> - - whether or not to override any scope restrictions.</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="getField()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getField</h4>
<pre>public&nbsp;java.lang.reflect.Field&nbsp;getField()</pre>
<div class="block">Retrieves the current field.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The stored field.</dd></dl>
</li>
</ul>
<a name="getContainer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContainer</h4>
<pre>public&nbsp;java.lang.Object&nbsp;getContainer()</pre>
<div class="block">Retrieves the object the field is stored.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The reference object.</dd></dl>
</li>
</ul>
<a name="isForceAccess()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isForceAccess</h4>
<pre>public&nbsp;boolean&nbsp;isForceAccess()</pre>
<div class="block">Retrieves whether or not not to override any scope restrictions.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE if we override scope, FALSE otherwise.</dd></dl>
</li>
</ul>
<a name="setForceAccess(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setForceAccess</h4>
<pre>public&nbsp;void&nbsp;setForceAccess(boolean&nbsp;forceAccess)</pre>
<div class="block">Sets whether or not not to override any scope restrictions.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>forceAccess</code> - - TRUE if we override scope, FALSE otherwise.</dd></dl>
</li>
</ul>
<a name="getValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre>public&nbsp;java.lang.Object&nbsp;getValue()</pre>
<div class="block">Retrieves the current field value.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The current field value.</dd></dl>
</li>
</ul>
<a name="getOldValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOldValue</h4>
<pre>public&nbsp;java.lang.Object&nbsp;getOldValue()</pre>
<div class="block">Retrieves the field value before the previous setValue(), unless saveValue() has been called.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Previous value.</dd></dl>
</li>
</ul>
<a name="setValue(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValue</h4>
<pre>public&nbsp;void&nbsp;setValue(java.lang.Object&nbsp;newValue)</pre>
<div class="block">Sets the current value. This will be reverted unless saveValue() is called.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newValue</code> - - new field value.</dd></dl>
</li>
</ul>
<a name="saveValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>saveValue</h4>
<pre>public&nbsp;void&nbsp;saveValue()</pre>
<div class="block">Ensure that the current value is still set after this class has been garbaged collected.</div>
</li>
</ul>
<a name="revertValue()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>revertValue</h4>
<pre>public&nbsp;void&nbsp;revertValue()</pre>
<div class="block">Revert to the previously set value.</div>
</li>
</ul>
2012-10-01 05:01:08 +02:00
<a name="isCurrentSet()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCurrentSet</h4>
<pre>public&nbsp;boolean&nbsp;isCurrentSet()</pre>
<div class="block">Determine whether or not we'll need to revert the value.</div>
</li>
</ul>
2012-09-18 17:27:59 +02:00
<a name="finalize()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>finalize</h4>
<pre>protected&nbsp;void&nbsp;finalize()
throws java.lang.Throwable</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Throwable</code></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/VolatileField.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">
2012-10-05 04:45:17 +02:00
<li><a href="../../../../com/comphenix/protocol/reflect/StructureModifierTest.html" title="class in com.comphenix.protocol.reflect"><span class="strong">Prev Class</span></a></li>
2012-09-18 17:27:59 +02:00
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/reflect/VolatileField.html" target="_top">Frames</a></li>
<li><a href="VolatileField.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>