| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>ReflectUtil (Apache Calcite API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <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="ReflectUtil (Apache Calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"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,"i13":9,"i14":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"; |
| 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="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ReflectUtil.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-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <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> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </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="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.util</a></div> |
| <h2 title="Class ReflectUtil" class="title">Class ReflectUtil</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</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> |
| <pre>public abstract class <span class="typeNameLabel">ReflectUtil</span> |
| extends java.lang.Object</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 ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a><<a href="ReflectUtil.MethodDispatcher.html" title="type parameter in ReflectUtil.MethodDispatcher">T</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">Can invoke a method on an object of type E with return type T.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.util.Map<java.lang.Class,​java.lang.Class></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#primitiveToBoxingMap">primitiveToBoxingMap</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static java.util.Map<java.lang.Class,​java.lang.reflect.Method></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#primitiveToByteBufferReadMethod">primitiveToByteBufferReadMethod</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.util.Map<java.lang.Class,​java.lang.reflect.Method></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#primitiveToByteBufferWriteMethod">primitiveToByteBufferWriteMethod</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">ReflectUtil</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <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> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <R extends <a href="ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>,​E><br><a href="ReflectiveVisitDispatcher.html" title="interface in org.apache.calcite.util">ReflectiveVisitDispatcher</a><R,​E></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createDispatcher(java.lang.Class,java.lang.Class)">createDispatcher</a></span>​(java.lang.Class<R> visitorBaseClazz, |
| java.lang.Class<E> visiteeBaseClazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a dispatcher for calls to <a href="#lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String)"><code>lookupVisitMethod(java.lang.Class<?>, java.lang.Class<?>, java.lang.String)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <E,​T><br><a href="ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createMethodDispatcher(java.lang.Class,org.apache.calcite.util.ReflectiveVisitor,java.lang.String,java.lang.Class,java.lang.Class...)">createMethodDispatcher</a></span>​(java.lang.Class<T> returnClazz, |
| <a href="ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a> visitor, |
| java.lang.String methodName, |
| java.lang.Class<E> arg0Clazz, |
| java.lang.Class... otherArgClasses)</code></th> |
| <td class="colLast"> |
| <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 java.lang.Class</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBoxingClass(java.lang.Class)">getBoxingClass</a></span>​(java.lang.Class primitiveClass)</code></th> |
| <td class="colLast"> |
| <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 java.lang.reflect.Method</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getByteBufferReadMethod(java.lang.Class)">getByteBufferReadMethod</a></span>​(java.lang.Class clazz)</code></th> |
| <td class="colLast"> |
| <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 java.lang.reflect.Method</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getByteBufferWriteMethod(java.lang.Class)">getByteBufferWriteMethod</a></span>​(java.lang.Class clazz)</code></th> |
| <td class="colLast"> |
| <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 java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getParameterName(java.lang.reflect.Method,int)">getParameterName</a></span>​(java.lang.reflect.Method method, |
| int i)</code></th> |
| <td class="colLast"> |
| <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 java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnmangledMethodName(java.lang.Class,java.lang.String,java.lang.Class%5B%5D)">getUnmangledMethodName</a></span>​(java.lang.Class declaringClass, |
| java.lang.String methodName, |
| java.lang.Class[] paramTypes)</code></th> |
| <td class="colLast"> |
| <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 java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnmangledMethodName(java.lang.reflect.Method)">getUnmangledMethodName</a></span>​(java.lang.reflect.Method method)</code></th> |
| <td class="colLast"> |
| <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 java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnqualifiedClassName(java.lang.Class)">getUnqualifiedClassName</a></span>​(java.lang.Class c)</code></th> |
| <td class="colLast"> |
| <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> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#invokeVisitor(org.apache.calcite.util.ReflectiveVisitor,java.lang.Object,java.lang.Class,java.lang.String)">invokeVisitor</a></span>​(<a href="ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a> visitor, |
| java.lang.Object visitee, |
| java.lang.Class hierarchyRoot, |
| java.lang.String visitMethodName)</code></th> |
| <td class="colLast"> |
| <div class="block">Implements the <a href="Glossary.html#VISITOR_PATTERN"><code>Glossary.VISITOR_PATTERN</code></a> via |
| reflection.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#invokeVisitorInternal(java.lang.Object,java.lang.Object,java.lang.Class,java.lang.String)">invokeVisitorInternal</a></span>​(java.lang.Object visitor, |
| java.lang.Object visitee, |
| java.lang.Class hierarchyRoot, |
| java.lang.String visitMethodName)</code></th> |
| <td class="colLast"> |
| <div class="block">Shared implementation of the two forms of invokeVisitor.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isParameterOptional(java.lang.reflect.Method,int)">isParameterOptional</a></span>​(java.lang.reflect.Method method, |
| int i)</code></th> |
| <td class="colLast"> |
| <div class="block">Derives whether the <code>i</code>th parameter of a method is optional.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static java.lang.reflect.Method</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String)">lookupVisitMethod</a></span>​(java.lang.Class<?> visitorClass, |
| java.lang.Class<?> visiteeClass, |
| java.lang.String visitMethodName)</code></th> |
| <td class="colLast"> |
| <div class="block">Looks up a visit method.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>private static java.lang.reflect.Method</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String,java.lang.Class%5B%5D,java.util.Map)">lookupVisitMethod</a></span>​(java.lang.Class<?> visitorClass, |
| java.lang.Class<?> visiteeClass, |
| java.lang.String visitMethodName, |
| java.lang.Class<?>[] paramTypes, |
| java.util.Map<java.lang.Class<?>,​java.lang.reflect.Method> cache)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static java.lang.reflect.Method</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String,java.util.List)">lookupVisitMethod</a></span>​(java.lang.Class<?> visitorClass, |
| java.lang.Class<?> visiteeClass, |
| java.lang.String visitMethodName, |
| java.util.List<java.lang.Class> additionalParameterTypes)</code></th> |
| <td class="colLast"> |
| <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 id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="primitiveToBoxingMap"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>primitiveToBoxingMap</h4> |
| <pre>private static java.util.Map<java.lang.Class,​java.lang.Class> primitiveToBoxingMap</pre> |
| </li> |
| </ul> |
| <a id="primitiveToByteBufferReadMethod"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>primitiveToByteBufferReadMethod</h4> |
| <pre>private static java.util.Map<java.lang.Class,​java.lang.reflect.Method> primitiveToByteBufferReadMethod</pre> |
| </li> |
| </ul> |
| <a id="primitiveToByteBufferWriteMethod"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>primitiveToByteBufferWriteMethod</h4> |
| <pre>private static java.util.Map<java.lang.Class,​java.lang.reflect.Method> primitiveToByteBufferWriteMethod</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ReflectUtil</h4> |
| <pre>public ReflectUtil()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getByteBufferReadMethod(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getByteBufferReadMethod</h4> |
| <pre class="methodSignature">public static java.lang.reflect.Method getByteBufferReadMethod​(java.lang.Class 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 id="getByteBufferWriteMethod(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getByteBufferWriteMethod</h4> |
| <pre class="methodSignature">public static java.lang.reflect.Method getByteBufferWriteMethod​(java.lang.Class 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 id="getBoxingClass(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBoxingClass</h4> |
| <pre class="methodSignature">public static java.lang.Class getBoxingClass​(java.lang.Class 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 id="getUnqualifiedClassName(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUnqualifiedClassName</h4> |
| <pre class="methodSignature">public static java.lang.String getUnqualifiedClassName​(java.lang.Class 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 id="getUnmangledMethodName(java.lang.Class,java.lang.String,java.lang.Class[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUnmangledMethodName</h4> |
| <pre class="methodSignature">public static java.lang.String getUnmangledMethodName​(java.lang.Class declaringClass, |
| java.lang.String methodName, |
| java.lang.Class[] 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 id="getUnmangledMethodName(java.lang.reflect.Method)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUnmangledMethodName</h4> |
| <pre class="methodSignature">public static java.lang.String getUnmangledMethodName​(java.lang.reflect.Method 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 id="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 class="methodSignature">public static boolean invokeVisitor​(<a href="ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a> visitor, |
| java.lang.Object visitee, |
| java.lang.Class hierarchyRoot, |
| java.lang.String visitMethodName)</pre> |
| <div class="block">Implements the <a href="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 id="invokeVisitorInternal(java.lang.Object,java.lang.Object,java.lang.Class,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>invokeVisitorInternal</h4> |
| <pre class="methodSignature">private static boolean invokeVisitorInternal​(java.lang.Object visitor, |
| java.lang.Object visitee, |
| java.lang.Class hierarchyRoot, |
| java.lang.String visitMethodName)</pre> |
| <div class="block">Shared implementation of the two forms of invokeVisitor.</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 id="lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lookupVisitMethod</h4> |
| <pre class="methodSignature">public static java.lang.reflect.Method lookupVisitMethod​(java.lang.Class<?> visitorClass, |
| java.lang.Class<?> visiteeClass, |
| java.lang.String 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 id="lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String,java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lookupVisitMethod</h4> |
| <pre class="methodSignature">public static java.lang.reflect.Method lookupVisitMethod​(java.lang.Class<?> visitorClass, |
| java.lang.Class<?> visiteeClass, |
| java.lang.String visitMethodName, |
| java.util.List<java.lang.Class> 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="#createDispatcher(java.lang.Class,java.lang.Class)"><code>createDispatcher(Class, Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String,java.lang.Class[],java.util.Map)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lookupVisitMethod</h4> |
| <pre class="methodSignature">private static java.lang.reflect.Method lookupVisitMethod​(java.lang.Class<?> visitorClass, |
| java.lang.Class<?> visiteeClass, |
| java.lang.String visitMethodName, |
| java.lang.Class<?>[] paramTypes, |
| java.util.Map<java.lang.Class<?>,​java.lang.reflect.Method> cache)</pre> |
| </li> |
| </ul> |
| <a id="createDispatcher(java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createDispatcher</h4> |
| <pre class="methodSignature">public static <R extends <a href="ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a>,​E> <a href="ReflectiveVisitDispatcher.html" title="interface in org.apache.calcite.util">ReflectiveVisitDispatcher</a><R,​E> createDispatcher​(java.lang.Class<R> visitorBaseClazz, |
| java.lang.Class<E> visiteeBaseClazz)</pre> |
| <div class="block">Creates a dispatcher for calls to <a href="#lookupVisitMethod(java.lang.Class,java.lang.Class,java.lang.String)"><code>lookupVisitMethod(java.lang.Class<?>, java.lang.Class<?>, 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 id="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 class="methodSignature">public static <E,​T> <a href="ReflectUtil.MethodDispatcher.html" title="interface in org.apache.calcite.util">ReflectUtil.MethodDispatcher</a><T> createMethodDispatcher​(java.lang.Class<T> returnClazz, |
| <a href="ReflectiveVisitor.html" title="interface in org.apache.calcite.util">ReflectiveVisitor</a> visitor, |
| java.lang.String methodName, |
| java.lang.Class<E> arg0Clazz, |
| java.lang.Class... 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 <code>IllegalArgumentException</code>.</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 id="getParameterName(java.lang.reflect.Method,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getParameterName</h4> |
| <pre class="methodSignature">public static java.lang.String getParameterName​(java.lang.reflect.Method method, |
| int i)</pre> |
| <div class="block">Derives the name of the <code>i</code>th parameter of a method.</div> |
| </li> |
| </ul> |
| <a id="isParameterOptional(java.lang.reflect.Method,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>isParameterOptional</h4> |
| <pre class="methodSignature">public static boolean isParameterOptional​(java.lang.reflect.Method method, |
| int i)</pre> |
| <div class="block">Derives whether the <code>i</code>th parameter of a method is optional.</div> |
| </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="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ReflectUtil.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-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |