| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>Resources (Apache Calcite API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Resources (Apache Calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Resources.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.runtime</a></div> |
| <h2 title="Class Resources" class="title">Class Resources</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.runtime.Resources</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public class <span class="typeNameLabel">Resources</span> |
| extends java.lang.Object</pre> |
| <div class="block">Defining wrapper classes around resources that allow the compiler to check |
| whether the resources exist and have the argument types that your code |
| expects. |
| |
| <p>If this class belongs to a package other than |
| <code>net.hydromatic.resource</code>, it was probably generated by the Maven |
| plugin (groupId: "net.hydromatic", artifactId: |
| "hydromatic-resource-maven-plugin"). Code generation allows projects to use |
| this resource library without adding a runtime dependency on another JAR.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.BaseMessage.html" title="annotation in org.apache.calcite.runtime">Resources.BaseMessage</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The message in the default locale.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.BooleanProp.html" title="class in org.apache.calcite.runtime">Resources.BooleanProp</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Boolean property instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.BuiltinMethod.html" title="enum in org.apache.calcite.runtime">Resources.BuiltinMethod</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Default.html" title="annotation in org.apache.calcite.runtime">Resources.Default</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Default value of a property.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.DoubleProp.html" title="class in org.apache.calcite.runtime">Resources.DoubleProp</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Double property instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Element.html" title="class in org.apache.calcite.runtime">Resources.Element</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Element in a resource (either a resource or a property).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.EmptyPropertyAccessor.html" title="enum in org.apache.calcite.runtime">Resources.EmptyPropertyAccessor</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.ExInst.html" title="class in org.apache.calcite.runtime">Resources.ExInst</a><<a href="Resources.ExInst.html" title="type parameter in Resources.ExInst">T</a> extends java.lang.Exception></span></code></th> |
| <td class="colLast"> |
| <div class="block">Sub-class of <a href="Resources.Inst.html" title="class in org.apache.calcite.runtime"><code>Resources.Inst</code></a> that can throw an exception without caused |
| by.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.ExInstWithCause.html" title="class in org.apache.calcite.runtime">Resources.ExInstWithCause</a><<a href="Resources.ExInstWithCause.html" title="type parameter in Resources.ExInstWithCause">T</a> extends java.lang.Exception></span></code></th> |
| <td class="colLast"> |
| <div class="block">Sub-class of <a href="Resources.Inst.html" title="class in org.apache.calcite.runtime"><code>Resources.Inst</code></a> that can throw an exception.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Inst.html" title="class in org.apache.calcite.runtime">Resources.Inst</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Resource instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.IntProp.html" title="class in org.apache.calcite.runtime">Resources.IntProp</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Integer property instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.MyPropertyResourceBundle.html" title="class in org.apache.calcite.runtime">Resources.MyPropertyResourceBundle</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Resource bundle based on properties.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.NoDefaultValueException.html" title="class in org.apache.calcite.runtime">Resources.NoDefaultValueException</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Thrown when a default value is needed but a property does not have |
| one.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Prop.html" title="class in org.apache.calcite.runtime">Resources.Prop</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Property instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.PropertiesAccessor.html" title="class in org.apache.calcite.runtime">Resources.PropertiesAccessor</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of <a href="Resources.PropertyAccessor.html" title="interface in org.apache.calcite.runtime"><code>Resources.PropertyAccessor</code></a> that reads from a |
| <code>Properties</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Property.html" title="annotation in org.apache.calcite.runtime">Resources.Property</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Property of a resource.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.PropertyAccessor.html" title="interface in org.apache.calcite.runtime">Resources.PropertyAccessor</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Means by which a resource can get values of properties, given their |
| name.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Resource.html" title="annotation in org.apache.calcite.runtime">Resources.Resource</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The name of the property in the resource file.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.ShadowResourceBundle.html" title="class in org.apache.calcite.runtime">Resources.ShadowResourceBundle</a></span></code></th> |
| <td class="colLast"> |
| <div class="block"><code>ShadowResourceBundle</code> is an abstract base class for |
| <code>ResourceBundle</code> classes which are backed by a properties file.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.StringProp.html" title="class in org.apache.calcite.runtime">Resources.StringProp</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">String property instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Resources.Validation.html" title="enum in org.apache.calcite.runtime">Resources.Validation</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Types of validation that can be performed on a resource.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static java.lang.ThreadLocal<java.util.Locale></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MAP_THREAD_TO_LOCALE">MAP_THREAD_TO_LOCALE</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Resources</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.lang.Class)">create</a></span>​(java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an instance of the resource object, using the class's name as |
| the name of the resource file.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.lang.String,java.lang.Class)">create</a></span>​(java.lang.String base, |
| java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an instance of the resource object.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>private static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.lang.String,org.apache.calcite.runtime.Resources.PropertyAccessor,java.lang.Class)">create</a></span>​(java.lang.String base, |
| <a href="Resources.PropertyAccessor.html" title="interface in org.apache.calcite.runtime">Resources.PropertyAccessor</a> accessor, |
| java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.util.Properties,java.lang.Class)">create</a></span>​(java.util.Properties properties, |
| java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an instance of the resource object that can access properties |
| but not resources.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(org.apache.calcite.runtime.Resources.PropertyAccessor,java.lang.Class)">create</a></span>​(<a href="Resources.PropertyAccessor.html" title="interface in org.apache.calcite.runtime">Resources.PropertyAccessor</a> accessor, |
| java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an instance of the resource object that can access properties |
| but not resources.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>private static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equal(java.lang.Object,java.lang.Object)">equal</a></span>​(java.lang.Object o0, |
| java.lang.Object o1)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether two objects are equal or are both null.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static java.util.Locale</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getThreadLocale()">getThreadLocale</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the preferred locale of the current thread, or null if the |
| thread has not called <a href="#setThreadLocale(java.util.Locale)"><code>setThreadLocale(java.util.Locale)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected static java.util.Locale</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getThreadOrDefaultLocale()">getThreadOrDefaultLocale</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the preferred locale of the current thread, or |
| the default locale if the current thread has not called |
| <a href="#setThreadLocale(java.util.Locale)"><code>setThreadLocale(java.util.Locale)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setThreadLocale(java.util.Locale)">setThreadLocale</a></span>​(java.util.Locale locale)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the locale for the current thread.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validate(java.lang.Object)">validate</a></span>​(java.lang.Object o)</code></th> |
| <td class="colLast"> |
| <div class="block">Applies all validations to all resource methods in the given |
| resource object.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validate(java.lang.Object,java.util.EnumSet)">validate</a></span>​(java.lang.Object o, |
| java.util.EnumSet<<a href="Resources.Validation.html" title="enum in org.apache.calcite.runtime">Resources.Validation</a>> validations)</code></th> |
| <td class="colLast"> |
| <div class="block">Applies the given validations to all resource methods in the given |
| resource object.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>private static java.lang.Object</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#zero(java.lang.Class)">zero</a></span>​(java.lang.Class<?> clazz)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="MAP_THREAD_TO_LOCALE"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>MAP_THREAD_TO_LOCALE</h4> |
| <pre>private static final java.lang.ThreadLocal<java.util.Locale> MAP_THREAD_TO_LOCALE</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Resources</h4> |
| <pre>private Resources()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getThreadOrDefaultLocale()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadOrDefaultLocale</h4> |
| <pre class="methodSignature">protected static java.util.Locale getThreadOrDefaultLocale()</pre> |
| <div class="block">Returns the preferred locale of the current thread, or |
| the default locale if the current thread has not called |
| <a href="#setThreadLocale(java.util.Locale)"><code>setThreadLocale(java.util.Locale)</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Locale</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setThreadLocale(java.util.Locale)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setThreadLocale</h4> |
| <pre class="methodSignature">public static void setThreadLocale​(java.util.Locale locale)</pre> |
| <div class="block">Sets the locale for the current thread.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>locale</code> - Locale</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getThreadLocale()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadLocale</h4> |
| <pre class="methodSignature">public static java.util.Locale getThreadLocale()</pre> |
| <div class="block">Returns the preferred locale of the current thread, or null if the |
| thread has not called <a href="#setThreadLocale(java.util.Locale)"><code>setThreadLocale(java.util.Locale)</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Locale</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <T> T create​(java.lang.Class<T> clazz)</pre> |
| <div class="block">Creates an instance of the resource object, using the class's name as |
| the name of the resource file.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Resource type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - Interface that contains a method for each resource</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Instance of the interface that can be used to instantiate |
| resources</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#create(java.lang.String,java.lang.Class)"><code>create(String, Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(java.lang.String,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <T> T create​(java.lang.String base, |
| java.lang.Class<T> clazz)</pre> |
| <div class="block">Creates an instance of the resource object. |
| |
| <p>The resource interface has methods that return <a href="Resources.Inst.html" title="class in org.apache.calcite.runtime"><code>Resources.Inst</code></a> and |
| <a href="Resources.ExInst.html" title="class in org.apache.calcite.runtime"><code>Resources.ExInst</code></a> values. Each of those methods is basically a factory method. |
| |
| <p>This method creates an instance of that interface backed by a resource |
| bundle, using a dynamic proxy (<code>Proxy</code>). |
| |
| <p>Suppose that base = "com.example.MyResource" and the current locale is |
| "en_US". A method |
| |
| <blockquote> |
| @BaseMessage("Illegal binary string {0}") |
| ExInst<IllegalArgumentException> illegalBinaryString(String a0); |
| </blockquote> |
| |
| will look up a resource "IllegalBinaryString" from the resource file |
| "com/example/MyResource_en_US.properties", and substitute in the parameter |
| value <code>a0</code>. |
| |
| <p>The resource in the properties file may or may not be equal to the |
| base message "Illegal binary string {0}". But in the base locale, it |
| probably should be.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - Resource type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>base</code> - Base name of the resource.properties file</dd> |
| <dd><code>clazz</code> - Interface that contains a method for each resource</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Instance of the interface that can be used to instantiate |
| resources</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(org.apache.calcite.runtime.Resources.PropertyAccessor,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <T> T create​(<a href="Resources.PropertyAccessor.html" title="interface in org.apache.calcite.runtime">Resources.PropertyAccessor</a> accessor, |
| java.lang.Class<T> clazz)</pre> |
| <div class="block">Creates an instance of the resource object that can access properties |
| but not resources.</div> |
| </li> |
| </ul> |
| <a id="create(java.util.Properties,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <T> T create​(java.util.Properties properties, |
| java.lang.Class<T> clazz)</pre> |
| <div class="block">Creates an instance of the resource object that can access properties |
| but not resources.</div> |
| </li> |
| </ul> |
| <a id="create(java.lang.String,org.apache.calcite.runtime.Resources.PropertyAccessor,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">private static <T> T create​(java.lang.String base, |
| <a href="Resources.PropertyAccessor.html" title="interface in org.apache.calcite.runtime">Resources.PropertyAccessor</a> accessor, |
| java.lang.Class<T> clazz)</pre> |
| </li> |
| </ul> |
| <a id="validate(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validate</h4> |
| <pre class="methodSignature">public static void validate​(java.lang.Object o)</pre> |
| <div class="block">Applies all validations to all resource methods in the given |
| resource object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>o</code> - Resource object to validate</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="validate(java.lang.Object,java.util.EnumSet)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validate</h4> |
| <pre class="methodSignature">public static void validate​(java.lang.Object o, |
| java.util.EnumSet<<a href="Resources.Validation.html" title="enum in org.apache.calcite.runtime">Resources.Validation</a>> validations)</pre> |
| <div class="block">Applies the given validations to all resource methods in the given |
| resource object.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>o</code> - Resource object to validate</dd> |
| <dd><code>validations</code> - Validations to perform</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="zero(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>zero</h4> |
| <pre class="methodSignature">private static java.lang.Object zero​(java.lang.Class<?> clazz)</pre> |
| </li> |
| </ul> |
| <a id="equal(java.lang.Object,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>equal</h4> |
| <pre class="methodSignature">private static boolean equal​(java.lang.Object o0, |
| java.lang.Object o1)</pre> |
| <div class="block">Returns whether two objects are equal or are both null.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Resources.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |