blob: 85e9cbe52a850a465af70e67f76fa462b84168ca [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 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ReflectUtil (Apache Calcite calcite API)</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="ReflectUtil (Apache Calcite calcite API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="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 class="aboutLanguage"><b>Apache Calcite</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/calcite/util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/calcite/util/ReflectUtil.html" target="_top">Frames</a></li>
<li><a href="ReflectUtil.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><a href="#nested.class.summary">Nested</a>&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.calcite.util</div>
<h2 title="Class ReflectUtil" class="title">Class ReflectUtil</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.calcite.util.ReflectUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">ReflectUtil</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></pre>
<div class="block">Static utilities for Java reflection.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a>&lt;<a href="../../../../org/apache/calcite/util/ReflectUtil.MethodDispatcher.html" title="type parameter in ReflectUtil.MethodDispatcher">T</a>&gt;</span></code>
<div class="block">Can invoke a method on an object of type E with return type T.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== 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/calcite/util/ReflectUtil.html#ReflectUtil--">ReflectUtil</a></span>()</code>&nbsp;</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static 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></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>static &lt;R extends <a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>,E&gt;<br><a href="../../../../org/apache/calcite/util/ReflectiveVisitDispatcher.html" title="interface in org.apache.calcite.util">ReflectiveVisitDispatcher</a>&lt;R,E&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#createDispatcher-java.lang.Class-java.lang.Class-">createDispatcher</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;R&gt;&nbsp;visitorBaseClazz,
<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;E&gt;&nbsp;visiteeBaseClazz)</code>
<div class="block">Creates a dispatcher for calls to <a href="../../../../org/apache/calcite/util/ReflectUtil.html#lookupVisitMethod-java.lang.Class-java.lang.Class-java.lang.String-"><code>lookupVisitMethod(java.lang.Class&lt;?&gt;, java.lang.Class&lt;?&gt;, java.lang.String)</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static &lt;E,T&gt;&nbsp;<a href="../../../../org/apache/calcite/util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a>&lt;T&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#createMethodDispatcher-java.lang.Class-org.apache.calcite.util.ReflectiveVisitor-java.lang.String-java.lang.Class-java.lang.Class...-">createMethodDispatcher</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;T&gt;&nbsp;returnClazz,
<a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>&nbsp;visitor,
<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;methodName,
<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;E&gt;&nbsp;arg0Clazz,
<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>...&nbsp;otherArgClasses)</code>
<div class="block">Creates a dispatcher for calls to a single multi-method on a particular
object.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#getBoxingClass-java.lang.Class-">getBoxingClass</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>&nbsp;primitiveClass)</code>
<div class="block">Gets the Java boxing class for a primitive class.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#getByteBufferReadMethod-java.lang.Class-">getByteBufferReadMethod</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>&nbsp;clazz)</code>
<div class="block">Uses reflection to find the correct java.nio.ByteBuffer "absolute get"
method for a given primitive type.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#getByteBufferWriteMethod-java.lang.Class-">getByteBufferWriteMethod</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>&nbsp;clazz)</code>
<div class="block">Uses reflection to find the correct java.nio.ByteBuffer "absolute put"
method for a given primitive type.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <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/calcite/util/ReflectUtil.html#getParameterName-java.lang.reflect.Method-int-">getParameterName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
int&nbsp;i)</code>
<div class="block">Derives the name of the <code>i</code>th parameter of a method.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <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/calcite/util/ReflectUtil.html#getUnmangledMethodName-java.lang.Class-java.lang.String-java.lang.Class:A-">getUnmangledMethodName</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>&nbsp;declaringClass,
<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;methodName,
<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>[]&nbsp;paramTypes)</code>
<div class="block">Composes a string representing a human-readable method name (with neither
exception nor return type information).</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <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/calcite/util/ReflectUtil.html#getUnmangledMethodName-java.lang.reflect.Method-">getUnmangledMethodName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method)</code>
<div class="block">Composes a string representing a human-readable method name (with neither
exception nor return type information).</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <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/calcite/util/ReflectUtil.html#getUnqualifiedClassName-java.lang.Class-">getUnqualifiedClassName</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>&nbsp;c)</code>
<div class="block">Gets the name of a class with no package qualifiers; if it's an inner
class, it will still be qualified by the containing class (X$Y).</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#invokeVisitor-org.apache.calcite.util.ReflectiveVisitor-java.lang.Object-java.lang.Class-java.lang.String-">invokeVisitor</a></span>(<a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>&nbsp;visitor,
<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;visitee,
<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>&nbsp;hierarchyRoot,
<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;visitMethodName)</code>
<div class="block">Implements the <a href="../../../../org/apache/calcite/util/Glossary.html#VISITOR_PATTERN"><code>Glossary.VISITOR_PATTERN</code></a> via
reflection.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#isParameterOptional-java.lang.reflect.Method-int-">isParameterOptional</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
int&nbsp;i)</code>
<div class="block">Derives whether the <code>i</code>th parameter of a method is optional.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#lookupVisitMethod-java.lang.Class-java.lang.Class-java.lang.String-">lookupVisitMethod</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;visitorClass,
<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;visiteeClass,
<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;visitMethodName)</code>
<div class="block">Looks up a visit method.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/calcite/util/ReflectUtil.html#lookupVisitMethod-java.lang.Class-java.lang.Class-java.lang.String-java.util.List-">lookupVisitMethod</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;visitorClass,
<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;visiteeClass,
<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;visitMethodName,
<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/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&gt;&nbsp;additionalParameterTypes)</code>
<div class="block">Looks up a visit method taking additional parameters beyond the
overloaded visitee type.</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="ReflectUtil--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ReflectUtil</h4>
<pre>public&nbsp;ReflectUtil()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getByteBufferReadMethod-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteBufferReadMethod</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;getByteBufferReadMethod(<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>&nbsp;clazz)</pre>
<div class="block">Uses reflection to find the correct java.nio.ByteBuffer "absolute get"
method for a given primitive type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - the Class object representing the primitive type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>corresponding method</dd>
</dl>
</li>
</ul>
<a name="getByteBufferWriteMethod-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteBufferWriteMethod</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;getByteBufferWriteMethod(<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>&nbsp;clazz)</pre>
<div class="block">Uses reflection to find the correct java.nio.ByteBuffer "absolute put"
method for a given primitive type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - the Class object representing the primitive type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>corresponding method</dd>
</dl>
</li>
</ul>
<a name="getBoxingClass-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoxingClass</h4>
<pre>public static&nbsp;<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>&nbsp;getBoxingClass(<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>&nbsp;primitiveClass)</pre>
<div class="block">Gets the Java boxing class for a primitive class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>primitiveClass</code> - representative class for primitive (e.g.
java.lang.Integer.TYPE)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>corresponding boxing Class (e.g. java.lang.Integer)</dd>
</dl>
</li>
</ul>
<a name="getUnqualifiedClassName-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnqualifiedClassName</h4>
<pre>public static&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;getUnqualifiedClassName(<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>&nbsp;c)</pre>
<div class="block">Gets the name of a class with no package qualifiers; if it's an inner
class, it will still be qualified by the containing class (X$Y).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - the class of interest</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the unqualified name</dd>
</dl>
</li>
</ul>
<a name="getUnmangledMethodName-java.lang.Class-java.lang.String-java.lang.Class:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnmangledMethodName</h4>
<pre>public static&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;getUnmangledMethodName(<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>&nbsp;declaringClass,
<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;methodName,
<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>[]&nbsp;paramTypes)</pre>
<div class="block">Composes a string representing a human-readable method name (with neither
exception nor return type information).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>declaringClass</code> - class on which method is defined</dd>
<dd><code>methodName</code> - simple name of method without signature</dd>
<dd><code>paramTypes</code> - method parameter types</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>unmangled method name</dd>
</dl>
</li>
</ul>
<a name="getUnmangledMethodName-java.lang.reflect.Method-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnmangledMethodName</h4>
<pre>public static&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;getUnmangledMethodName(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method)</pre>
<div class="block">Composes a string representing a human-readable method name (with neither
exception nor return type information).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>method</code> - method whose name is to be generated</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>unmangled method name</dd>
</dl>
</li>
</ul>
<a name="invokeVisitor-org.apache.calcite.util.ReflectiveVisitor-java.lang.Object-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invokeVisitor</h4>
<pre>public static&nbsp;boolean&nbsp;invokeVisitor(<a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>&nbsp;visitor,
<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;visitee,
<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>&nbsp;hierarchyRoot,
<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;visitMethodName)</pre>
<div class="block">Implements the <a href="../../../../org/apache/calcite/util/Glossary.html#VISITOR_PATTERN"><code>Glossary.VISITOR_PATTERN</code></a> via
reflection. The basic technique is taken from <a
href="http://www.javaworld.com/javaworld/javatips/jw-javatip98.html">a
Javaworld article</a>. For an example of how to use it, see
<code>ReflectVisitorTest</code>.
<p>Visit method lookup follows the same rules as if
compile-time resolution for VisitorClass.visit(VisiteeClass) were
performed. An ambiguous match due to multiple interface inheritance
results in an IllegalArgumentException. A non-match is indicated by
returning false.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>visitor</code> - object whose visit method is to be invoked</dd>
<dd><code>visitee</code> - object to be passed as a parameter to the visit
method</dd>
<dd><code>hierarchyRoot</code> - if non-null, visitor method will only be invoked if
it takes a parameter whose type is a subtype of
hierarchyRoot</dd>
<dd><code>visitMethodName</code> - name of visit method, e.g. "visit"</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if a matching visit method was found and invoked</dd>
</dl>
</li>
</ul>
<a name="lookupVisitMethod-java.lang.Class-java.lang.Class-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupVisitMethod</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;lookupVisitMethod(<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;visitorClass,
<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;visiteeClass,
<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;visitMethodName)</pre>
<div class="block">Looks up a visit method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>visitorClass</code> - class of object whose visit method is to be invoked</dd>
<dd><code>visiteeClass</code> - class of object to be passed as a parameter to the
visit method</dd>
<dd><code>visitMethodName</code> - name of visit method</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>method found, or null if none found</dd>
</dl>
</li>
</ul>
<a name="lookupVisitMethod-java.lang.Class-java.lang.Class-java.lang.String-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupVisitMethod</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;lookupVisitMethod(<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;visitorClass,
<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;visiteeClass,
<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;visitMethodName,
<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/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&gt;&nbsp;additionalParameterTypes)</pre>
<div class="block">Looks up a visit method taking additional parameters beyond the
overloaded visitee type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>visitorClass</code> - class of object whose visit method is to be
invoked</dd>
<dd><code>visiteeClass</code> - class of object to be passed as a parameter
to the visit method</dd>
<dd><code>visitMethodName</code> - name of visit method</dd>
<dd><code>additionalParameterTypes</code> - list of additional parameter types</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>method found, or null if none found</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/calcite/util/ReflectUtil.html#createDispatcher-java.lang.Class-java.lang.Class-"><code>createDispatcher(Class, Class)</code></a></dd>
</dl>
</li>
</ul>
<a name="createDispatcher-java.lang.Class-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createDispatcher</h4>
<pre>public static&nbsp;&lt;R extends <a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>,E&gt;&nbsp;<a href="../../../../org/apache/calcite/util/ReflectiveVisitDispatcher.html" title="interface in org.apache.calcite.util">ReflectiveVisitDispatcher</a>&lt;R,E&gt;&nbsp;createDispatcher(<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;R&gt;&nbsp;visitorBaseClazz,
<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;E&gt;&nbsp;visiteeBaseClazz)</pre>
<div class="block">Creates a dispatcher for calls to <a href="../../../../org/apache/calcite/util/ReflectUtil.html#lookupVisitMethod-java.lang.Class-java.lang.Class-java.lang.String-"><code>lookupVisitMethod(java.lang.Class&lt;?&gt;, java.lang.Class&lt;?&gt;, java.lang.String)</code></a>. The
dispatcher caches methods between invocations.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>visitorBaseClazz</code> - Visitor base class</dd>
<dd><code>visiteeBaseClazz</code> - Visitee base class</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>cache of methods</dd>
</dl>
</li>
</ul>
<a name="createMethodDispatcher-java.lang.Class-org.apache.calcite.util.ReflectiveVisitor-java.lang.String-java.lang.Class-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMethodDispatcher</h4>
<pre>public static&nbsp;&lt;E,T&gt;&nbsp;<a href="../../../../org/apache/calcite/util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a>&lt;T&gt;&nbsp;createMethodDispatcher(<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;T&gt;&nbsp;returnClazz,
<a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>&nbsp;visitor,
<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;methodName,
<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;E&gt;&nbsp;arg0Clazz,
<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>...&nbsp;otherArgClasses)</pre>
<div class="block">Creates a dispatcher for calls to a single multi-method on a particular
object.
<p>Calls to that multi-method are resolved by looking for a method on
the runtime type of that object, with the required name, and with
the correct type or a subclass for the first argument, and precisely the
same types for other arguments.
<p>For instance, a dispatcher created for the method
<blockquote>String foo(Vehicle, int, List)</blockquote>
<p>could be used to call the methods
<blockquote>String foo(Car, int, List)<br>
String foo(Bus, int, List)</blockquote>
<p>(because Car and Bus are subclasses of Vehicle, and they occur in the
polymorphic first argument) but not the method
<blockquote>String foo(Car, int, ArrayList)</blockquote>
<p>(only the first argument is polymorphic).
<p>You must create an implementation of the method for the base class.
Otherwise throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>returnClazz</code> - Return type of method</dd>
<dd><code>visitor</code> - Object on which to invoke the method</dd>
<dd><code>methodName</code> - Name of method</dd>
<dd><code>arg0Clazz</code> - Base type of argument zero</dd>
<dd><code>otherArgClasses</code> - Types of remaining arguments</dd>
</dl>
</li>
</ul>
<a name="getParameterName-java.lang.reflect.Method-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParameterName</h4>
<pre>public static&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;getParameterName(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
int&nbsp;i)</pre>
<div class="block">Derives the name of the <code>i</code>th parameter of a method.</div>
</li>
</ul>
<a name="isParameterOptional-java.lang.reflect.Method-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isParameterOptional</h4>
<pre>public static&nbsp;boolean&nbsp;isParameterOptional(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</a>&nbsp;method,
int&nbsp;i)</pre>
<div class="block">Derives whether the <code>i</code>th parameter of a method is optional.</div>
</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 class="aboutLanguage"><b>Apache Calcite</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/calcite/util/ReflectiveVisitor.html" title="interface in org.apache.calcite.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/calcite/util/ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/calcite/util/ReflectUtil.html" target="_top">Frames</a></li>
<li><a href="ReflectUtil.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><a href="#nested.class.summary">Nested</a>&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 ======= -->
<p class="legalCopy"><small>Copyright &copy; 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>