blob: 0c624bae31b19504b9c92077fd12074d1ddac320 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>Classes (Apache SIS 1.4 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2023-10-05">
<meta name="description" content="declaration: module: org.apache.sis.util, package: org.apache.sis.util, class: Classes">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.util.Classes class">
<meta name="keywords" content="changeArrayDimension()">
<meta name="keywords" content="boundOfParameterizedProperty()">
<meta name="keywords" content="boundOfParameterizedDeclaration()">
<meta name="keywords" content="getClass()">
<meta name="keywords" content="getStandardType()">
<meta name="keywords" content="getAllInterfaces()">
<meta name="keywords" content="getLeafInterfaces()">
<meta name="keywords" content="findSpecializedClass()">
<meta name="keywords" content="findCommonClass()">
<meta name="keywords" content="findCommonInterfaces()">
<meta name="keywords" content="implementSameInterfaces()">
<meta name="keywords" content="getShortName()">
<meta name="keywords" content="getShortClassName()">
<meta name="keywords" content="isAssignableToAny()">
<meta name="keywords" content="isPossibleGetter()">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="../../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">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#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="module-label-in-type">Module</span>&nbsp;<a href="../../../../module-summary.html">org.apache.sis.util</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.util</a></div>
<h1 title="Class Classes" class="title">Class Classes</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="Static.html" title="class in org.apache.sis.util">Static</a>
<div class="inheritance">Classes</div>
</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">Classes</span>
<span class="extends-implements">extends <a href="Static.html" title="class in org.apache.sis.util">Static</a></span></div>
<div class="block">Static methods working on <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> objects.
This class defines helper methods for working with reflection.
Some functionalities are:
<ul>
<li>Add or remove dimension to an array type
(<a href="#changeArrayDimension(java.lang.Class,int)"><code>change­Array­Dimension</code></a>)</li>
<li>Find the common parent of two or more classes
(<a href="#findCommonClass(java.lang.Class,java.lang.Class)"><code>find­Common­Class</code></a>,
<a href="#findCommonInterfaces(java.lang.Class,java.lang.Class)"><code>find­Common­Interfaces</code></a>)</li>
<li>Getting the bounds of a parameterized field or method
(<a href="#boundOfParameterizedProperty(java.lang.reflect.Method)"><code>bound­Of­Parameterized­Property</code></a>)</li>
<li>Getting a short class name (<a href="#getShortName(java.lang.Class)"><code>get­Short­Name</code></a>,
<a href="#getShortClassName(java.lang.Object)"><code>get­Short­Class­Name</code></a>)</li>
</ul></div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#boundOfParameterizedDeclaration(java.lang.reflect.GenericDeclaration)" class="member-name-link">bound­Of­Parameterized­Declaration</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/GenericDeclaration.html" title="class or interface in java.lang.reflect" class="external-link">Generic­Declaration</a>&nbsp;type­Or­Method)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a single bound declared in a parameterized class or a parameterized method.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#boundOfParameterizedProperty(java.lang.reflect.Field)" class="member-name-link">bound­Of­Parameterized­Property</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Field.html" title="class or interface in java.lang.reflect" class="external-link">Field</a>&nbsp;field)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the upper bounds of the parameterized type of the given property.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#boundOfParameterizedProperty(java.lang.reflect.Method)" class="member-name-link">bound­Of­Parameterized­Property</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Method.html" title="class or interface in java.lang.reflect" class="external-link">Method</a>&nbsp;method)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">If the given method is a getter or a setter for a parameterized property,
returns the upper bounds of the parameterized type.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#changeArrayDimension(java.lang.Class,int)" class="member-name-link">change­Array­Dimension</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;element,
int&nbsp;change)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Changes the array dimension by the given amount.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#findCommonClass(java.lang.Class,java.lang.Class)" class="member-name-link">find­Common­Class</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c1,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c2)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the most specific class which <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="external-link">is assignable from</a>
the given classes or a parent of those classes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#findCommonClass(java.lang.Iterable)" class="member-name-link">find­Common­Class</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;?&gt;&nbsp;objects)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the most specific class which <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="external-link">is assignable from</a>
the type of all given objects.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#findCommonInterfaces(java.lang.Class,java.lang.Class)" class="member-name-link">find­Common­Interfaces</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c1,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c2)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the interfaces which are implemented by the two given classes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#findSpecializedClass(java.lang.Iterable)" class="member-name-link">find­Specialized­Class</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;?&gt;&nbsp;objects)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the most specific class implemented by the objects in the given collection.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? super T&gt;[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getAllInterfaces(java.lang.Class)" class="member-name-link">get­All­Interfaces</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;type)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns every interfaces implemented, directly or indirectly, by the given class or interface.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;? extends T&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getClass(T)" class="member-name-link">get­Class</a><wbr>(T&nbsp;object)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the class of the specified object, or <code>null</code> if <code>object</code> is null.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? extends T&gt;[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLeafInterfaces(java.lang.Class,java.lang.Class)" class="member-name-link">get­Leaf­Interfaces</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;base­Interface)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the interfaces implemented by the given class and assignable to the given base
interface, or an empty array if none.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getShortClassName(java.lang.Object)" class="member-name-link">get­Short­Class­Name</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the class name of the given object without package name, but including the enclosing class names
if any.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getShortName(java.lang.Class)" class="member-name-link">get­Short­Name</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;classe)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the name of the given class without package name, but including the names of enclosing
classes if any.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;? super T&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getStandardType(java.lang.Class)" class="member-name-link">get­Standard­Type</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;type)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the first type or super-type (including interface) considered "standard" in Apache SIS sense.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#implementSameInterfaces(java.lang.Class,java.lang.Class,java.lang.Class)" class="member-name-link">implement­Same­Interfaces</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;object1,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;object2,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;base­Interface)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns <code>true</code> if the two specified objects implements exactly the same set of interfaces.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isAssignableToAny(java.lang.Class,java.lang.Class...)" class="member-name-link">is­Assignable­To­Any</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;...&nbsp;allowed­Types)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns <code>true</code> if the given type is assignable to one of the given allowed types.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isPossibleGetter(java.lang.reflect.Method)" class="member-name-link">is­Possible­Getter</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Method.html" title="class or interface in java.lang.reflect" class="external-link">Method</a>&nbsp;method)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns <code>true</code> if the given method may possibly be the getter method for a property.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">to­String</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="changeArrayDimension(java.lang.Class,int)">
<h3>changeArrayDimension</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">changeArrayDimension</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;element,
int&nbsp;change)</span></div>
<div class="block">Changes the array dimension by the given amount. The given class can be a primitive type,
a Java object, or an array of the above. If the given <code>change</code> is positive, then the
array dimension will be increased by that amount. For example, a change of +1 dimension will
change an <code>int</code> class into <code>int[]</code>, and a <code>String[]</code> class into <code>String[][]</code>.
A change of +2 dimensions is like applying two times a change of +1 dimension.
<p>The change of dimension can also be negative. For example, a change of -1 dimension will
change a <code>String[]</code> class into a <code>String</code>. More specifically:</p>
<ul>
<li>If the given <code>element</code> is null, then this method returns <code>null</code>.</li>
<li>Otherwise if the given <code>change</code> is 0, then the given <code>element</code> is returned unchanged.</li>
<li>Otherwise if the given <code>change</code> is negative, then <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getComponentType()" title="class or interface in java.lang" class="external-link"><code>Class​.get­Component­Type()</code></a> is invoked
<code>abs(change)</code> times. The result is a <code>null</code> value if <code>abs(change)</code> is greater than
the array dimension.</li>
<li>Otherwise if <code>element</code> is <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html#TYPE" title="class or interface in java.lang" class="external-link"><code>Void​.TYPE</code></a>, then this method returns <code>Void​.TYPE</code>
since arrays of <code>void</code> do not exist.</li>
<li>Otherwise this method returns a class that represents an array of the given class augmented by
the given amount of dimensions.</li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>element</code> - the type of elements in the array.</dd>
<dd><code>change</code> - the change of dimension, as a negative or positive number.</dd>
<dt>Returns:</dt>
<dd>the type of an array of the given element type augmented by the given
number of dimensions (which may be negative), or <code>null</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="boundOfParameterizedProperty(java.lang.reflect.Field)">
<h3>boundOfParameterizedProperty</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">boundOfParameterizedProperty</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Field.html" title="class or interface in java.lang.reflect" class="external-link">Field</a>&nbsp;field)</span></div>
<div class="block">Returns the upper bounds of the parameterized type of the given property.
If the property does not have a parameterized type, returns <code>null</code>.
If the property has more than one parameterized type, then the parameter
examined by this method depends on the property type:
<ul>
<li>If <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a>, then this method returns the type of keys in map entries.</li>
<li>For all other types, this method expects exactly one parameterized type
for avoiding ambiguity. If this is not the case, <code>null</code> is returned.</li>
</ul>
This method is used for fetching the type of elements in a collection.
This information cannot be obtained from a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> instance
because of the way parameterized types are implemented in Java (by erasure).
<h4 id="examples-heading">Examples</h4>
When invoking this method for a field of the following types:
<ul>
<li><code>Map&lt;String,Number&gt;</code>: returns <code>String​.class</code>, the type of keys.</li>
<li><code>Set&lt;Number&gt;</code>: returns <code>Number​.class</code>.</li>
<li><code>Set&lt;? extends Number&gt;</code>: returns <code>Number​.class</code> as well,
because that collection cannot contain instances of super-classes.
<code>Number</code> is the <cite>upper bound</cite>.</li>
<li><code>Set&lt;? super Number&gt;</code>: returns <code>Object​.class</code>,
because that collection is allowed to contain such elements.</li>
<li><code>Set</code>: returns <code>null</code> because that collection is declared with raw type.</li>
<li><code>Long</code>: returns <code>null</code> because that type is not parameterized.</li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>field</code> - the field for which to obtain the parameterized type.</dd>
<dt>Returns:</dt>
<dd>the upper bound of parameterized type, or <code>null</code> if the given field
is not of a parameterized type.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="boundOfParameterizedProperty(java.lang.reflect.Method)">
<h3>boundOfParameterizedProperty</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">boundOfParameterizedProperty</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Method.html" title="class or interface in java.lang.reflect" class="external-link">Method</a>&nbsp;method)</span></div>
<div class="block">If the given method is a getter or a setter for a parameterized property,
returns the upper bounds of the parameterized type.
Otherwise returns <code>null</code>.
This method provides the same semantic than <a href="#boundOfParameterizedProperty(java.lang.reflect.Field)"><code>bound­Of­Parameterized­Property(Field)</code></a>,
but works on a getter or setter method rather than a field.
See <a href="#boundOfParameterizedProperty(java.lang.reflect.Field)"><code>bound­Of­Parameterized­Property(Field)</code></a> javadoc for details.
<p>This method is used for fetching the type of elements in a collection.
This information cannot be obtained from a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> instance
because of the way parameterized types are implemented in Java (by erasure).</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>method</code> - the getter or setter method for which to obtain the parameterized type.</dd>
<dt>Returns:</dt>
<dd>the upper bound of parameterized type, or <code>null</code> if the given method
is not a getter or setter for a property of a parameterized type.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="boundOfParameterizedDeclaration(java.lang.reflect.GenericDeclaration)">
<h3>boundOfParameterizedDeclaration</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">boundOfParameterizedDeclaration</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/GenericDeclaration.html" title="class or interface in java.lang.reflect" class="external-link">GenericDeclaration</a>&nbsp;typeOrMethod)</span></div>
<div class="block">Returns a single bound declared in a parameterized class or a parameterized method.
The <code>type­Or­Method</code> argument is usually a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> for a collection type.
If the given argument is a non-parameterized class, then this method searches for
the first parameterized super-class (see example below).
If no parameterized declaration is found, then this method returns <code>null</code>.
If the declaration has more than one parameterized type, then this method applies
the same heuristic rule as <a href="#boundOfParameterizedProperty(java.lang.reflect.Field)"><code>bound­Of­Parameterized­Property(Field)</code></a>
(see the javadoc of that method for details).
<h4 id="examples-heading1">Examples</h4>
When invoking this method with the following <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> argument values:
<ul>
<li><code>List​.class</code>: returns <code>Object​.class</code> because <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link"><code>List</code></a> is declared as
<code>List&lt;E&gt;</code> (implicitly <code>&lt;E extends Object&gt;</code>).</li>
<li><code>Map​.class</code>: returns <code>Object​.class</code> because <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a> is declared as
<code>Map&lt;K,V&gt;</code> and, as an heuristic rule, we return the key type of map entry.</li>
<li><code>Printer­State­Reasons​.class</code>: returns <code>Printer­State­Reason​.class</code> because
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/print/attribute/standard/PrinterStateReasons.html" title="class or interface in javax.print.attribute.standard" class="external-link"><code>Printer­State­Reasons</code></a> is not parameterized but extends
<code>Hash­Map&lt;Printer­State­Reason,Severity&gt;</code>.</li>
<li><code>Long​.class</code>: returns <code>null</code> because that type is not parameterized.</li>
</ul>
This method is used as a fallback when <code>bound­Of­Parameterized­Property(…)</code> cannot be used.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type­Or­Method</code> - the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Method.html" title="class or interface in java.lang.reflect" class="external-link"><code>Method</code></a> from which to get the bounds of its parameter.</dd>
<dt>Returns:</dt>
<dd>the upper bound of parameterized class or method, or <code>null</code> if this method cannot identify
a single parameterized type to return.</dd>
<dt>Since:</dt>
<dd>1.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="#boundOfParameterizedProperty(java.lang.reflect.Field)"><code>bound­Of­Parameterized­Property(Field)</code></a></li>
<li><a href="#boundOfParameterizedProperty(java.lang.reflect.Method)"><code>bound­Of­Parameterized­Property(Method)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getClass(T)">
<h3 id="getClass(java.lang.Object)">getClass</h3>
<div class="member-signature"><span class="annotations"><a href="Workaround.html" title="annotation interface in org.apache.sis.util">@Workaround</a>(<a href="Workaround.html#library()">library</a>="JDK",
<a href="Workaround.html#version()">version</a>="1.7")
</span><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? extends T&gt;</span>&nbsp;<span class="element-name">getClass</span><wbr><span class="parameters">(T&nbsp;object)</span></div>
<div class="block">Returns the class of the specified object, or <code>null</code> if <code>object</code> is null.
This method is also useful for fetching the class of an object known only by its bound
type. As of Java 6, the usual pattern:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">Number n = 0;
Class&lt;? extends Number&gt; c = n.getClass();
</code></pre>
</div>
doesn't seem to work if <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Number.html" title="class or interface in java.lang" class="external-link"><code>Number</code></a> is replaced by a parameterized type <code>T</code>.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the type of the given object.</dd>
<dt>Parameters:</dt>
<dd><code>object</code> - the object for which to get the class, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the class of the given object, or <code>null</code> if the given object was null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getStandardType(java.lang.Class)">
<h3>getStandardType</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? super T&gt;</span>&nbsp;<span class="element-name">getStandardType</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;type)</span></div>
<div class="block">Returns the first type or super-type (including interface) considered "standard" in Apache SIS sense.
This method applies the following heuristic rules, in that order:
<ul>
<li>If the given type implements at least one interface having the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/annotation/UML.html" title="class or interface in org.opengis.annotation" class="external-link"><code>UML</code></a> annotation,
then the first annotated interface is returned.</li>
<li>Otherwise the first public class or parent class is returned.</li>
</ul>
Those heuristic rules may be adjusted in any future Apache SIS version.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the compile-time type argument.</dd>
<dt>Parameters:</dt>
<dd><code>type</code> - the type for which to get the standard interface or class. May be <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>a standard interface implemented by <code>type</code>, or otherwise the most specific public class.
Is <code>null</code> if the given <code>type</code> argument was null.</dd>
<dt>Since:</dt>
<dd>1.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getAllInterfaces(java.lang.Class)">
<h3>getAllInterfaces</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? super T&gt;[]</span>&nbsp;<span class="element-name">getAllInterfaces</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;type)</span></div>
<div class="block">Returns every interfaces implemented, directly or indirectly, by the given class or interface.
This is similar to <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getInterfaces()" title="class or interface in java.lang" class="external-link"><code>Class​.get­Interfaces()</code></a> except that this method searches recursively
in the super-interfaces. For example if the given type is <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link"><code>Array­List</code></a>, then
the returned set will contain <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link"><code>List</code></a> (which is implemented directly)
together with its parent interfaces <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> and <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link"><code>Iterable</code></a>.
<h4 id="elements-ordering-heading">Elements ordering</h4>
All interfaces implemented directly by the given type are first and in the order they are declared
in the <code>implements</code> or <code>extends</code> clause. Parent interfaces are next.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the compile-time type of the <code>Class</code> argument.</dd>
<dt>Parameters:</dt>
<dd><code>type</code> - the class or interface for which to get all implemented interfaces.</dd>
<dt>Returns:</dt>
<dd>all implemented interfaces (not including the given <code>type</code> if it was an interface),
or an empty array if none.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getInterfaces()" title="class or interface in java.lang" class="external-link"><code>Class​.get­Interfaces()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLeafInterfaces(java.lang.Class,java.lang.Class)">
<h3>getLeafInterfaces</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;? extends T&gt;[]</span>&nbsp;<span class="element-name">getLeafInterfaces</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;baseInterface)</span></div>
<div class="block">Returns the interfaces implemented by the given class and assignable to the given base
interface, or an empty array if none. If more than one interface extends the given base,
then the most specialized interfaces are returned. For example if the given class
implements both the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link"><code>Set</code></a> and <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> interfaces, then the returned
array contains only the <code>Set</code> interface.
<h4 id="example-heading">Example</h4>
<code>get­Leaf­Interfaces(Array­List​.class, Collection​.class)</code> returns an array of length 1
containing <code>List​.class</code>.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - the type of the <code>base­Interface</code> class argument.</dd>
<dt>Parameters:</dt>
<dd><code>type</code> - a class for which the implemented interfaces are desired, or <code>null</code>.</dd>
<dd><code>base­Interface</code> - the base type of the interfaces to search.</dd>
<dt>Returns:</dt>
<dd>the leaf interfaces matching the given criterion, or an empty array if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findSpecializedClass(java.lang.Iterable)">
<h3>findSpecializedClass</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">findSpecializedClass</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;?&gt;&nbsp;objects)</span></div>
<div class="block">Returns the most specific class implemented by the objects in the given collection.
If there is more than one specialized class, returns their <a href="#findCommonClass(java.lang.Iterable)">most specific common super class</a>.
<p>This method searches for classes only, not interfaces.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>objects</code> - a collection of objects. May contains duplicated values and null values.</dd>
<dt>Returns:</dt>
<dd>the most specialized class, or <code>null</code> if the given collection does not contain
at least one non-null element.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findCommonClass(java.lang.Iterable)">
<h3>findCommonClass</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">findCommonClass</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;?&gt;&nbsp;objects)</span></div>
<div class="block">Returns the most specific class which <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="external-link">is assignable from</a>
the type of all given objects. If no element in the given collection has a type assignable
from the type of all other elements, then this method searches for a common
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getSuperclass()" title="class or interface in java.lang" class="external-link">super class</a>.
<p>This method searches for classes only, not interfaces.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>objects</code> - a collection of objects. May contains duplicated values and null values.</dd>
<dt>Returns:</dt>
<dd>the most specific class common to all supplied objects, or <code>null</code> if the
given collection does not contain at least one non-null element.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findCommonClass(java.lang.Class,java.lang.Class)">
<h3>findCommonClass</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;</span>&nbsp;<span class="element-name">findCommonClass</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c1,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c2)</span></div>
<div class="block">Returns the most specific class which <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="external-link">is assignable from</a>
the given classes or a parent of those classes. This method returns either <code>c1</code>,
<code>c2</code> or a common parent of <code>c1</code> and <code>c2</code>.
<p>This method considers classes only, not the interfaces.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>c1</code> - the first class, or <code>null</code>.</dd>
<dd><code>c2</code> - the second class, or <code>null</code>.</dd>
<dt>Returns:</dt>
<dd>the most specific class common to the supplied classes, or <code>null</code>
if both <code>c1</code> and <code>c2</code> are null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findCommonInterfaces(java.lang.Class,java.lang.Class)">
<h3>findCommonInterfaces</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&gt;</span>&nbsp;<span class="element-name">findCommonInterfaces</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c1,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;c2)</span></div>
<div class="block">Returns the interfaces which are implemented by the two given classes. The returned set
does not include the parent interfaces. For example if the two given objects implement the
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> interface, then the returned set will contain the <code>Collection</code>
type but not the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link"><code>Iterable</code></a> type, since it is implied by the collection type.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>c1</code> - the first class.</dd>
<dd><code>c2</code> - the second class.</dd>
<dt>Returns:</dt>
<dd>the interfaces common to both classes, or an empty set if none.
Callers can freely modify the returned set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="implementSameInterfaces(java.lang.Class,java.lang.Class,java.lang.Class)">
<h3>implementSameInterfaces</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">implementSameInterfaces</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;object1,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;object2,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;baseInterface)</span></div>
<div class="block">Returns <code>true</code> if the two specified objects implements exactly the same set of interfaces.
Only interfaces assignable to <code>base­Interface</code> are compared.
Declaration order does not matter.
<h4 id="example-heading1">Example</h4>
in ISO 19111, different interfaces exist for different coordinate system (CS) geometries
(<code>Cartesian­CS</code>, <code>Polar­CS</code>, etc.). One can check if two implementations have
the same geometry with the following code:
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">if (implementSameInterfaces(cs1, cs2, CoordinateSystem.class)) {
// The two Coordinate Systems are of the same kind.
}
</code></pre>
</div>
</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>object1</code> - the first object to check for interfaces.</dd>
<dd><code>object2</code> - the second object to check for interfaces.</dd>
<dd><code>base­Interface</code> - the parent of all interfaces to check.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if both objects implement the same set of interfaces,
considering only sub-interfaces of <code>base­Interface</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getShortName(java.lang.Class)">
<h3>getShortName</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getShortName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;classe)</span></div>
<div class="block">Returns the name of the given class without package name, but including the names of enclosing
classes if any. This method is similar to the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getSimpleName()" title="class or interface in java.lang" class="external-link"><code>Class​.get­Simple­Name()</code></a> method, except that
if the given class is an inner class, then the returned value is prefixed with the outer class
name. Another difference is that if the given class is local or anonymous, then this method
returns the name of the parent class.
<p>The following table compares the various kind of names for some examples:</p>
<table class="sis">
<caption>Class name comparisons</caption>
<tr>
<th>Class</th>
<th><code>getName()</code></th>
<th><code>getSimpleName()</code></th>
<th><code>getCanonicalName()</code></th>
<th><code>getShortName()</code></th>
</tr>
<tr>
<td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td>
<td><code>"java.lang.String"</code></td>
<td><code>"String"</code></td>
<td><code>"java.lang.String"</code></td>
<td><code>"String"</code></td>
</tr>
<tr>
<td><code>double[]</code></td>
<td><code>"[D"</code></td>
<td><code>"double[]"</code></td>
<td><code>"double[]"</code></td>
<td><code>"double[]"</code></td>
</tr>
<tr>
<td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/awt/geom/Point2D.Double.html" title="class or interface in java.awt.geom" class="external-link"><code>Point2D.Double</code></a></td>
<td><code>"java.awt.geom.Point2D$Double"</code></td>
<td><code>"Double"</code></td>
<td><code>"java.awt.geom.Point2D.Double"</code></td>
<td><code>"Point2D.Double"</code></td>
</tr>
<tr>
<td>Anonymous <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link"><code>Comparable</code></a></td>
<td><code>"com.mycompany.myclass$1"</code></td>
<td><code>""</code></td>
<td><code>null</code></td>
<td><code>"Object"</code></td>
</tr>
</table></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>classe</code> - the object class (may be <code>null</code>).</dd>
<dt>Returns:</dt>
<dd>the simple name with outer class name (if any) of the first non-anonymous
class in the hierarchy, or <code>"&lt;*&gt;"</code> if the given class is null.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#getShortClassName(java.lang.Object)"><code>get­Short­Class­Name(Object)</code></a></li>
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getSimpleName()" title="class or interface in java.lang" class="external-link"><code>Class​.get­Simple­Name()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getShortClassName(java.lang.Object)">
<h3>getShortClassName</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getShortClassName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</span></div>
<div class="block">Returns the class name of the given object without package name, but including the enclosing class names
if any. Invoking this method is equivalent to invoking <code>get­Short­Name(object​.get­Class())</code> except for
<code>null</code> value. See <a href="#getShortName(java.lang.Class)"><code>get­Short­Name(Class)</code></a> for more information on the class name returned by
this method.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>object</code> - the object (may be <code>null</code>).</dd>
<dt>Returns:</dt>
<dd>the simple class name with outer class name (if any) of the first non-anonymous
class in the hierarchy, or <code>"&lt;*&gt;"</code> if the given object is null.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#getShortName(java.lang.Class)"><code>get­Short­Name(Class)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isAssignableToAny(java.lang.Class,java.lang.Class...)">
<h3>isAssignableToAny</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isAssignableToAny</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;type,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;...&nbsp;allowedTypes)</span></div>
<div class="block">Returns <code>true</code> if the given type is assignable to one of the given allowed types.
More specifically, if at least one <code>allowed­Types[i]</code> element exists for which
<code>allowed­Types[i].<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="external-link">is­Assignable­From</a>(type)</code>
returns <code>true</code>, then this method returns <code>true</code>.
<p>Special cases:</p>
<ul>
<li>If <code>type</code> is null, then this method returns <code>false</code>.</li>
<li>If <code>allowed­Types</code> is null, then this method returns <code>true</code>.
This is to be interpreted as "no restriction on the allowed types".</li>
<li>Any null element in the <code>allowed­Types</code> array are silently ignored.</li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - the type to be tested, or <code>null</code>.</dd>
<dd><code>allowed­Types</code> - the allowed types.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given type is assignable to one of the allowed types.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isPossibleGetter(java.lang.reflect.Method)">
<h3>isPossibleGetter</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isPossibleGetter</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Method.html" title="class or interface in java.lang.reflect" class="external-link">Method</a>&nbsp;method)</span></div>
<div class="block">Returns <code>true</code> if the given method may possibly be the getter method for a property.
This method implements the algorithm used by SIS in order to identify getter methods in
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/package-summary.html" class="external-link">metadata</a> interfaces. We do not rely on naming convention
(method names starting with "<code>get</code>" or "<code>is</code>" prefixes) because not every methods
follow such convention (e.g. <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/metadata/quality/ConformanceResult.html#pass()" title="class or interface in org.opengis.metadata.quality" class="external-link"><code>Conformance­Result​.pass()</code></a>).
<p>The current implementation returns <code>true</code> if the given method meets all the
following conditions. Note that a <code>true</code> value is not a guaranteed that the given
method is really a getter. The caller is encouraged to perform additional checks if
possible.</p>
<ul>
<li>The method does no expect any argument.</li>
<li>The method returns a value (anything except <code>void</code>).</li>
<li>The method name is not <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link"><code>clone</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link"><code>get­Class</code></a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link"><code>hash­Code</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link"><code>to­String</code></a> or
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/IdentifiedObject.html#toWKT()" title="class or interface in org.opengis.referencing" class="external-link"><code>to­WKT</code></a>.</li>
<li>The method is not <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Method.html#isSynthetic()" title="class or interface in java.lang.reflect" class="external-link">synthetic</a>.</li>
</ul>
<p>Those conditions may be updated in any future SIS version.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>method</code> - the method to inspect.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given method may possibly be a non-deprecated getter method.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>