<! DOCTYPE HTML>
<!--  NewPage -->
<html lang="en">
<head>
<!--  Generated by javadoc -->
<title>ConstantDesc (Java SE 12 &amp; JDK 12 )</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="java.lang.constant. ConstantDesc interface">
<meta name="keywords" content="resolveConstantDesc()">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<! --[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![ endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="ConstantDesc (Java SE 12 & JDK 12 )";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!--  ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--    -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--    -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ConstantDesc.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 class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
<!--    -->
</a>
<!--  ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!--  ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="moduleLabelInType">Module</span>&nbsp;<a href="../../../module-summary.html">java.base</a></div>
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">java.lang.constant</a></div>
<h2 title="Interface ConstantDesc" class="title">Interface ConstantDesc</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="ClassDesc.html" title="interface in java.lang.constant">ClassDesc</a></code>, <code><a href="DirectMethodHandleDesc.html" title="interface in java.lang.constant">DirectMethodHandleDesc</a></code>, <code><a href="MethodHandleDesc.html" title="interface in java.lang.constant">MethodHandleDesc</a></code>, <code><a href="MethodTypeDesc.html" title="interface in java.lang.constant">MethodTypeDesc</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">ConstantDesc</span></pre>
<div class="block">A <a href="package-summary.html#nominal">nominal descriptor</a> for a loadable
 constant value, as defined in JVMS 4.4.  Such a descriptor can be resolved via
 <a href="#resolveConstantDesc(java.lang.invoke. MethodHandles. Lookup)"><code>resolveConstantDesc(MethodHandles. Lookup)</code></a> to yield the
 constant value itself. 

 <p>Class names in a nominal descriptor, like class names in the constant pool
 of a classfile, must be interpreted with respect to a particular class
 loader, which is not part of the nominal descriptor. 

 <p>Static constants that are expressible natively in the constant pool (<a href="../String.html" title="class in java.lang"><code>String</code></a>,
 <a href="../Integer.html" title="class in java.lang"><code>Integer</code></a>, <a href="../Long.html" title="class in java.lang"><code>Long</code></a>, <a href="../Float.html" title="class in java.lang"><code>Float</code></a>, and <a href="../Double.html" title="class in java.lang"><code>Double</code></a>) implement
 <a href="ConstantDesc.html" title="interface in java.lang.constant"><code>ConstantDesc</code></a>, and serve as nominal descriptors for themselves. 
 Native linkable constants (<a href="../Class.html" title="class in java.lang"><code>Class</code></a>, <a href="../invoke/MethodType.html" title="class in java.lang.invoke"><code>MethodType</code></a>, and
 <a href="../invoke/MethodHandle.html" title="class in java.lang.invoke"><code>MethodHandle</code></a>) have counterpart <a href="ConstantDesc.html" title="interface in java.lang.constant">ConstantDesc</a> types:
 <a href="ClassDesc.html" title="interface in java.lang.constant"><code>ClassDesc</code></a>, <a href="MethodTypeDesc.html" title="interface in java.lang.constant"><code>MethodTypeDesc</code></a>, and <a href="MethodHandleDesc.html" title="interface in java.lang.constant"><code>MethodHandleDesc</code></a>. 
 Other constants are represented by subtypes of <a href="DynamicConstantDesc.html" title="class in java.lang.constant"><code>DynamicConstantDesc</code></a>. 

 <p>APIs that perform generation or parsing of bytecode are encouraged to use
 <a href="ConstantDesc.html" title="interface in java.lang.constant">ConstantDesc</a> to describe the operand of an <code>ldc</code> instruction
 (including dynamic constants), the static bootstrap arguments of
 dynamic constants and <code>invokedynamic</code> instructions, and other
 bytecodes or classfile structures that make use of the constant pool. 

 <p>Constants describing various common constants (such as <a href="ClassDesc.html" title="interface in java.lang.constant"><code>ClassDesc</code></a>
 instances for platform types) can be found in <a href="ConstantDescs.html" title="class in java.lang.constant"><code>ConstantDescs</code></a>. 

 <p>Implementations of <a href="ConstantDesc.html" title="interface in java.lang.constant">ConstantDesc</a> must be
 <a href="../doc-files/ValueBased.html">value-based</a> classes. 

 <p>Non-platform classes should not implement <a href="ConstantDesc.html" title="interface in java.lang.constant">ConstantDesc</a> directly. 
 Instead, they should extend <a href="DynamicConstantDesc.html" title="class in java.lang.constant"><code>DynamicConstantDesc</code></a> (as <a href="../Enum. EnumDesc.html" title="class in java.lang"><code>Enum. EnumDesc</code></a>
 and <a href="../invoke/VarHandle. VarHandleDesc.html" title="class in java.lang.invoke"><code>VarHandle. VarHandleDesc</code></a> do.) 

 <p>Nominal descriptors should be compared using the
 <a href="../Object.html#equals(java.lang. Object)"><code>Object.equals(Object)</code></a> method.  There is no guarantee that any
 particular entity will always be represented by the same descriptor instance.</div>
<dl>
<dt><span class="simpleTagLabel">API Note:</span></dt>
<dd>In the future, if the Java language permits, <a href="ConstantDesc.html" title="interface in java.lang.constant">ConstantDesc</a>
 may become a <code>sealed</code> interface, which would prohibit subclassing except by
 explicitly permitted types.   Clients can assume that the following
 set of subtypes is exhaustive: <a href="../String.html" title="class in java.lang"><code>String</code></a>, <a href="../Integer.html" title="class in java.lang"><code>Integer</code></a>,
 <a href="../Long.html" title="class in java.lang"><code>Long</code></a>, <a href="../Float.html" title="class in java.lang"><code>Float</code></a>, <a href="../Double.html" title="class in java.lang"><code>Double</code></a>, <a href="ClassDesc.html" title="interface in java.lang.constant"><code>ClassDesc</code></a>,
 <a href="MethodTypeDesc.html" title="interface in java.lang.constant"><code>MethodTypeDesc</code></a>, <a href="MethodHandleDesc.html" title="interface in java.lang.constant"><code>MethodHandleDesc</code></a>, and
 <a href="DynamicConstantDesc.html" title="class in java.lang.constant"><code>DynamicConstantDesc</code></a>; this list may be extended to reflect future
 changes to the constant pool format as defined in JVMS 4.4.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>12</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Constable.html" title="interface in java.lang.constant"><code>Constable</code></a>, 
<a href="ConstantDescs.html" title="class in java.lang.constant"><code>ConstantDescs</code></a></dd>
<dt><span class="simpleTagLabel">See <cite>The Java&trade; Virtual Machine Specification</cite>:</span></dt>
<dd>4.4 The Constant Pool</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!--  ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--    -->
</a>
<h3>Method Summary</h3>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code><a href="../Object.html" title="class in java.lang">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resolveConstantDesc(java.lang.invoke. MethodHandles. Lookup)">resolveConstantDesc</a></span>&#8203;(<a href="../invoke/MethodHandles. Lookup.html" title="class in java.lang.invoke">MethodHandles. Lookup</a>&nbsp;lookup)</code></th>
<td class="colLast">
<div class="block">Resolves this descriptor reflectively, emulating the resolution behavior
 of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!--  ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--    -->
</a>
<h3>Method Detail</h3>
<a id="resolveConstantDesc(java.lang.invoke. MethodHandles. Lookup)">
<!--    -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>resolveConstantDesc</h4>
<pre class="methodSignature"><a href="../Object.html" title="class in java.lang">Object</a>&nbsp;resolveConstantDesc&#8203;(<a href="../invoke/MethodHandles. Lookup.html" title="class in java.lang.invoke">MethodHandles. Lookup</a>&nbsp;lookup)
                    throws <a href="../ReflectiveOperationException.html" title="class in java.lang">ReflectiveOperationException</a></pre>
<div class="block">Resolves this descriptor reflectively, emulating the resolution behavior
 of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4.   The resolution
 and access control context is provided by the <a href="../invoke/MethodHandles. Lookup.html" title="class in java.lang.invoke"><code>MethodHandles. Lookup</code></a>
 parameter.   No caching of the resulting value is performed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lookup</code> - The <a href="../invoke/MethodHandles. Lookup.html" title="class in java.lang.invoke"><code>MethodHandles. Lookup</code></a> to provide name resolution
               and access control context</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the resolved constant value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../ReflectiveOperationException.html" title="class in java.lang">ReflectiveOperationException</a></code> - if a class, method, or field
 could not be reflectively resolved in the course of resolution</dd>
<dd><code><a href="../LinkageError.html" title="class in java.lang">LinkageError</a></code> - if a linkage error occurs</dd>
<dt><span class="simpleTagLabel">See <cite>The Java&trade; Virtual Machine Specification</cite>:</span></dt>
<dd>5.4.3 Resolution, 5.4.4 Access Control</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!--  ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!--  ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--    -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--    -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ConstantDesc.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 class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!--    -->
</a>
<!--  ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small><a href="https://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> For further API reference and developer documentation see the <a href="https://docs.oracle.com/pls/topic/lookup?ctx=javase12.0.2&amp;id=homepage" target="_blank">Java SE Documentation</a>, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.<br> <a href="../../../../../legal/copyright.html">Copyright</a> &copy; 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.<br>All rights reserved.  Use is subject to <a href="https://www.oracle.com/technetwork/java/javase/terms/license/java12.0.2speclicense.html">license terms</a> and the <a href="https://www.oracle.com/technetwork/java/redist-137594.html">documentation redistribution policy</a>.  <!--  Version 12.0.2+10 --></small></p>
</footer>
</body>
</html>
