blob: d21fb6dcfccdf105fe920620510961e7bd6ff9c1 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Types (Apache Calcite 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="Types (Apache Calcite 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,"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";
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="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" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;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:&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 id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.calcite.linq4j.tree</a></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/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">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>
<pre>public abstract class <span class="typeNameLabel">Types</span>
extends <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre>
<div class="block">Utilities for converting between <a href="Expression.html" title="class in org.apache.calcite.linq4j.tree"><code>Expression</code></a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink"><code>Type</code></a> and
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="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 ======== -->
<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">&nbsp;</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 class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Types.ArrayType.html" title="class in org.apache.calcite.linq4j.tree">Types.ArrayType</a></span></code></th>
<td class="colLast">
<div class="block">Array type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Types.MapType.html" title="class in org.apache.calcite.linq4j.tree">Types.MapType</a></span></code></th>
<td class="colLast">
<div class="block">Map type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Types.RecordField.html" title="interface in org.apache.calcite.linq4j.tree">Types.RecordField</a></span></code></th>
<td class="colLast">
<div class="block">Field that belongs to a record.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Types.RecordType.html" title="interface in org.apache.calcite.linq4j.tree">Types.RecordType</a></span></code></th>
<td class="colLast">
<div class="block">Base class for record-like types that do not mapped to (currently
loaded) Java <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a> objects.</div>
</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">&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="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#allAssignable(boolean,java.lang.Class%5B%5D,java.lang.Class%5B%5D)">allAssignable</a></span>&#8203;(boolean&nbsp;varArgs,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>[]&nbsp;parameterTypes,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>[]&nbsp;argumentTypes)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#box(java.lang.reflect.Type)">box</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castIfNecessary(java.lang.reflect.Type,org.apache.calcite.linq4j.tree.Expression)">castIfNecessary</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;returnType,
<a href="Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&nbsp;expression)</code></th>
<td class="colLast">
<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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#discard(java.lang.Object)">discard</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;o)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#field(java.lang.reflect.Field)">field</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a>&nbsp;field)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getComponentType(java.lang.reflect.Type)">getComponentType</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">
<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/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getElementType(java.lang.reflect.Type)">getElementType</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns the element type of a <a href="https://docs.oracle.com/javase/9/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Collection</code></a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Iterable</code></a>
(including <a href="../Queryable.html" title="interface in org.apache.calcite.linq4j"><code>Queryable</code></a> and
<a href="../Enumerable.html" title="interface in org.apache.calcite.linq4j"><code>Enumerable</code></a>), <a href="https://docs.oracle.com/javase/9/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Iterator</code></a>,
<a href="../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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isArray(java.lang.reflect.Type)">isArray</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAssignableFrom(java.lang.reflect.Type,java.lang.reflect.Type)">isAssignableFrom</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type0,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Constructor.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Constructor</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupConstructor(java.lang.reflect.Type,java.lang.Class...)">lookupConstructor</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>...&nbsp;argumentTypes)</code></th>
<td class="colLast">
<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/9/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupField(java.lang.reflect.Type,java.lang.String)">lookupField</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Method</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lookupMethod(java.lang.Class,java.lang.String,java.lang.Class...)">lookupMethod</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&nbsp;clazz,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;methodName,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>...&nbsp;argumentTypes)</code></th>
<td class="colLast">
<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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#needTypeCast(java.lang.reflect.Type,java.lang.reflect.Type)">needTypeCast</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;fromType,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;toType)</code></th>
<td class="colLast">
<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/9/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nthField(int,java.lang.Class)">nthField</a></span>&#8203;(int&nbsp;ordinal,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&nbsp;clazz)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nthField(int,java.lang.reflect.Type)">nthField</a></span>&#8203;(int&nbsp;ordinal,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;clazz)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#of(java.lang.reflect.Type,java.lang.reflect.Type...)">of</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>...&nbsp;typeArguments)</code></th>
<td class="colLast">
<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/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stripGenerics(java.lang.reflect.Type)">stripGenerics</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toClass(java.lang.reflect.Type)">toClass</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toClassArray(java.lang.Iterable)">toClassArray</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;? extends <a href="Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&gt;&nbsp;arguments)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unbox(java.lang.reflect.Type)">unbox</a></span>&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="of(java.lang.reflect.Type,java.lang.reflect.Type...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>of</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;of&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>...&nbsp;typeArguments)</pre>
<div class="block">Creates a type with generic parameters.</div>
</li>
</ul>
<a id="getElementType(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElementType</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;getElementType&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
<div class="block">Returns the element type of a <a href="https://docs.oracle.com/javase/9/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Collection</code></a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Iterable</code></a>
(including <a href="../Queryable.html" title="interface in org.apache.calcite.linq4j"><code>Queryable</code></a> and
<a href="../Enumerable.html" title="interface in org.apache.calcite.linq4j"><code>Enumerable</code></a>), <a href="https://docs.oracle.com/javase/9/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Iterator</code></a>,
<a href="../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 id="toClass(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toClass</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&nbsp;toClass&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a id="toClassArray(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toClassArray</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>[]&nbsp;toClassArray&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;? extends <a href="Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&gt;&nbsp;arguments)</pre>
</li>
</ul>
<a id="getComponentType(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getComponentType</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;getComponentType&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
<div class="block">Returns the component type of an array.</div>
</li>
</ul>
<a id="box(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>box</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;box&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a id="unbox(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unbox</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;unbox&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a id="isAssignableFrom(java.lang.reflect.Type,java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAssignableFrom</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isAssignableFrom&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type0,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a id="isArray(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isArray</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isArray&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
</li>
</ul>
<a id="nthField(int,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nthField</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a>&nbsp;nthField&#8203;(int&nbsp;ordinal,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&nbsp;clazz)</pre>
</li>
</ul>
<a id="nthField(int,java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nthField</h4>
<pre class="methodSignature">public static&nbsp;<a href="PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a>&nbsp;nthField&#8203;(int&nbsp;ordinal,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;clazz)</pre>
</li>
</ul>
<a id="allAssignable(boolean,java.lang.Class[],java.lang.Class[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allAssignable</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;allAssignable&#8203;(boolean&nbsp;varArgs,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>[]&nbsp;parameterTypes,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>[]&nbsp;argumentTypes)</pre>
</li>
</ul>
<a id="lookupMethod(java.lang.Class,java.lang.String,java.lang.Class...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupMethod</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Method</a>&nbsp;lookupMethod&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a>&nbsp;clazz,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;methodName,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">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/9/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang" class="externalLink">RuntimeException</a></code> - if method not found</dd>
</dl>
</li>
</ul>
<a id="lookupConstructor(java.lang.reflect.Type,java.lang.Class...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupConstructor</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Constructor.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Constructor</a>&nbsp;lookupConstructor&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">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/9/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang" class="externalLink">RuntimeException</a></code> - if method not found</dd>
</dl>
</li>
</ul>
<a id="lookupField(java.lang.reflect.Type,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lookupField</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a>&nbsp;lookupField&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;name)</pre>
</li>
</ul>
<a id="discard(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>discard</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;discard&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;o)</pre>
</li>
</ul>
<a id="castIfNecessary(java.lang.reflect.Type,org.apache.calcite.linq4j.tree.Expression)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>castIfNecessary</h4>
<pre class="methodSignature">public static&nbsp;<a href="Expression.html" title="class in org.apache.calcite.linq4j.tree">Expression</a>&nbsp;castIfNecessary&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;returnType,
<a href="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 id="needTypeCast(java.lang.reflect.Type,java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>needTypeCast</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;needTypeCast&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;fromType,
<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">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 id="field(java.lang.reflect.Field)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>field</h4>
<pre class="methodSignature">public static&nbsp;<a href="PseudoField.html" title="interface in org.apache.calcite.linq4j.tree">PseudoField</a>&nbsp;field&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a>&nbsp;field)</pre>
</li>
</ul>
<a id="stripGenerics(java.lang.reflect.Type)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stripGenerics</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;stripGenerics&#8203;(<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Type</a>&nbsp;type)</pre>
</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="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" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &copy; 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p>
</footer>
</body>
</html>