blob: e23fa148722b25ee8660868837186de54b238cf9 [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>Types (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="Types (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,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":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/linq4j/tree/TypeBinaryExpression.html" title="class in org.apache.calcite.linq4j.tree"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/calcite/linq4j/tree/Types.ArrayType.html" title="class in org.apache.calcite.linq4j.tree"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/calcite/linq4j/tree/Types.html" target="_top">Frames</a></li>
<li><a href="Types.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>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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.calcite.linq4j.tree</div>
<h2 title="Class Types" class="title">Class Types</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.linq4j.tree.Types</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">Types</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">Utilities for converting between <a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree"><code>Expression</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect"><code>Type</code></a> and
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/calcite/linq4j/tree/Primitive.html" title="enum in org.apache.calcite.linq4j.tree"><code>Primitive</code></a></dd>
</dl>
</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 class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.ArrayType.html" title="class in org.apache.calcite.linq4j.tree">Types.ArrayType</a></span></code>
<div class="block">Array type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.MapType.html" title="class in org.apache.calcite.linq4j.tree">Types.MapType</a></span></code>
<div class="block">Map type.</div>
</td>
</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/linq4j/tree/Types.RecordField.html" title="interface in org.apache.calcite.linq4j.tree">Types.RecordField</a></span></code>
<div class="block">Field that belongs to a record.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.RecordType.html" title="interface in org.apache.calcite.linq4j.tree">Types.RecordType</a></span></code>
<div class="block">Base class for record-like types that do not mapped to (currently
loaded) Java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a> objects.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="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 boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#allAssignable-boolean-java.lang.Class:A-java.lang.Class:A-">allAssignable</a></span>(boolean&nbsp;varArgs,
<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;parameterTypes,
<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;argumentTypes)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#box-java.lang.reflect.Type-">box</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#castIfNecessary-java.lang.reflect.Type-org.apache.calcite.linq4j.tree.Expression-">castIfNecessary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;returnType,
<a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&nbsp;expression)</code>
<div class="block">Wraps an expression in a cast if it is not already of the desired type,
or cannot be implicitly converted to it.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#discard-java.lang.Object-">discard</a></span>(<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;o)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/linq4j/tree/PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#field-java.lang.reflect.Field-">field</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;field)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#getComponentType-java.lang.reflect.Type-">getComponentType</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>
<div class="block">Returns the component type of an array.</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/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#getElementType-java.lang.reflect.Type-">getElementType</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>
<div class="block">Returns the element type of a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a>
(including <a href="../../../../../org/apache/calcite/linq4j/Queryable.html" title="interface in org.apache.calcite.linq4j"><code>Queryable</code></a> and
<a href="../../../../../org/apache/calcite/linq4j/Enumerable.html" title="interface in org.apache.calcite.linq4j"><code>Enumerable</code></a>), <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a>,
<a href="../../../../../org/apache/calcite/linq4j/Enumerator.html" title="interface in org.apache.calcite.linq4j"><code>Enumerator</code></a>, or an array.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#isArray-java.lang.reflect.Type-">isArray</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#isAssignableFrom-java.lang.reflect.Type-java.lang.reflect.Type-">isAssignableFrom</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type0,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Constructor.html?is-external=true" title="class or interface in java.lang.reflect">Constructor</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#lookupConstructor-java.lang.reflect.Type-java.lang.Class...-">lookupConstructor</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type,
<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;argumentTypes)</code>
<div class="block">Finds a constructor of a given class that accepts a given set of
arguments.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#lookupField-java.lang.reflect.Type-java.lang.String-">lookupField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type,
<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;name)</code>&nbsp;</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/linq4j/tree/Types.html#lookupMethod-java.lang.Class-java.lang.String-java.lang.Class...-">lookupMethod</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,
<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;argumentTypes)</code>
<div class="block">Finds a method of a given name that accepts a given set of arguments.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#needTypeCast-java.lang.reflect.Type-java.lang.reflect.Type-">needTypeCast</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;fromType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;toType)</code>
<div class="block">When trying to cast/convert a <code>Type</code> to another <code>Type</code>,
it is necessary to pre-check whether the cast operation is needed.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#nthField-int-java.lang.Class-">nthField</a></span>(int&nbsp;ordinal,
<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>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/linq4j/tree/PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#nthField-int-java.lang.reflect.Type-">nthField</a></span>(int&nbsp;ordinal,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;clazz)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#of-java.lang.reflect.Type-java.lang.reflect.Type...-">of</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>...&nbsp;typeArguments)</code>
<div class="block">Creates a type with generic parameters.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#stripGenerics-java.lang.reflect.Type-">stripGenerics</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<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/linq4j/tree/Types.html#toClass-java.lang.reflect.Type-">toClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>&nbsp;</td>
</tr>
<tr id="i18" 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/linq4j/tree/Types.html#toClassArray-java.lang.Iterable-">toClassArray</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&gt;&nbsp;arguments)</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/linq4j/tree/Types.html#unbox-java.lang.reflect.Type-">unbox</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</code>&nbsp;</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">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="of-java.lang.reflect.Type-java.lang.reflect.Type...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;of(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>...&nbsp;typeArguments)</pre>
<div class="block">Creates a type with generic parameters.</div>
</li>
</ul>
<a name="getElementType-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElementType</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;getElementType(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
<div class="block">Returns the element type of a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><code>Iterable</code></a>
(including <a href="../../../../../org/apache/calcite/linq4j/Queryable.html" title="interface in org.apache.calcite.linq4j"><code>Queryable</code></a> and
<a href="../../../../../org/apache/calcite/linq4j/Enumerable.html" title="interface in org.apache.calcite.linq4j"><code>Enumerable</code></a>), <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util"><code>Iterator</code></a>,
<a href="../../../../../org/apache/calcite/linq4j/Enumerator.html" title="interface in org.apache.calcite.linq4j"><code>Enumerator</code></a>, or an array.
<p>Returns null if the type is not one of these.</p></div>
</li>
</ul>
<a name="toClass-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toClass</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;toClass(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a name="toClassArray-java.lang.Iterable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toClassArray</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;toClassArray(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;? extends <a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&gt;&nbsp;arguments)</pre>
</li>
</ul>
<a name="getComponentType-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getComponentType</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;getComponentType(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
<div class="block">Returns the component type of an array.</div>
</li>
</ul>
<a name="box-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>box</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;box(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a name="unbox-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbox</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;unbox(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a name="isAssignableFrom-java.lang.reflect.Type-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAssignableFrom</h4>
<pre>public static&nbsp;boolean&nbsp;isAssignableFrom(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type0,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a name="isArray-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isArray</h4>
<pre>public static&nbsp;boolean&nbsp;isArray(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a name="nthField-int-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nthField</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;nthField(int&nbsp;ordinal,
<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>
</li>
</ul>
<a name="nthField-int-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nthField</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/calcite/linq4j/tree/PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a>&nbsp;nthField(int&nbsp;ordinal,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;clazz)</pre>
</li>
</ul>
<a name="allAssignable-boolean-java.lang.Class:A-java.lang.Class:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allAssignable</h4>
<pre>public static&nbsp;boolean&nbsp;allAssignable(boolean&nbsp;varArgs,
<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;parameterTypes,
<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;argumentTypes)</pre>
</li>
</ul>
<a name="lookupMethod-java.lang.Class-java.lang.String-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupMethod</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;lookupMethod(<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,
<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;argumentTypes)</pre>
<div class="block">Finds a method of a given name that accepts a given set of arguments.
Includes in its search inherited methods and methods with wider argument
types.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>clazz</code> - Class against which method is invoked</dd>
<dd><code>methodName</code> - Name of method</dd>
<dd><code>argumentTypes</code> - Types of arguments</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A method with the given name that matches the arguments given</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - if method not found</dd>
</dl>
</li>
</ul>
<a name="lookupConstructor-java.lang.reflect.Type-java.lang.Class...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupConstructor</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Constructor.html?is-external=true" title="class or interface in java.lang.reflect">Constructor</a>&nbsp;lookupConstructor(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type,
<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;argumentTypes)</pre>
<div class="block">Finds a constructor of a given class that accepts a given set of
arguments. Includes in its search methods with wider argument types.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - Class against which method is invoked</dd>
<dd><code>argumentTypes</code> - Types of arguments</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A method with the given name that matches the arguments given</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang">RuntimeException</a></code> - if method not found</dd>
</dl>
</li>
</ul>
<a name="lookupField-java.lang.reflect.Type-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupField</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;lookupField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type,
<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;name)</pre>
</li>
</ul>
<a name="discard-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>discard</h4>
<pre>public static&nbsp;void&nbsp;discard(<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;o)</pre>
</li>
</ul>
<a name="castIfNecessary-java.lang.reflect.Type-org.apache.calcite.linq4j.tree.Expression-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>castIfNecessary</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&nbsp;castIfNecessary(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;returnType,
<a href="../../../../../org/apache/calcite/linq4j/tree/Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&nbsp;expression)</pre>
<div class="block">Wraps an expression in a cast if it is not already of the desired type,
or cannot be implicitly converted to it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>returnType</code> - Desired type</dd>
<dd><code>expression</code> - Expression</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Expression of desired type</dd>
</dl>
</li>
</ul>
<a name="needTypeCast-java.lang.reflect.Type-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>needTypeCast</h4>
<pre>public static&nbsp;boolean&nbsp;needTypeCast(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;fromType,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;toType)</pre>
<div class="block">When trying to cast/convert a <code>Type</code> to another <code>Type</code>,
it is necessary to pre-check whether the cast operation is needed.
We summarize general exceptions, including:
<ol>
<li>target Type <code>toType</code> equals with original Type <code>fromType</code></li>
<li>target Type can be assignable from original Type</li>
<li>target Type is an instance of <code>RecordType</code>,
since the mapping Java Class might not generated yet</li>
</ol></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fromType</code> - original type</dd>
<dd><code>toType</code> - target type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether a cast operation is needed</dd>
</dl>
</li>
</ul>
<a name="field-java.lang.reflect.Field-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>field</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/calcite/linq4j/tree/PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a>&nbsp;field(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a>&nbsp;field)</pre>
</li>
</ul>
<a name="stripGenerics-java.lang.reflect.Type-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stripGenerics</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;stripGenerics(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>&nbsp;type)</pre>
</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/linq4j/tree/TypeBinaryExpression.html" title="class in org.apache.calcite.linq4j.tree"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/calcite/linq4j/tree/Types.ArrayType.html" title="class in org.apache.calcite.linq4j.tree"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/calcite/linq4j/tree/Types.html" target="_top">Frames</a></li>
<li><a href="Types.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>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>
<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>