| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>Classes (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <meta name="keywords" content="org.apache.sis.util.Classes class"> |
| <meta name="keywords" content="changeArrayDimension()"> |
| <meta name="keywords" content="boundOfParameterizedProperty()"> |
| <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="../../../../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="Classes (Apache SIS 1.0 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}; |
| 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 = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Classes.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.sis.util</a></div> |
| <h2 title="Class Classes" class="title">Class Classes</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="Static.html" title="class in org.apache.sis.util">Static</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>Classes</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">Classes</span> |
| extends <a href="Static.html" title="class in org.apache.sis.util">Static</a></pre> |
| <div class="block">Static methods working on <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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>changeArrayDimension</code></a>)</li> |
| <li>Find the common parent of two or more classes |
| (<a href="#findCommonClass(java.lang.Class,java.lang.Class)"><code>findCommonClass</code></a>, |
| <a href="#findCommonInterfaces(java.lang.Class,java.lang.Class)"><code>findCommonInterfaces</code></a>)</li> |
| <li>Getting the bounds of a parameterized field or method |
| (<a href="#boundOfParameterizedProperty(java.lang.reflect.Method)"><code>boundOfParameterizedProperty</code></a>)</li> |
| <li>Getting a short class name (<a href="#getShortName(java.lang.Class)"><code>getShortName</code></a>, |
| <a href="#getShortClassName(java.lang.Object)"><code>getShortClassName</code></a>)</li> |
| </ul></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| |
| <p><font size="-1">Defined in the <code>sis-utility</code> module</font></p> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#boundOfParameterizedProperty(java.lang.reflect.Field)">boundOfParameterizedProperty</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a> field)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the upper bounds of the parameterized type of the given property.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#boundOfParameterizedProperty(java.lang.reflect.Method)">boundOfParameterizedProperty</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Method</a> method)</code></th> |
| <td class="colLast"> |
| <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> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#changeArrayDimension(java.lang.Class,int)">changeArrayDimension</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> element, |
| int change)</code></th> |
| <td class="colLast"> |
| <div class="block">Changes the array dimension by the given amount.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/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="#findCommonClass(java.lang.Class,java.lang.Class)">findCommonClass</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c2)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the most specific class which <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="externalLink">is assignable from</a> |
| the given classes or a parent of those classes.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/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="#findCommonClass(java.lang.Iterable)">findCommonClass</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a><?> objects)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the most specific class which <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="externalLink">is assignable from</a> |
| the type of all given objects.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findCommonInterfaces(java.lang.Class,java.lang.Class)">findCommonInterfaces</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c2)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the interfaces which are implemented by the two given classes.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/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="#findSpecializedClass(java.lang.Iterable)">findSpecializedClass</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a><?> objects)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the most specific class implemented by the objects in the given collection.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? super T>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAllInterfaces(java.lang.Class)">getAllInterfaces</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns every interfaces implemented, directly or indirectly, by the given class or interface.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? extends T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getClass(T)">getClass</a></span>​(T object)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the class of the specified object, or <code>null</code> if <code>object</code> is null.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? extends T>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLeafInterfaces(java.lang.Class,java.lang.Class)">getLeafInterfaces</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> type, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> baseInterface)</code></th> |
| <td class="colLast"> |
| <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> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getShortClassName(java.lang.Object)">getShortClassName</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> object)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the class name of the given object without package name, but including the enclosing class names |
| if any.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getShortName(java.lang.Class)">getShortName</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> classe)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the name of the given class without package name, but including the names of enclosing |
| classes if any.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? super T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStandardType(java.lang.Class)">getStandardType</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the first type or super-type (including interface) considered "standard" in Apache SIS sense.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#implementSameInterfaces(java.lang.Class,java.lang.Class,java.lang.Class)">implementSameInterfaces</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> object1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> object2, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> baseInterface)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the two specified objects implements exactly the same set |
| of interfaces.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAssignableToAny(java.lang.Class,java.lang.Class...)">isAssignableToAny</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> type, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?>... allowedTypes)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the given type is assignable to one of the given allowed types.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isPossibleGetter(java.lang.reflect.Method)">isPossibleGetter</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Method</a> method)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the given method may possibly be the getter method for a property.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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/8/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="changeArrayDimension(java.lang.Class,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>changeArrayDimension</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> changeArrayDimension​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> element, |
| int change)</pre> |
| <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/javase/8/docs/api/java/lang/Class.html?is-external=true#getComponentType()" title="class or interface in java.lang" class="externalLink"><code>Class.getComponentType()</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/javase/8/docs/api/java/lang/Void.html?is-external=true#TYPE" title="class or interface in java.lang" class="externalLink"><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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></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> |
| </li> |
| </ul> |
| <a id="boundOfParameterizedProperty(java.lang.reflect.Field)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>boundOfParameterizedProperty</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> boundOfParameterizedProperty​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Field</a> field)</pre> |
| <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>. |
| |
| <p>This method is typically used for fetching the type of elements in a collection. |
| We do not provide a method working from a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a> instance because of the way |
| parameterized types are implemented in Java (by erasure).</p> |
| |
| <b>Examples:</b> When invoking this method for a field of the type below: |
| <ul> |
| <li><code>Set<Number></code> returns <code>Number.class</code>.</li> |
| |
| <li><code>Set<? extends Number></code> returns <code>Number.class</code> as well, since that |
| collection can not (in theory) contain instances of super-classes; <code>Number</code> |
| is the <cite>upper bound</cite>.</li> |
| |
| <li><code>Set<? super Number></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 un-parameterized.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>field</code> - the field for which to obtain the parameterized type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the upper bound of parameterized type, or <code>null</code> if the given field |
| is not of a parameterized type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="boundOfParameterizedProperty(java.lang.reflect.Method)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>boundOfParameterizedProperty</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> boundOfParameterizedProperty​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Method</a> method)</pre> |
| <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>boundOfParameterizedProperty(Field)</code></a>, but |
| works on a getter or setter method rather then the field. See the javadoc of above |
| method for more details. |
| |
| <p>This method is typically used for fetching the type of elements in a collection. |
| We do not provide a method working from a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class</code></a> instance because of the way |
| parameterized types are implemented in Java (by erasure).</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>method</code> - the getter or setter method for which to obtain the parameterized type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the upper bound of parameterized type, or <code>null</code> if the given method |
| does not operate on an object of a parameterized type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getClass(java.lang.Object)"> |
| <!-- --> |
| </a><a id="getClass(T)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClass</h4> |
| <pre class="methodSignature"><a href="Workaround.html" title="annotation in org.apache.sis.util">@Workaround</a>(<a href="Workaround.html#library()">library</a>="JDK", |
| <a href="Workaround.html#version()">version</a>="1.7") |
| public static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? extends T> getClass​(T object)</pre> |
| <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: |
| |
| <blockquote><pre>Number n = 0; |
| Class<? <font color="green">extends</font> Number> c = n.<b>getClass</b>();</pre></blockquote> |
| |
| doesn't seem to work if <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a> is replaced by a parameterized type <code>T</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the type of the given object.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>object</code> - the object for which to get the class, or <code>null</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the class of the given object, or <code>null</code> if the given object was null.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getStandardType(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStandardType</h4> |
| <pre class="methodSignature">public static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? super T> getStandardType​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> type)</pre> |
| <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/annotation/UML.html?is-external=true" title="class or interface in org.opengis.annotation" class="externalLink"><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> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the compile-time type argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the type for which to get the standard interface or class. May be <code>null</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></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><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAllInterfaces(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAllInterfaces</h4> |
| <pre class="methodSignature">public static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? super T>[] getAllInterfaces​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> type)</pre> |
| <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/javase/8/docs/api/java/lang/Class.html?is-external=true#getInterfaces()" title="class or interface in java.lang" class="externalLink"><code>Class.getInterfaces()</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/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>ArrayList</code></a>, then |
| the returned set will contain <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>List</code></a> (which is implemented directly) |
| together with its parent interfaces <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Collection</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Iterable</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the compile-time type of the <code>Class</code> argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the class or interface for which to get all implemented interfaces.</dd> |
| <dt><span class="returnLabel">Returns:</span></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><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getInterfaces()" title="class or interface in java.lang" class="externalLink"><code>Class.getInterfaces()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getLeafInterfaces(java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLeafInterfaces</h4> |
| <pre class="methodSignature">public static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><? extends T>[] getLeafInterfaces​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> type, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> baseInterface)</pre> |
| <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/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Set</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Collection</code></a> interfaces, then the returned |
| array contains only the <code>Set</code> interface. |
| |
| <div class="section">Example</div> |
| <code>getLeafInterfaces(ArrayList.class, Collection.class)</code> returns an array of length 1 |
| containing <code>List.class</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the type of the <code>baseInterface</code> class argument.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - a class for which the implemented interfaces are desired, or <code>null</code>.</dd> |
| <dd><code>baseInterface</code> - the base type of the interfaces to search.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the leaf interfaces matching the given criterion, or an empty array if none.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="findSpecializedClass(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findSpecializedClass</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> findSpecializedClass​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a><?> objects)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>objects</code> - a collection of objects. May contains duplicated values and null values.</dd> |
| <dt><span class="returnLabel">Returns:</span></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> |
| </li> |
| </ul> |
| <a id="findCommonClass(java.lang.Iterable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findCommonClass</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> findCommonClass​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a><?> objects)</pre> |
| <div class="block">Returns the most specific class which <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="externalLink">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/javase/8/docs/api/java/lang/Class.html?is-external=true#getSuperclass()" title="class or interface in java.lang" class="externalLink">super class</a>. |
| |
| <p>This method searches for classes only, not interfaces.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>objects</code> - a collection of objects. May contains duplicated values and null values.</dd> |
| <dt><span class="returnLabel">Returns:</span></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> |
| </li> |
| </ul> |
| <a id="findCommonClass(java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findCommonClass</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> findCommonClass​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c2)</pre> |
| <div class="block">Returns the most specific class which <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="externalLink">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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></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> |
| </li> |
| </ul> |
| <a id="findCommonInterfaces(java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findCommonInterfaces</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?>> findCommonInterfaces​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> c2)</pre> |
| <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/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><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/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Iterable</code></a> type, since it is implied by the collection type.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>c1</code> - the first class.</dd> |
| <dd><code>c2</code> - the second class.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the interfaces common to both classes, or an empty set if none. |
| Callers can freely modify the returned set.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="implementSameInterfaces(java.lang.Class,java.lang.Class,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>implementSameInterfaces</h4> |
| <pre class="methodSignature">public static boolean implementSameInterfaces​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> object1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> object2, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> baseInterface)</pre> |
| <div class="block">Returns <code>true</code> if the two specified objects implements exactly the same set |
| of interfaces. Only interfaces assignable to <code>baseInterface</code> are compared. |
| Declaration order doesn't matter. |
| |
| <div class="note"><b>Example:</b> |
| in ISO 19111, different interfaces exist for different coordinate system (CS) geometries |
| (<code>CartesianCS</code>, <code>PolarCS</code>, etc.). One can check if two implementations have |
| the same geometry with the following code: |
| |
| <blockquote><pre><font color="green">if</font> (<b>implementSameInterfaces</b>(cs1, cs2, CoordinateSystem.<font color="green">class</font>)) { |
| <i><font color="gray">// The two Coordinate System are of the same kind.</font></i> |
| }</pre></blockquote> |
| </div></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></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>baseInterface</code> - the parent of all interfaces to check.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if both objects implement the same set of interfaces, |
| considering only sub-interfaces of <code>baseInterface</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getShortName(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getShortName</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getShortName​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> classe)</pre> |
| <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/javase/8/docs/api/java/lang/Class.html?is-external=true#getSimpleName()" title="class or interface in java.lang" class="externalLink"><code>Class.getSimpleName()</code></a> method, except that |
| if the given class is an inner class, then the returned value is prefixed with the outer class |
| name. An other 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/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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/javase/8/docs/api/java/awt/geom/Point2D.Double.html?is-external=true" title="class or interface in java.awt.geom" class="externalLink"><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/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>classe</code> - the object class (may be <code>null</code>).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the simple name with outer class name (if any) of the first non-anonymous |
| class in the hierarchy, or <code>"<*>"</code> if the given class is null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getShortClassName(java.lang.Object)"><code>getShortClassName(Object)</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#getSimpleName()" title="class or interface in java.lang" class="externalLink"><code>Class.getSimpleName()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getShortClassName(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getShortClassName</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getShortClassName​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> object)</pre> |
| <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>getShortName(object.getClass())</code> except for |
| <code>null</code> value. See <a href="#getShortName(java.lang.Class)"><code>getShortName(Class)</code></a> for more information on the class name returned by |
| this method.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>object</code> - the object (may be <code>null</code>).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the simple class name with outer class name (if any) of the first non-anonymous |
| class in the hierarchy, or <code>"<*>"</code> if the given object is null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getShortName(java.lang.Class)"><code>getShortName(Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isAssignableToAny(java.lang.Class,java.lang.Class...)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isAssignableToAny</h4> |
| <pre class="methodSignature">public static boolean isAssignableToAny​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?> type, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><?>... allowedTypes)</pre> |
| <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>allowedTypes[i]</code> element exists for which |
| <code>allowedTypes[i].<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#isAssignableFrom(java.lang.Class)" title="class or interface in java.lang" class="externalLink">isAssignableFrom</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>allowedTypes</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>allowedTypes</code> array are silently ignored.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the type to be tested, or <code>null</code>.</dd> |
| <dd><code>allowedTypes</code> - the allowed types.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given type is assignable to one of the allowed types.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isPossibleGetter(java.lang.reflect.Method)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>isPossibleGetter</h4> |
| <pre class="methodSignature">public static boolean isPossibleGetter​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect" class="externalLink">Method</a> method)</pre> |
| <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/metadata/package-summary.html?is-external=true" class="externalLink">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/metadata/quality/ConformanceResult.html?is-external=true#pass()" title="class or interface in org.opengis.metadata.quality" class="externalLink"><code>ConformanceResult.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/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink"><code>clone</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink"><code>getClass</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink"><code>hashCode</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink"><code>toString</code></a> or |
| <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/IdentifiedObject.html?is-external=true#toWKT()" title="class or interface in org.opengis.referencing" class="externalLink"><code>toWKT</code></a>.</li> |
| <li>The method is not <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html?is-external=true#isSynthetic()" title="class or interface in java.lang.reflect" class="externalLink">synthetic</a>.</li> |
| </ul> |
| |
| <p>Those conditions may be updated in any future SIS version.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>method</code> - the method to inspect.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given method may possibly be a non-deprecated getter method.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Classes.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |