mirror of
https://github.com/lightbend/config.git
synced 2025-03-13 10:40:29 +08:00
Add release 1.4.1
This commit is contained in:
parent
6159526e3d
commit
50560f58fb
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>Config</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L168" target="_blank" >Config</a>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L168" target="_blank" >Config</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a></pre>
|
||||
<div class="block">An immutable map from config paths to config values. Paths are dot-separated
|
||||
expressions such as <code>foo.bar.baz</code>. Values are as in JSON
|
||||
@ -652,7 +652,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>root</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L176" target="_blank" >root</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L176" target="_blank" >root</a>()</pre>
|
||||
<div class="block">Gets the <code>Config</code> as a tree of <a href="../../../com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config"><code>ConfigObject</code></a>. This is a
|
||||
constant-time operation (it is not proportional to the number of values
|
||||
in the <code>Config</code>).</div>
|
||||
@ -668,7 +668,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>origin</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L184" target="_blank" >origin</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L184" target="_blank" >origin</a>()</pre>
|
||||
<div class="block">Gets the origin of the <code>Config</code>, which may be a file, or a file
|
||||
with a line number, or just a descriptive phrase.</div>
|
||||
<dl>
|
||||
@ -683,7 +683,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withFallback</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L187" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L187" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/typesafe/config/ConfigMergeable.html#withFallback-com.typesafe.config.ConfigMergeable-">ConfigMergeable</a></code></span></div>
|
||||
<div class="block">Returns a new value computed by merging this value with another, with
|
||||
keys in this value "winning" over the other one.
|
||||
@ -746,7 +746,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>resolve</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L244" target="_blank" >resolve</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L244" target="_blank" >resolve</a>()</pre>
|
||||
<div class="block">Returns a replacement config with all substitutions (the
|
||||
<code>${foo.bar}</code> syntax, see <a
|
||||
href="https://github.com/lightbend/config/blob/master/HOCON.md">the
|
||||
@ -809,7 +809,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>resolve</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L254" target="_blank" >resolve</a>(<a href="../../../com/typesafe/config/ConfigResolveOptions.html" title="class in com.typesafe.config">ConfigResolveOptions</a> options)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L254" target="_blank" >resolve</a>(<a href="../../../com/typesafe/config/ConfigResolveOptions.html" title="class in com.typesafe.config">ConfigResolveOptions</a> options)</pre>
|
||||
<div class="block">Like <a href="../../../com/typesafe/config/Config.html#resolve--"><code>resolve()</code></a> but allows you to specify non-default
|
||||
options.</div>
|
||||
<dl>
|
||||
@ -826,7 +826,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>isResolved</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L269" target="_blank" >isResolved</a>()</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L269" target="_blank" >isResolved</a>()</pre>
|
||||
<div class="block">Checks whether the config is completely resolved. After a successful call
|
||||
to <a href="../../../com/typesafe/config/Config.html#resolve--"><code>resolve()</code></a> it will be completely resolved, but after
|
||||
calling <a href="../../../com/typesafe/config/Config.html#resolve-com.typesafe.config.ConfigResolveOptions-"><code>resolve(ConfigResolveOptions)</code></a> with
|
||||
@ -849,7 +849,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>resolveWith</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L297" target="_blank" >resolveWith</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> source)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L297" target="_blank" >resolveWith</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> source)</pre>
|
||||
<div class="block">Like <a href="../../../com/typesafe/config/Config.html#resolve--"><code>resolve()</code></a> except that substitution values are looked
|
||||
up in the given source, rather than in this instance. This is a
|
||||
special-purpose method which doesn't make sense to use in most cases;
|
||||
@ -884,7 +884,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>resolveWith</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L311" target="_blank" >resolveWith</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> source,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L311" target="_blank" >resolveWith</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> source,
|
||||
<a href="../../../com/typesafe/config/ConfigResolveOptions.html" title="class in com.typesafe.config">ConfigResolveOptions</a> options)</pre>
|
||||
<div class="block">Like <a href="../../../com/typesafe/config/Config.html#resolveWith-com.typesafe.config.Config-"><code>resolveWith(Config)</code></a> but allows you to specify
|
||||
non-default options.</div>
|
||||
@ -906,7 +906,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>checkValid</h4>
|
||||
<pre>void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L395" target="_blank" >checkValid</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> reference,
|
||||
<pre>void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L395" target="_blank" >checkValid</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> reference,
|
||||
java.lang.String... restrictToPaths)</pre>
|
||||
<div class="block">Validates this config against a reference config, throwing an exception
|
||||
if it is invalid. The purpose of this method is to "fail early" with a
|
||||
@ -994,7 +994,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>hasPath</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L420" target="_blank" >hasPath</a>(java.lang.String path)</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L420" target="_blank" >hasPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Checks whether a value is present and non-null at the given path. This
|
||||
differs in two ways from <code>Map.containsKey()</code> as implemented by
|
||||
<a href="../../../com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config"><code>ConfigObject</code></a>: it looks for a path expression, not a key; and it
|
||||
@ -1026,7 +1026,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>hasPathOrNull</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L461" target="_blank" >hasPathOrNull</a>(java.lang.String path)</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L461" target="_blank" >hasPathOrNull</a>(java.lang.String path)</pre>
|
||||
<div class="block">Checks whether a value is present at the given path, even
|
||||
if the value is null. Most of the getters on
|
||||
<code>Config</code> will throw if you try to get a null
|
||||
@ -1074,7 +1074,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>isEmpty</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L469" target="_blank" >isEmpty</a>()</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L469" target="_blank" >isEmpty</a>()</pre>
|
||||
<div class="block">Returns true if the <code>Config</code>'s root object contains no key-value
|
||||
pairs.</div>
|
||||
<dl>
|
||||
@ -1089,7 +1089,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>entrySet</h4>
|
||||
<pre>java.util.Set<java.util.Map.Entry<java.lang.String,<a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L493" target="_blank" >entrySet</a>()</pre>
|
||||
<pre>java.util.Set<java.util.Map.Entry<java.lang.String,<a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L493" target="_blank" >entrySet</a>()</pre>
|
||||
<div class="block">Returns the set of path-value pairs, excluding any null values, found by
|
||||
recursing <a href="../../../com/typesafe/config/Config.html#root--"><code>the root object</code></a>. Note that this is very
|
||||
different from <code>root().entrySet()</code> which returns the set of
|
||||
@ -1120,7 +1120,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getIsNull</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L520" target="_blank" >getIsNull</a>(java.lang.String path)</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L520" target="_blank" >getIsNull</a>(java.lang.String path)</pre>
|
||||
<div class="block">Checks whether a value is set to null at the given path,
|
||||
but throws an exception if the value is entirely
|
||||
unset. This method will not throw if <a href="../../../com/typesafe/config/Config.html#hasPathOrNull-java.lang.String-"><code>hasPathOrNull(String)</code></a> returned true for the same path, so
|
||||
@ -1152,7 +1152,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBoolean</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L532" target="_blank" >getBoolean</a>(java.lang.String path)</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L532" target="_blank" >getBoolean</a>(java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>path</code> - path expression</dd>
|
||||
@ -1170,7 +1170,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getNumber</h4>
|
||||
<pre>java.lang.Number <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L543" target="_blank" >getNumber</a>(java.lang.String path)</pre>
|
||||
<pre>java.lang.Number <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L543" target="_blank" >getNumber</a>(java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>path</code> - path expression</dd>
|
||||
@ -1188,7 +1188,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getInt</h4>
|
||||
<pre>int <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L561" target="_blank" >getInt</a>(java.lang.String path)</pre>
|
||||
<pre>int <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L561" target="_blank" >getInt</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets the integer at the given path. If the value at the
|
||||
path has a fractional (floating point) component, it
|
||||
will be discarded and only the integer part will be
|
||||
@ -1212,7 +1212,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getLong</h4>
|
||||
<pre>long <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L578" target="_blank" >getLong</a>(java.lang.String path)</pre>
|
||||
<pre>long <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L578" target="_blank" >getLong</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets the long integer at the given path. If the value at
|
||||
the path has a fractional (floating point) component, it
|
||||
will be discarded and only the integer part will be
|
||||
@ -1235,7 +1235,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDouble</h4>
|
||||
<pre>double <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L589" target="_blank" >getDouble</a>(java.lang.String path)</pre>
|
||||
<pre>double <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L589" target="_blank" >getDouble</a>(java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>path</code> - path expression</dd>
|
||||
@ -1253,7 +1253,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getString</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L600" target="_blank" >getString</a>(java.lang.String path)</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L600" target="_blank" >getString</a>(java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>path</code> - path expression</dd>
|
||||
@ -1271,7 +1271,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getEnum</h4>
|
||||
<pre><T extends java.lang.Enum<T>> T <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L616" target="_blank" >getEnum</a>(java.lang.Class<T> enumClass,
|
||||
<pre><T extends java.lang.Enum<T>> T <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L616" target="_blank" >getEnum</a>(java.lang.Class<T> enumClass,
|
||||
java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
||||
@ -1294,7 +1294,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getObject</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L627" target="_blank" >getObject</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L627" target="_blank" >getObject</a>(java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>path</code> - path expression</dd>
|
||||
@ -1312,7 +1312,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getConfig</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L638" target="_blank" >getConfig</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L638" target="_blank" >getConfig</a>(java.lang.String path)</pre>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>path</code> - path expression</dd>
|
||||
@ -1330,7 +1330,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getAnyRef</h4>
|
||||
<pre>java.lang.Object <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L651" target="_blank" >getAnyRef</a>(java.lang.String path)</pre>
|
||||
<pre>java.lang.Object <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L651" target="_blank" >getAnyRef</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets the value at the path as an unwrapped Java boxed value (
|
||||
<code>Boolean</code>, <code>Integer</code>, and
|
||||
so on - see <a href="../../../com/typesafe/config/ConfigValue.html#unwrapped--"><code>ConfigValue.unwrapped()</code></a>).</div>
|
||||
@ -1350,7 +1350,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getValue</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L666" target="_blank" >getValue</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L666" target="_blank" >getValue</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets the value at the given path, unless the value is a
|
||||
null value or missing, in which case it throws just like
|
||||
the other getters. Use <code>get()</code> on the <a href="../../../com/typesafe/config/Config.html#root--"><code>root()</code></a> object (or other object in the tree) if you
|
||||
@ -1371,7 +1371,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBytes</h4>
|
||||
<pre>java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L686" target="_blank" >getBytes</a>(java.lang.String path)</pre>
|
||||
<pre>java.lang.Long <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L686" target="_blank" >getBytes</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a value as a size in bytes (parses special strings like "128M"). If
|
||||
the value is already a number, then it's left alone; if it's a string,
|
||||
it's parsed understanding unit suffixes such as "128K", as documented in
|
||||
@ -1396,7 +1396,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getMemorySize</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L708" target="_blank" >getMemorySize</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L708" target="_blank" >getMemorySize</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a value as an amount of memory (parses special strings like "128M"). If
|
||||
the value is already a number, then it's left alone; if it's a string,
|
||||
it's parsed understanding unit suffixes such as "128K", as documented in
|
||||
@ -1424,7 +1424,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<li class="blockList">
|
||||
<h4>getMilliseconds</h4>
|
||||
<pre>@Deprecated
|
||||
java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L729" target="_blank" >getMilliseconds</a>(java.lang.String path)</pre>
|
||||
java.lang.Long <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L729" target="_blank" >getMilliseconds</a>(java.lang.String path)</pre>
|
||||
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of release 1.1, replaced by <a href="../../../com/typesafe/config/Config.html#getDuration-java.lang.String-java.util.concurrent.TimeUnit-"><code>getDuration(String, TimeUnit)</code></a></span></div>
|
||||
<div class="block">Get value as a duration in milliseconds. If the value is already a
|
||||
number, then it's left alone; if it's a string, it's parsed understanding
|
||||
@ -1450,7 +1450,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<li class="blockList">
|
||||
<h4>getNanoseconds</h4>
|
||||
<pre>@Deprecated
|
||||
java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L749" target="_blank" >getNanoseconds</a>(java.lang.String path)</pre>
|
||||
java.lang.Long <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L749" target="_blank" >getNanoseconds</a>(java.lang.String path)</pre>
|
||||
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of release 1.1, replaced by <a href="../../../com/typesafe/config/Config.html#getDuration-java.lang.String-java.util.concurrent.TimeUnit-"><code>getDuration(String, TimeUnit)</code></a></span></div>
|
||||
<div class="block">Get value as a duration in nanoseconds. If the value is already a number
|
||||
it's taken as milliseconds and converted to nanoseconds. If it's a
|
||||
@ -1474,7 +1474,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDuration</h4>
|
||||
<pre>long <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L774" target="_blank" >getDuration</a>(java.lang.String path,
|
||||
<pre>long <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L774" target="_blank" >getDuration</a>(java.lang.String path,
|
||||
java.util.concurrent.TimeUnit unit)</pre>
|
||||
<div class="block">Gets a value as a duration in a specified
|
||||
<code>TimeUnit</code>. If the value is already a
|
||||
@ -1504,7 +1504,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDuration</h4>
|
||||
<pre>java.time.Duration <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L796" target="_blank" >getDuration</a>(java.lang.String path)</pre>
|
||||
<pre>java.time.Duration <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L796" target="_blank" >getDuration</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a value as a java.time.Duration. If the value is
|
||||
already a number, then it's taken as milliseconds; if it's
|
||||
a string, it's parsed understanding units suffixes like
|
||||
@ -1531,7 +1531,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getPeriod</h4>
|
||||
<pre>java.time.Period <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L818" target="_blank" >getPeriod</a>(java.lang.String path)</pre>
|
||||
<pre>java.time.Period <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L818" target="_blank" >getPeriod</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a value as a java.time.Period. If the value is
|
||||
already a number, then it's taken as days; if it's
|
||||
a string, it's parsed understanding units suffixes like
|
||||
@ -1558,7 +1558,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getTemporal</h4>
|
||||
<pre>java.time.temporal.TemporalAmount <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L834" target="_blank" >getTemporal</a>(java.lang.String path)</pre>
|
||||
<pre>java.time.temporal.TemporalAmount <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L834" target="_blank" >getTemporal</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a value as a java.time.temporal.TemporalAmount.
|
||||
This method will first try get get the value as a java.time.Duration, and if unsuccessful,
|
||||
then as a java.time.Period.
|
||||
@ -1581,7 +1581,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getList</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L849" target="_blank" >getList</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L849" target="_blank" >getList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value (with any element type) as a <a href="../../../com/typesafe/config/ConfigList.html" title="interface in com.typesafe.config"><code>ConfigList</code></a>, which
|
||||
implements <code>java.util.List<ConfigValue></code>. Throws if the path is
|
||||
unset or null.</div>
|
||||
@ -1602,7 +1602,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBooleanList</h4>
|
||||
<pre>java.util.List<java.lang.Boolean> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L864" target="_blank" >getBooleanList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.Boolean> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L864" target="_blank" >getBooleanList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with boolean elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to boolean.</div>
|
||||
@ -1623,7 +1623,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getNumberList</h4>
|
||||
<pre>java.util.List<java.lang.Number> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L879" target="_blank" >getNumberList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.Number> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L879" target="_blank" >getNumberList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with number elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to number.</div>
|
||||
@ -1644,7 +1644,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getIntList</h4>
|
||||
<pre>java.util.List<java.lang.Integer> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L894" target="_blank" >getIntList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.Integer> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L894" target="_blank" >getIntList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with int elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to int.</div>
|
||||
@ -1665,7 +1665,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getLongList</h4>
|
||||
<pre>java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L909" target="_blank" >getLongList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L909" target="_blank" >getLongList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with long elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to long.</div>
|
||||
@ -1686,7 +1686,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDoubleList</h4>
|
||||
<pre>java.util.List<java.lang.Double> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L924" target="_blank" >getDoubleList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.Double> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L924" target="_blank" >getDoubleList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with double elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to double.</div>
|
||||
@ -1707,7 +1707,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getStringList</h4>
|
||||
<pre>java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L939" target="_blank" >getStringList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L939" target="_blank" >getStringList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with string elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to string.</div>
|
||||
@ -1728,7 +1728,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getEnumList</h4>
|
||||
<pre><T extends java.lang.Enum<T>> java.util.List<T> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L958" target="_blank" >getEnumList</a>(java.lang.Class<T> enumClass,
|
||||
<pre><T extends java.lang.Enum<T>> java.util.List<T> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L958" target="_blank" >getEnumList</a>(java.lang.Class<T> enumClass,
|
||||
java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with <code>Enum</code> elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
@ -1753,7 +1753,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getObjectList</h4>
|
||||
<pre>java.util.List<? extends <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L973" target="_blank" >getObjectList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<? extends <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L973" target="_blank" >getObjectList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with object elements. Throws if the
|
||||
path is unset or null or not a list or contains values not
|
||||
convertible to <code>ConfigObject</code>.</div>
|
||||
@ -1774,7 +1774,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getConfigList</h4>
|
||||
<pre>java.util.List<? extends <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L988" target="_blank" >getConfigList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<? extends <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L988" target="_blank" >getConfigList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with <code>Config</code> elements.
|
||||
Throws if the path is unset or null or not a list or
|
||||
contains values not convertible to <code>Config</code>.</div>
|
||||
@ -1795,7 +1795,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getAnyRefList</h4>
|
||||
<pre>java.util.List<? extends java.lang.Object> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1003" target="_blank" >getAnyRefList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<? extends java.lang.Object> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1003" target="_blank" >getAnyRefList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with any kind of elements. Throws if the
|
||||
path is unset or null or not a list. Each element is
|
||||
"unwrapped" (see <a href="../../../com/typesafe/config/ConfigValue.html#unwrapped--"><code>ConfigValue.unwrapped()</code></a>).</div>
|
||||
@ -1816,7 +1816,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBytesList</h4>
|
||||
<pre>java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1018" target="_blank" >getBytesList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1018" target="_blank" >getBytesList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list value with elements representing a size in
|
||||
bytes. Throws if the path is unset or null or not a list
|
||||
or contains values not convertible to memory sizes.</div>
|
||||
@ -1837,7 +1837,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getMemorySizeList</h4>
|
||||
<pre>java.util.List<<a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1033" target="_blank" >getMemorySizeList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<<a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1033" target="_blank" >getMemorySizeList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list, converting each value in the list to a memory size, using the
|
||||
same rules as <a href="../../../com/typesafe/config/Config.html#getMemorySize-java.lang.String-"><code>getMemorySize(String)</code></a>.</div>
|
||||
<dl>
|
||||
@ -1860,7 +1860,7 @@ java.lang.Long <a href="https://github.com/lightbend/config/blob/692edecb5
|
||||
<li class="blockList">
|
||||
<h4>getMillisecondsList</h4>
|
||||
<pre>@Deprecated
|
||||
java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1040" target="_blank" >getMillisecondsList</a>(java.lang.String path)</pre>
|
||||
java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1040" target="_blank" >getMillisecondsList</a>(java.lang.String path)</pre>
|
||||
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of release 1.1, replaced by <a href="../../../com/typesafe/config/Config.html#getDurationList-java.lang.String-java.util.concurrent.TimeUnit-"><code>getDurationList(String, TimeUnit)</code></a></span></div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -1877,7 +1877,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<li class="blockList">
|
||||
<h4>getNanosecondsList</h4>
|
||||
<pre>@Deprecated
|
||||
java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1047" target="_blank" >getNanosecondsList</a>(java.lang.String path)</pre>
|
||||
java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1047" target="_blank" >getNanosecondsList</a>(java.lang.String path)</pre>
|
||||
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of release 1.1, replaced by <a href="../../../com/typesafe/config/Config.html#getDurationList-java.lang.String-java.util.concurrent.TimeUnit-"><code>getDurationList(String, TimeUnit)</code></a></span></div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -1893,7 +1893,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDurationList</h4>
|
||||
<pre>java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1060" target="_blank" >getDurationList</a>(java.lang.String path,
|
||||
<pre>java.util.List<java.lang.Long> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1060" target="_blank" >getDurationList</a>(java.lang.String path,
|
||||
java.util.concurrent.TimeUnit unit)</pre>
|
||||
<div class="block">Gets a list, converting each value in the list to a duration, using the
|
||||
same rules as <a href="../../../com/typesafe/config/Config.html#getDuration-java.lang.String-java.util.concurrent.TimeUnit-"><code>getDuration(String, TimeUnit)</code></a>.</div>
|
||||
@ -1914,7 +1914,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDurationList</h4>
|
||||
<pre>java.util.List<java.time.Duration> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1071" target="_blank" >getDurationList</a>(java.lang.String path)</pre>
|
||||
<pre>java.util.List<java.time.Duration> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1071" target="_blank" >getDurationList</a>(java.lang.String path)</pre>
|
||||
<div class="block">Gets a list, converting each value in the list to a duration, using the
|
||||
same rules as <a href="../../../com/typesafe/config/Config.html#getDuration-java.lang.String-"><code>getDuration(String)</code></a>.</div>
|
||||
<dl>
|
||||
@ -1933,7 +1933,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withOnlyPath</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1084" target="_blank" >withOnlyPath</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1084" target="_blank" >withOnlyPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Clone the config with only the given path (and its children) retained;
|
||||
all sibling paths are removed.
|
||||
<p>
|
||||
@ -1953,7 +1953,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withoutPath</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1096" target="_blank" >withoutPath</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1096" target="_blank" >withoutPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Clone the config with the given path removed.
|
||||
<p>
|
||||
Note that path expressions have a syntax and sometimes require quoting
|
||||
@ -1972,7 +1972,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>atPath</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1109" target="_blank" >atPath</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1109" target="_blank" >atPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Places the config inside another <code>Config</code> at the given path.
|
||||
<p>
|
||||
Note that path expressions have a syntax and sometimes require quoting
|
||||
@ -1992,7 +1992,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>atKey</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1121" target="_blank" >atKey</a>(java.lang.String key)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1121" target="_blank" >atKey</a>(java.lang.String key)</pre>
|
||||
<div class="block">Places the config inside a <code>Config</code> at the given key. See also
|
||||
atPath(). Note that a key is NOT a path expression (see
|
||||
<a href="../../../com/typesafe/config/ConfigUtil.html#joinPath-java.lang.String...-"><code>ConfigUtil.joinPath(java.lang.String...)</code></a> and <a href="../../../com/typesafe/config/ConfigUtil.html#splitPath-java.lang.String-"><code>ConfigUtil.splitPath(java.lang.String)</code></a>).</div>
|
||||
@ -2011,7 +2011,7 @@ java.util.List<java.lang.Long> <a href="https://github.com/lightbend
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withValue</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Config.java#L1138" target="_blank" >withValue</a>(java.lang.String path,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Config.java#L1138" target="_blank" >withValue</a>(java.lang.String path,
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a> value)</pre>
|
||||
<div class="block">Returns a <code>Config</code> based on this one, but with the given path set
|
||||
to the given value. Does not modify this instance (since it's immutable).
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigBeanFactory</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L11" target="_blank" >ConfigBeanFactory</a>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L11" target="_blank" >ConfigBeanFactory</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Factory for automatically creating a Java class from a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>.
|
||||
See <a href="../../../com/typesafe/config/ConfigBeanFactory.html#create-com.typesafe.config.Config-java.lang.Class-"><code>create(Config,Class)</code></a>.</div>
|
||||
@ -186,7 +186,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigBeanFactory</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L11" target="_blank" >ConfigBeanFactory</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L11" target="_blank" >ConfigBeanFactory</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -203,7 +203,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>create</h4>
|
||||
<pre>public static <T> T <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L46" target="_blank" >create</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> config,
|
||||
<pre>public static <T> T <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L46" target="_blank" >create</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> config,
|
||||
java.lang.Class<T> clazz)</pre>
|
||||
<div class="block">Creates an instance of a class, initializing its fields from a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>.
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.BadBean</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -135,7 +135,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L421" target="_blank" >ConfigException.BadBean</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L433" target="_blank" >ConfigException.BadBean</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a></pre>
|
||||
<div class="block">Some problem with a JavaBean we are trying to initialize.</div>
|
||||
<dl>
|
||||
@ -233,7 +233,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html"
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadBean</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadBean.java#L424" target="_blank" >BadBean</a>(java.lang.String message,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadBean.java#L436" target="_blank" >BadBean</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -243,7 +243,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html"
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BadBean</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadBean.java#L428" target="_blank" >BadBean</a>(java.lang.String message)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadBean.java#L440" target="_blank" >BadBean</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.BadPath</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -130,7 +130,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L201" target="_blank" >ConfigException.BadPath</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L201" target="_blank" >ConfigException.BadPath</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that a path expression was invalid. Try putting
|
||||
double quotes around path elements that contain "special" characters.</div>
|
||||
@ -244,7 +244,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L204" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L204" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
@ -256,7 +256,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L211" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L211" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
@ -267,7 +267,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L215" target="_blank" >BadPath</a>(java.lang.String path,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L215" target="_blank" >BadPath</a>(java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -278,7 +278,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L220" target="_blank" >BadPath</a>(java.lang.String path,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L220" target="_blank" >BadPath</a>(java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -288,7 +288,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L224" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L224" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.BadValue</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -130,7 +130,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L175" target="_blank" >ConfigException.BadValue</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L175" target="_blank" >ConfigException.BadValue</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that a value was messed up, for example you may have
|
||||
asked for a duration and the value can't be sensibly parsed as a
|
||||
@ -241,7 +241,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L178" target="_blank" >BadValue</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L178" target="_blank" >BadValue</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
@ -253,7 +253,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L183" target="_blank" >BadValue</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L183" target="_blank" >BadValue</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
@ -264,7 +264,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L187" target="_blank" >BadValue</a>(java.lang.String path,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L187" target="_blank" >BadValue</a>(java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -275,7 +275,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L191" target="_blank" >BadValue</a>(java.lang.String path,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L191" target="_blank" >BadValue</a>(java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.BugOrBroken</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -134,7 +134,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L236" target="_blank" >ConfigException.BugOrBroken</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L236" target="_blank" >ConfigException.BugOrBroken</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that there's a bug in something (possibly the
|
||||
library itself) or the runtime environment is broken. This exception
|
||||
@ -234,7 +234,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BugOrBroken</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BugOrBroken.java#L239" target="_blank" >BugOrBroken</a>(java.lang.String message,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BugOrBroken.java#L239" target="_blank" >BugOrBroken</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -244,7 +244,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BugOrBroken</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.BugOrBroken.java#L243" target="_blank" >BugOrBroken</a>(java.lang.String message)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BugOrBroken.java#L243" target="_blank" >BugOrBroken</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.Generic</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -130,7 +130,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L436" target="_blank" >ConfigException.Generic</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L448" target="_blank" >ConfigException.Generic</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception that doesn't fall into any other category.</div>
|
||||
<dl>
|
||||
@ -226,7 +226,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Generic</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Generic.java#L439" target="_blank" >Generic</a>(java.lang.String message,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Generic.java#L451" target="_blank" >Generic</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -236,7 +236,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Generic</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Generic.java#L443" target="_blank" >Generic</a>(java.lang.String message)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Generic.java#L455" target="_blank" >Generic</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.IO</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -130,7 +130,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L252" target="_blank" >ConfigException.IO</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L252" target="_blank" >ConfigException.IO</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that there was an IO error.</div>
|
||||
<dl>
|
||||
@ -228,7 +228,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>IO</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.IO.java#L255" target="_blank" >IO</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.IO.java#L255" target="_blank" >IO</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -239,7 +239,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>IO</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.IO.java#L259" target="_blank" >IO</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.IO.java#L259" target="_blank" >IO</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.Missing</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -134,7 +134,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L121" target="_blank" >ConfigException.Missing</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L121" target="_blank" >ConfigException.Missing</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicates that the setting was never set to anything, not even
|
||||
null.</div>
|
||||
@ -245,7 +245,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L124" target="_blank" >Missing</a>(java.lang.String path,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L124" target="_blank" >Missing</a>(java.lang.String path,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -255,7 +255,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L129" target="_blank" >Missing</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L129" target="_blank" >Missing</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -265,7 +265,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L133" target="_blank" >Missing</a>(java.lang.String path)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L133" target="_blank" >Missing</a>(java.lang.String path)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="Missing-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.Throwable-">
|
||||
@ -274,7 +274,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L137" target="_blank" >Missing</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L137" target="_blank" >Missing</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.NotResolved</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -135,7 +135,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L304" target="_blank" >ConfigException.NotResolved</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L316" target="_blank" >ConfigException.NotResolved</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a></pre>
|
||||
<div class="block">Exception indicating that you tried to use a function that requires
|
||||
substitutions to be resolved, but substitutions have not been resolved
|
||||
@ -236,7 +236,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html"
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>NotResolved</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.NotResolved.java#L307" target="_blank" >NotResolved</a>(java.lang.String message,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.NotResolved.java#L319" target="_blank" >NotResolved</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -246,7 +246,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html"
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>NotResolved</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.NotResolved.java#L311" target="_blank" >NotResolved</a>(java.lang.String message)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.NotResolved.java#L323" target="_blank" >NotResolved</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.Null</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -135,7 +135,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L147" target="_blank" >ConfigException.Null</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L147" target="_blank" >ConfigException.Null</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a></pre>
|
||||
<div class="block">Exception indicates that the setting was treated as missing because it
|
||||
was set to null.</div>
|
||||
@ -236,7 +236,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.Missing.html" titl
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Null</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Null.java#L159" target="_blank" >Null</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Null.java#L159" target="_blank" >Null</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String expected,
|
||||
java.lang.Throwable cause)</pre>
|
||||
@ -248,7 +248,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.Missing.html" titl
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Null</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Null.java#L164" target="_blank" >Null</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Null.java#L164" target="_blank" >Null</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String expected)</pre>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.Parse</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -134,7 +134,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L268" target="_blank" >ConfigException.Parse</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L268" target="_blank" >ConfigException.Parse</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that there was a parse error.</div>
|
||||
<dl>
|
||||
@ -232,7 +232,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Parse</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Parse.java#L271" target="_blank" >Parse</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Parse.java#L271" target="_blank" >Parse</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -243,7 +243,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Parse</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.Parse.java#L275" target="_blank" >Parse</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Parse.java#L275" target="_blank" >Parse</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.UnresolvedSubstitution</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -18,6 +18,12 @@
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":10};
|
||||
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
var tableTab = "tableTab";
|
||||
var activeTableTab = "activeTableTab";
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
@ -70,13 +76,13 @@
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
@ -135,7 +141,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L284" target="_blank" >ConfigException.UnresolvedSubstitution</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L284" target="_blank" >ConfigException.UnresolvedSubstitution</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a></pre>
|
||||
<div class="block">Exception indicating that a substitution did not resolve to anything.
|
||||
Thrown by <a href="../../../com/typesafe/config/Config.html#resolve--"><code>Config.resolve()</code></a>.</div>
|
||||
@ -193,6 +199,17 @@ extends <a href="../../../com/typesafe/config/ConfigException.Parse.html" title=
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code><a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html#addExtraDetail-java.lang.String-">addExtraDetail</a></span>(java.lang.String extra)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
@ -234,7 +251,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.Parse.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>UnresolvedSubstitution</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.UnresolvedSubstitution.java#L287" target="_blank" >UnresolvedSubstitution</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.UnresolvedSubstitution.java#L289" target="_blank" >UnresolvedSubstitution</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String detail,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -245,12 +262,29 @@ extends <a href="../../../com/typesafe/config/ConfigException.Parse.html" title=
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>UnresolvedSubstitution</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.UnresolvedSubstitution.java#L291" target="_blank" >UnresolvedSubstitution</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.UnresolvedSubstitution.java#L294" target="_blank" >UnresolvedSubstitution</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String detail)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="addExtraDetail-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>addExtraDetail</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.UnresolvedSubstitution.java#L303" target="_blank" >addExtraDetail</a>(java.lang.String extra)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -304,13 +338,13 @@ extends <a href="../../../com/typesafe/config/ConfigException.Parse.html" title=
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
<li><a href="#method.summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.ValidationFailed</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -136,7 +136,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L384" target="_blank" >ConfigException.ValidationFailed</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L396" target="_blank" >ConfigException.ValidationFailed</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that <a href="../../../com/typesafe/config/Config.html#checkValid-com.typesafe.config.Config-java.lang.String...-"><code>Config.checkValid(com.typesafe.config.Config, java.lang.String...)</code></a> found validity
|
||||
problems. The problems are available via the <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html#problems--"><code>problems()</code></a> method.
|
||||
@ -242,7 +242,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ValidationFailed</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationFailed.java#L389" target="_blank" >ValidationFailed</a>(java.lang.Iterable<<a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>> problems)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationFailed.java#L401" target="_blank" >ValidationFailed</a>(java.lang.Iterable<<a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>> problems)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -259,7 +259,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>problems</h4>
|
||||
<pre>public java.lang.Iterable<<a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationFailed.java#L394" target="_blank" >problems</a>()</pre>
|
||||
<pre>public java.lang.Iterable<<a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationFailed.java#L406" target="_blank" >problems</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.ValidationProblem</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -116,7 +116,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L321" target="_blank" >ConfigException.ValidationProblem</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L333" target="_blank" >ConfigException.ValidationProblem</a>
|
||||
extends java.lang.Object
|
||||
implements java.io.Serializable</pre>
|
||||
<div class="block">Information about a problem that occurred in <a href="../../../com/typesafe/config/Config.html#checkValid-com.typesafe.config.Config-java.lang.String...-"><code>Config.checkValid(com.typesafe.config.Config, java.lang.String...)</code></a>. A
|
||||
@ -214,7 +214,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ValidationProblem</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L327" target="_blank" >ValidationProblem</a>(java.lang.String path,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L339" target="_blank" >ValidationProblem</a>(java.lang.String path,
|
||||
<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String problem)</pre>
|
||||
</li>
|
||||
@ -233,7 +233,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>path</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L337" target="_blank" >path</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L349" target="_blank" >path</a>()</pre>
|
||||
<div class="block">Returns the config setting causing the problem.</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -247,7 +247,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>origin</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L346" target="_blank" >origin</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L358" target="_blank" >origin</a>()</pre>
|
||||
<div class="block">Returns where the problem occurred (origin may include info on the
|
||||
file, line number, etc.).</div>
|
||||
<dl>
|
||||
@ -262,7 +262,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>problem</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L354" target="_blank" >problem</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L366" target="_blank" >problem</a>()</pre>
|
||||
<div class="block">Returns a description of the problem.</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -276,7 +276,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>toString</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L373" target="_blank" >toString</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L385" target="_blank" >toString</a>()</pre>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException.WrongType</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -130,7 +130,7 @@
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L96" target="_blank" >ConfigException.WrongType</a>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L96" target="_blank" >ConfigException.WrongType</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that the type of a value does not match the type you
|
||||
requested.</div>
|
||||
@ -242,7 +242,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>WrongType</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L99" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L99" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String expected,
|
||||
java.lang.String actual,
|
||||
@ -255,7 +255,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>WrongType</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L104" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L104" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String expected,
|
||||
java.lang.String actual)</pre>
|
||||
@ -267,7 +267,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>WrongType</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L108" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L108" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -278,7 +278,7 @@ extends <a href="../../../com/typesafe/config/ConfigException.html" title="class
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>WrongType</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L112" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.WrongType.java#L112" target="_blank" >WrongType</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigException</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -131,7 +131,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public abstract class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L16" target="_blank" >ConfigException</a>
|
||||
<pre>public abstract class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L16" target="_blank" >ConfigException</a>
|
||||
extends java.lang.RuntimeException
|
||||
implements java.io.Serializable</pre>
|
||||
<div class="block">All exceptions thrown by the library are subclasses of
|
||||
@ -343,7 +343,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>ConfigException</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L21" target="_blank" >ConfigException</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L21" target="_blank" >ConfigException</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
@ -354,7 +354,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>ConfigException</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L27" target="_blank" >ConfigException</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L27" target="_blank" >ConfigException</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -364,7 +364,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>ConfigException</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L31" target="_blank" >ConfigException</a>(java.lang.String message,
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L31" target="_blank" >ConfigException</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -374,7 +374,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigException</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L36" target="_blank" >ConfigException</a>(java.lang.String message)</pre>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L36" target="_blank" >ConfigException</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -391,7 +391,7 @@ implements java.io.Serializable</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>origin</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L49" target="_blank" >origin</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L49" target="_blank" >origin</a>()</pre>
|
||||
<div class="block">Returns an "origin" (such as a filename and line number) for the
|
||||
exception, or null if none is available. If there's no sensible origin
|
||||
for a given exception, or the kind of exception doesn't meaningfully
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigIncludeContext</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L19" target="_blank" >ConfigIncludeContext</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L19" target="_blank" >ConfigIncludeContext</a></pre>
|
||||
<div class="block">Context provided to a <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a>; this interface is only useful
|
||||
inside a <code>ConfigIncluder</code> implementation, and is not intended for apps
|
||||
to implement.
|
||||
@ -171,7 +171,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>relativeTo</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L36" target="_blank" >relativeTo</a>(java.lang.String filename)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L36" target="_blank" >relativeTo</a>(java.lang.String filename)</pre>
|
||||
<div class="block">Tries to find a name relative to whatever is doing the including, for
|
||||
example in the same directory as the file doing the including. Returns
|
||||
null if it can't meaningfully create a relative name. The returned
|
||||
@ -196,7 +196,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseOptions</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L45" target="_blank" >parseOptions</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L45" target="_blank" >parseOptions</a>()</pre>
|
||||
<div class="block">Parse options to use (if you use another method to get a
|
||||
<a href="../../../com/typesafe/config/ConfigParseable.html" title="interface in com.typesafe.config"><code>ConfigParseable</code></a> then use <a href="../../../com/typesafe/config/ConfigParseable.html#options--"><code>ConfigParseable.options()</code></a>
|
||||
instead though).</div>
|
||||
@ -212,7 +212,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>setParseOptions</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L55" target="_blank" >setParseOptions</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncludeContext.java#L55" target="_blank" >setParseOptions</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<div class="block">Copy this <a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config"><code>ConfigIncludeContext</code></a> giving it a new value for its parseOptions.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigIncluder</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluder.java#L13" target="_blank" >ConfigIncluder</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluder.java#L13" target="_blank" >ConfigIncluder</a></pre>
|
||||
<div class="block">Implement this interface and provide an instance to
|
||||
<a href="../../../com/typesafe/config/ConfigParseOptions.html#setIncluder-com.typesafe.config.ConfigIncluder-"><code>ConfigParseOptions.setIncluder()</code></a> to
|
||||
customize handling of <code>include</code> statements in config files. You may
|
||||
@ -158,7 +158,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withFallback</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluder.java#L29" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> fallback)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluder.java#L29" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> fallback)</pre>
|
||||
<div class="block">Returns a new includer that falls back to the given includer. This is how
|
||||
you can obtain the default includer; it will be provided as a fallback.
|
||||
It's up to your includer to chain to it if you want to. You might want to
|
||||
@ -183,7 +183,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>include</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluder.java#L49" target="_blank" >include</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluder.java#L49" target="_blank" >include</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
java.lang.String what)</pre>
|
||||
<div class="block">Parses another item to be included. The returned object typically would
|
||||
not have substitutions resolved. You can throw a ConfigException here to
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigIncluderClasspath</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluderClasspath.java#L12" target="_blank" >ConfigIncluderClasspath</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluderClasspath.java#L12" target="_blank" >ConfigIncluderClasspath</a></pre>
|
||||
<div class="block">Implement this <em>in addition to</em> <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> if you want to
|
||||
support inclusion of files with the <code>include classpath("resource")</code>
|
||||
syntax. If you do not implement this but do implement <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a>,
|
||||
@ -151,7 +151,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>includeResources</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluderClasspath.java#L24" target="_blank" >includeResources</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluderClasspath.java#L24" target="_blank" >includeResources</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
java.lang.String what)</pre>
|
||||
<div class="block">Parses another item to be included. The returned object typically would
|
||||
not have substitutions resolved. You can throw a ConfigException here to
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigIncluderFile</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluderFile.java#L14" target="_blank" >ConfigIncluderFile</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluderFile.java#L14" target="_blank" >ConfigIncluderFile</a></pre>
|
||||
<div class="block">Implement this <em>in addition to</em> <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> if you want to
|
||||
support inclusion of files with the <code>include file("filename")</code> syntax.
|
||||
If you do not implement this but do implement <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a>,
|
||||
@ -151,7 +151,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>includeFile</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluderFile.java#L26" target="_blank" >includeFile</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluderFile.java#L26" target="_blank" >includeFile</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
java.io.File what)</pre>
|
||||
<div class="block">Parses another item to be included. The returned object typically would
|
||||
not have substitutions resolved. You can throw a ConfigException here to
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigIncluderURL</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluderURL.java#L14" target="_blank" >ConfigIncluderURL</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluderURL.java#L14" target="_blank" >ConfigIncluderURL</a></pre>
|
||||
<div class="block">Implement this <em>in addition to</em> <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> if you want to
|
||||
support inclusion of files with the <code>include url("http://example.com")</code>
|
||||
syntax. If you do not implement this but do implement <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a>,
|
||||
@ -151,7 +151,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>includeURL</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigIncluderURL.java#L26" target="_blank" >includeURL</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigIncluderURL.java#L26" target="_blank" >includeURL</a>(<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config">ConfigIncludeContext</a> context,
|
||||
java.net.URL what)</pre>
|
||||
<div class="block">Parses another item to be included. The returned object typically would
|
||||
not have substitutions resolved. You can throw a ConfigException here to
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigList</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigList.java#L35" target="_blank" >ConfigList</a>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigList.java#L35" target="_blank" >ConfigList</a>
|
||||
extends java.util.List<<a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a>>, <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a></pre>
|
||||
<div class="block">Subtype of <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a> representing a list value, as in JSON's
|
||||
<code>[1,2,3]</code> syntax.
|
||||
@ -211,7 +211,7 @@ extends java.util.List<<a href="../../../com/typesafe/config/ConfigValue.html
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>unwrapped</h4>
|
||||
<pre>java.util.List<java.lang.Object> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigList.java#L44" target="_blank" >unwrapped</a>()</pre>
|
||||
<pre>java.util.List<java.lang.Object> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigList.java#L44" target="_blank" >unwrapped</a>()</pre>
|
||||
<div class="block">Recursively unwraps the list, returning a list of plain Java values such
|
||||
as Integer or String or whatever is in the list.</div>
|
||||
<dl>
|
||||
@ -228,7 +228,7 @@ extends java.util.List<<a href="../../../com/typesafe/config/ConfigValue.html
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withOrigin</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigList.java#L47" target="_blank" >withOrigin</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigList.java#L47" target="_blank" >withOrigin</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/typesafe/config/ConfigValue.html#withOrigin-com.typesafe.config.ConfigOrigin-">ConfigValue</a></code></span></div>
|
||||
<div class="block">Returns a <code>ConfigValue</code> based on this one, but with the given
|
||||
origin. This is useful when you are parsing a new format of file or setting
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigLoadingStrategy</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigLoadingStrategy.java#L12" target="_blank" >ConfigLoadingStrategy</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigLoadingStrategy.java#L12" target="_blank" >ConfigLoadingStrategy</a></pre>
|
||||
<div class="block">This method allows you to alter default config loading strategy for all the code which
|
||||
calls <a href="../../../com/typesafe/config/ConfigFactory.html#load-java.lang.String-"><code>ConfigFactory.load(java.lang.String)</code></a>.
|
||||
|
||||
@ -157,7 +157,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>parseApplicationConfig</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigLoadingStrategy.java#L19" target="_blank" >parseApplicationConfig</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> parseOptions)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigLoadingStrategy.java#L19" target="_blank" >parseApplicationConfig</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> parseOptions)</pre>
|
||||
<div class="block">This method must load and parse application config.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigMemorySize</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -18,7 +18,7 @@
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":10,"i1":10,"i2":9,"i3":10,"i4":10};
|
||||
var methods = {"i0":10,"i1":10,"i2":9,"i3":9,"i4":10,"i5":10,"i6":10};
|
||||
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
@ -108,10 +108,10 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L13" target="_blank" >ConfigMemorySize</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L15" target="_blank" >ConfigMemorySize</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">An immutable class representing an amount of memory. Use
|
||||
static factory methods such as <a href="../../../com/typesafe/config/ConfigMemorySize.html#ofBytes-long-"><code>ofBytes(long)</code></a> to create instances.</div>
|
||||
static factory methods such as <a href="../../../com/typesafe/config/ConfigMemorySize.html#ofBytes-java.math.BigInteger-"><code>ofBytes(BigInteger)</code></a> to create instances.</div>
|
||||
<dl>
|
||||
<dt><span class="simpleTagLabel">Since:</span></dt>
|
||||
<dd>1.3.0</dd>
|
||||
@ -144,18 +144,31 @@ extends java.lang.Object</pre>
|
||||
</tr>
|
||||
<tr id="i2" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config">ConfigMemorySize</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigMemorySize.html#ofBytes-long-">ofBytes</a></span>(long bytes)</code>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigMemorySize.html#ofBytes-java.math.BigInteger-">ofBytes</a></span>(java.math.BigInteger bytes)</code>
|
||||
<div class="block">Constructs a ConfigMemorySize representing the given
|
||||
number of bytes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i3" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config">ConfigMemorySize</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigMemorySize.html#ofBytes-long-">ofBytes</a></span>(long bytes)</code>
|
||||
<div class="block">Constructs a ConfigMemorySize representing the given
|
||||
number of bytes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i4" class="altColor">
|
||||
<td class="colFirst"><code>long</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigMemorySize.html#toBytes--">toBytes</a></span>()</code>
|
||||
<div class="block">Gets the size in bytes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i4" class="altColor">
|
||||
<tr id="i5" class="rowColor">
|
||||
<td class="colFirst"><code>java.math.BigInteger</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigMemorySize.html#toBytesBigInteger--">toBytesBigInteger</a></span>()</code>
|
||||
<div class="block">Gets the size in bytes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i6" class="altColor">
|
||||
<td class="colFirst"><code>java.lang.String</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigMemorySize.html#toString--">toString</a></span>()</code> </td>
|
||||
</tr>
|
||||
@ -181,13 +194,13 @@ extends java.lang.Object</pre>
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="ofBytes-long-">
|
||||
<a name="ofBytes-java.math.BigInteger-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>ofBytes</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L29" target="_blank" >ofBytes</a>(long bytes)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L32" target="_blank" >ofBytes</a>(java.math.BigInteger bytes)</pre>
|
||||
<div class="block">Constructs a ConfigMemorySize representing the given
|
||||
number of bytes.</div>
|
||||
<dl>
|
||||
@ -200,29 +213,68 @@ extends java.lang.Object</pre>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="ofBytes-long-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>ofBytes</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L42" target="_blank" >ofBytes</a>(long bytes)</pre>
|
||||
<div class="block">Constructs a ConfigMemorySize representing the given
|
||||
number of bytes.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>bytes</code> - a number of bytes</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>an instance representing the number of bytes</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="toBytes--">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>toBytes</h4>
|
||||
<pre>public long <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L38" target="_blank" >toBytes</a>()</pre>
|
||||
<pre>public long <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L55" target="_blank" >toBytes</a>()</pre>
|
||||
<div class="block">Gets the size in bytes.</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>how many bytes</dd>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
<dd><code>java.lang.IllegalArgumentException</code> - when memory value
|
||||
in bytes doesn't fit in a long value. Consider using
|
||||
<a href="../../../com/typesafe/config/ConfigMemorySize.html#toBytesBigInteger--"><code>toBytesBigInteger()</code></a> in this case.</dd>
|
||||
<dt><span class="simpleTagLabel">Since:</span></dt>
|
||||
<dd>1.3.0</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="toBytesBigInteger--">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>toBytesBigInteger</h4>
|
||||
<pre>public java.math.BigInteger <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L71" target="_blank" >toBytesBigInteger</a>()</pre>
|
||||
<div class="block">Gets the size in bytes. The behavior of this method
|
||||
is the same as that of the <a href="../../../com/typesafe/config/ConfigMemorySize.html#toBytes--"><code>toBytes()</code></a> method,
|
||||
except that the number of bytes returned as a
|
||||
BigInteger value. Use it when memory value in bytes
|
||||
doesn't fit in a long value.</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>how many bytes</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="toString--">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>toString</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L43" target="_blank" >toString</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L76" target="_blank" >toString</a>()</pre>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
@ -235,7 +287,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>equals</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L48" target="_blank" >equals</a>(java.lang.Object other)</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L81" target="_blank" >equals</a>(java.lang.Object other)</pre>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
||||
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
|
||||
@ -248,7 +300,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>hashCode</h4>
|
||||
<pre>public int <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L57" target="_blank" >hashCode</a>()</pre>
|
||||
<pre>public int <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMemorySize.java#L90" target="_blank" >hashCode</a>()</pre>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
||||
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigMergeable</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMergeable.java#L19" target="_blank" >ConfigMergeable</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMergeable.java#L19" target="_blank" >ConfigMergeable</a></pre>
|
||||
<div class="block">Marker for types whose instances can be merged, that is <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a> and
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a>. Instances of <code>Config</code> and <code>ConfigValue</code> can
|
||||
be combined into a single new instance using the
|
||||
@ -162,7 +162,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withFallback</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigMergeable.java#L71" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigMergeable.java#L71" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<div class="block">Returns a new value computed by merging this value with another, with
|
||||
keys in this value "winning" over the other one.
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigObject</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L63" target="_blank" >ConfigObject</a>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L63" target="_blank" >ConfigObject</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a>, java.util.Map<java.lang.String,<a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a>></pre>
|
||||
<div class="block">Subtype of <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a> representing an object (AKA dictionary or map)
|
||||
value, as in JSON's curly brace <code>{ "a" : 42 }</code> syntax.
|
||||
@ -283,7 +283,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>toConfig</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L72" target="_blank" >toConfig</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L72" target="_blank" >toConfig</a>()</pre>
|
||||
<div class="block">Converts this object to a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a> instance, enabling you to use
|
||||
path expressions to find values in the object. This is a constant-time
|
||||
operation (it is not proportional to the size of the object).</div>
|
||||
@ -299,7 +299,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>unwrapped</h4>
|
||||
<pre>java.util.Map<java.lang.String,java.lang.Object> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L81" target="_blank" >unwrapped</a>()</pre>
|
||||
<pre>java.util.Map<java.lang.String,java.lang.Object> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L81" target="_blank" >unwrapped</a>()</pre>
|
||||
<div class="block">Recursively unwraps the object, returning a map from String to whatever
|
||||
plain Java values are unwrapped from the object's values.</div>
|
||||
<dl>
|
||||
@ -316,7 +316,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withFallback</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L84" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L84" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/typesafe/config/ConfigMergeable.html#withFallback-com.typesafe.config.ConfigMergeable-">ConfigMergeable</a></code></span></div>
|
||||
<div class="block">Returns a new value computed by merging this value with another, with
|
||||
keys in this value "winning" over the other one.
|
||||
@ -381,7 +381,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>get</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L98" target="_blank" >get</a>(java.lang.Object key)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L98" target="_blank" >get</a>(java.lang.Object key)</pre>
|
||||
<div class="block">Gets a <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a> at the given key, or returns null if there is
|
||||
no value. The returned <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a> may have
|
||||
<a href="../../../com/typesafe/config/ConfigValueType.html#NULL"><code>ConfigValueType.NULL</code></a> or any other type, and the passed-in key
|
||||
@ -402,7 +402,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withOnlyKey</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L108" target="_blank" >withOnlyKey</a>(java.lang.String key)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L108" target="_blank" >withOnlyKey</a>(java.lang.String key)</pre>
|
||||
<div class="block">Clone the object with only the given key (and its children) retained; all
|
||||
sibling keys are removed.</div>
|
||||
<dl>
|
||||
@ -419,7 +419,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withoutKey</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L117" target="_blank" >withoutKey</a>(java.lang.String key)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L117" target="_blank" >withoutKey</a>(java.lang.String key)</pre>
|
||||
<div class="block">Clone the object with the given key removed.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -435,7 +435,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withValue</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L131" target="_blank" >withValue</a>(java.lang.String key,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L131" target="_blank" >withValue</a>(java.lang.String key,
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a> value)</pre>
|
||||
<div class="block">Returns a <code>ConfigObject</code> based on this one, but with the given key
|
||||
set to the given value. Does not modify this instance (since it's
|
||||
@ -456,7 +456,7 @@ extends <a href="../../../com/typesafe/config/ConfigValue.html" title="interface
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withOrigin</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigObject.java#L134" target="_blank" >withOrigin</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigObject.java#L134" target="_blank" >withOrigin</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/typesafe/config/ConfigValue.html#withOrigin-com.typesafe.config.ConfigOrigin-">ConfigValue</a></code></span></div>
|
||||
<div class="block">Returns a <code>ConfigValue</code> based on this one, but with the given
|
||||
origin. This is useful when you are parsing a new format of file or setting
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigOrigin</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L30" target="_blank" >ConfigOrigin</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L30" target="_blank" >ConfigOrigin</a></pre>
|
||||
<div class="block">Represents the origin (such as filename and line number) of a
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a> for use in error messages. Obtain the origin of a value
|
||||
with <a href="../../../com/typesafe/config/ConfigValue.html#origin--"><code>ConfigValue.origin()</code></a>. Exceptions may have an origin, see
|
||||
@ -208,7 +208,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>description</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L37" target="_blank" >description</a>()</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L37" target="_blank" >description</a>()</pre>
|
||||
<div class="block">Returns a string describing the origin of a value or exception. This will
|
||||
never return null.</div>
|
||||
<dl>
|
||||
@ -223,7 +223,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>filename</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L45" target="_blank" >filename</a>()</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L45" target="_blank" >filename</a>()</pre>
|
||||
<div class="block">Returns a filename describing the origin. This will return null if the
|
||||
origin was not a file.</div>
|
||||
<dl>
|
||||
@ -238,7 +238,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>url</h4>
|
||||
<pre>java.net.URL <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L53" target="_blank" >url</a>()</pre>
|
||||
<pre>java.net.URL <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L53" target="_blank" >url</a>()</pre>
|
||||
<div class="block">Returns a URL describing the origin. This will return null if the origin
|
||||
has no meaningful URL.</div>
|
||||
<dl>
|
||||
@ -253,7 +253,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>resource</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L61" target="_blank" >resource</a>()</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L61" target="_blank" >resource</a>()</pre>
|
||||
<div class="block">Returns a classpath resource name describing the origin. This will return
|
||||
null if the origin was not a classpath resource.</div>
|
||||
<dl>
|
||||
@ -268,7 +268,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>lineNumber</h4>
|
||||
<pre>int <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L69" target="_blank" >lineNumber</a>()</pre>
|
||||
<pre>int <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L69" target="_blank" >lineNumber</a>()</pre>
|
||||
<div class="block">Returns a line number where the value or exception originated. This will
|
||||
return -1 if there's no meaningful line number.</div>
|
||||
<dl>
|
||||
@ -283,7 +283,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>comments</h4>
|
||||
<pre>java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L81" target="_blank" >comments</a>()</pre>
|
||||
<pre>java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L81" target="_blank" >comments</a>()</pre>
|
||||
<div class="block">Returns any comments that appeared to "go with" this place in the file.
|
||||
Often an empty list, but never null. The details of this are subject to
|
||||
change, but at the moment comments that are immediately before an array
|
||||
@ -302,7 +302,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withComments</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L98" target="_blank" >withComments</a>(java.util.List<java.lang.String> comments)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L98" target="_blank" >withComments</a>(java.util.List<java.lang.String> comments)</pre>
|
||||
<div class="block">Returns a <code>ConfigOrigin</code> based on this one, but with the given
|
||||
comments. Does not modify this instance or any <code>ConfigValue</code>s with
|
||||
this origin (since they are immutable). To set the returned origin to a
|
||||
@ -327,7 +327,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withLineNumber</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L117" target="_blank" >withLineNumber</a>(int lineNumber)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOrigin.java#L117" target="_blank" >withLineNumber</a>(int lineNumber)</pre>
|
||||
<div class="block">Returns a <code>ConfigOrigin</code> based on this one, but with the given
|
||||
line number. This origin must be a FILE, URL or RESOURCE. Does not modify
|
||||
this instance or any <code>ConfigValue</code>s with this origin (since they are
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigOriginFactory</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L16" target="_blank" >ConfigOriginFactory</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L16" target="_blank" >ConfigOriginFactory</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">This class contains some static factory methods for building a <a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config"><code>ConfigOrigin</code></a>. <code>ConfigOrigin</code>s are automatically created when you
|
||||
call other API methods to get a <code>ConfigValue</code> or <code>Config</code>.
|
||||
@ -189,7 +189,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newSimple</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L29" target="_blank" >newSimple</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L29" target="_blank" >newSimple</a>()</pre>
|
||||
<div class="block">Returns the default origin for values when no other information is
|
||||
provided. This is the origin used in <a href="../../../com/typesafe/config/ConfigValueFactory.html" title="class in com.typesafe.config"><code>#fromAnyRef(Object)</code></a>.</div>
|
||||
<dl>
|
||||
@ -206,7 +206,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newSimple</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L41" target="_blank" >newSimple</a>(java.lang.String description)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L41" target="_blank" >newSimple</a>(java.lang.String description)</pre>
|
||||
<div class="block">Returns an origin with the given description.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -224,7 +224,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newFile</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L53" target="_blank" >newFile</a>(java.lang.String filename)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L53" target="_blank" >newFile</a>(java.lang.String filename)</pre>
|
||||
<div class="block">Creates a file origin with the given filename.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -242,7 +242,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>newURL</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L65" target="_blank" >newURL</a>(java.net.URL url)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigOriginFactory.java#L65" target="_blank" >newURL</a>(java.net.URL url)</pre>
|
||||
<div class="block">Creates a url origin with the given URL object.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigParseOptions</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L25" target="_blank" >ConfigParseOptions</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L25" target="_blank" >ConfigParseOptions</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">A set of options related to parsing.
|
||||
|
||||
@ -259,7 +259,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>defaults</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L47" target="_blank" >defaults</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L47" target="_blank" >defaults</a>()</pre>
|
||||
<div class="block">Gets an instance of <code>ConfigParseOptions</code> with all fields
|
||||
set to the default values. Start with this instance and make any
|
||||
changes you need.</div>
|
||||
@ -275,7 +275,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setSyntax</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L59" target="_blank" >setSyntax</a>(<a href="../../../com/typesafe/config/ConfigSyntax.html" title="enum in com.typesafe.config">ConfigSyntax</a> syntax)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L59" target="_blank" >setSyntax</a>(<a href="../../../com/typesafe/config/ConfigSyntax.html" title="enum in com.typesafe.config">ConfigSyntax</a> syntax)</pre>
|
||||
<div class="block">Set the file format. If set to null, try to guess from any available
|
||||
filename extension; if guessing fails, assume <a href="../../../com/typesafe/config/ConfigSyntax.html#CONF"><code>ConfigSyntax.CONF</code></a>.</div>
|
||||
<dl>
|
||||
@ -292,7 +292,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setSyntaxFromFilename</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L74" target="_blank" >setSyntaxFromFilename</a>(java.lang.String filename)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L74" target="_blank" >setSyntaxFromFilename</a>(java.lang.String filename)</pre>
|
||||
<div class="block">Set the file format. If set to null, assume <a href="../../../com/typesafe/config/ConfigSyntax.html#CONF"><code>ConfigSyntax.CONF</code></a>.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -308,7 +308,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getSyntax</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L83" target="_blank" >getSyntax</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L83" target="_blank" >getSyntax</a>()</pre>
|
||||
<div class="block">Gets the current syntax option, which may be null for "any".</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -322,7 +322,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setOriginDescription</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L97" target="_blank" >setOriginDescription</a>(java.lang.String originDescription)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L97" target="_blank" >setOriginDescription</a>(java.lang.String originDescription)</pre>
|
||||
<div class="block">Set a description for the thing being parsed. In most cases this will be
|
||||
set up for you to something like the filename, but if you provide just an
|
||||
input stream you might want to improve on it. Set to null to allow the
|
||||
@ -342,7 +342,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getOriginDescription</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L113" target="_blank" >getOriginDescription</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L113" target="_blank" >getOriginDescription</a>()</pre>
|
||||
<div class="block">Gets the current origin description, which may be null for "automatic".</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -356,7 +356,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setAllowMissing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L134" target="_blank" >setAllowMissing</a>(boolean allowMissing)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L134" target="_blank" >setAllowMissing</a>(boolean allowMissing)</pre>
|
||||
<div class="block">Set to false to throw an exception if the item being parsed (for example
|
||||
a file) is missing. Set to true to just return an empty document in that
|
||||
case. Note that this setting applies on only to fetching the root document,
|
||||
@ -375,7 +375,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getAllowMissing</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L146" target="_blank" >getAllowMissing</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L146" target="_blank" >getAllowMissing</a>()</pre>
|
||||
<div class="block">Gets the current "allow missing" flag.</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -389,7 +389,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setIncluder</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L157" target="_blank" >setIncluder</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> includer)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L157" target="_blank" >setIncluder</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> includer)</pre>
|
||||
<div class="block">Set a <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> which customizes how includes are handled.
|
||||
null means to use the default includer.</div>
|
||||
<dl>
|
||||
@ -406,7 +406,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>prependIncluder</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L174" target="_blank" >prependIncluder</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> includer)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L174" target="_blank" >prependIncluder</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> includer)</pre>
|
||||
<div class="block">Prepends a <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> which customizes how
|
||||
includes are handled. To prepend your includer, the
|
||||
library calls <a href="../../../com/typesafe/config/ConfigIncluder.html#withFallback-com.typesafe.config.ConfigIncluder-"><code>ConfigIncluder.withFallback(com.typesafe.config.ConfigIncluder)</code></a> on your
|
||||
@ -425,7 +425,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>appendIncluder</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L193" target="_blank" >appendIncluder</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> includer)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L193" target="_blank" >appendIncluder</a>(<a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config">ConfigIncluder</a> includer)</pre>
|
||||
<div class="block">Appends a <a href="../../../com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> which customizes how
|
||||
includes are handled. To append, the library calls <a href="../../../com/typesafe/config/ConfigIncluder.html#withFallback-com.typesafe.config.ConfigIncluder-"><code>ConfigIncluder.withFallback(com.typesafe.config.ConfigIncluder)</code></a> on the existing includer.</div>
|
||||
<dl>
|
||||
@ -442,7 +442,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getIncluder</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L208" target="_blank" >getIncluder</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L208" target="_blank" >getIncluder</a>()</pre>
|
||||
<div class="block">Gets the current includer (will be null for the default includer).</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -456,7 +456,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setClassLoader</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L221" target="_blank" >setClassLoader</a>(java.lang.ClassLoader loader)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L221" target="_blank" >setClassLoader</a>(java.lang.ClassLoader loader)</pre>
|
||||
<div class="block">Set the class loader. If set to null,
|
||||
<code>Thread.currentThread().getContextClassLoader()</code> will be used.</div>
|
||||
<dl>
|
||||
@ -474,7 +474,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getClassLoader</h4>
|
||||
<pre>public java.lang.ClassLoader <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L236" target="_blank" >getClassLoader</a>()</pre>
|
||||
<pre>public java.lang.ClassLoader <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseOptions.java#L236" target="_blank" >getClassLoader</a>()</pre>
|
||||
<div class="block">Get the class loader; never returns <code>null</code>, if the class loader was
|
||||
unset, returns
|
||||
<code>Thread.currentThread().getContextClassLoader()</code>.</div>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigParseable</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseable.java#L18" target="_blank" >ConfigParseable</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseable.java#L18" target="_blank" >ConfigParseable</a></pre>
|
||||
<div class="block">An opaque handle to something that can be parsed, obtained from
|
||||
<a href="../../../com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config"><code>ConfigIncludeContext</code></a>.
|
||||
|
||||
@ -172,7 +172,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parse</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseable.java#L29" target="_blank" >parse</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseable.java#L29" target="_blank" >parse</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<div class="block">Parse whatever it is. The options should come from
|
||||
<a href="../../../com/typesafe/config/ConfigParseable.html#options--"><code>options()</code></a> but you could tweak them if you
|
||||
like.</div>
|
||||
@ -191,7 +191,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>origin</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseable.java#L36" target="_blank" >origin</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseable.java#L36" target="_blank" >origin</a>()</pre>
|
||||
<div class="block">Returns a <a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config"><code>ConfigOrigin</code></a> describing the origin of the parseable
|
||||
item.</div>
|
||||
<dl>
|
||||
@ -206,7 +206,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>options</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigParseable.java#L44" target="_blank" >options</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigParseable.java#L44" target="_blank" >options</a>()</pre>
|
||||
<div class="block">Get the initial options, which can be modified then passed to parse().
|
||||
These options will have the right description, includer, and other
|
||||
parameters already set up.</div>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigRenderOptions</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L19" target="_blank" >ConfigRenderOptions</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L19" target="_blank" >ConfigRenderOptions</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block"><p>
|
||||
A set of options related to rendering a <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a>. Passed to
|
||||
@ -232,7 +232,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>defaults</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L40" target="_blank" >defaults</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L40" target="_blank" >defaults</a>()</pre>
|
||||
<div class="block">Returns the default render options which are verbose (commented and
|
||||
formatted). See <a href="../../../com/typesafe/config/ConfigRenderOptions.html#concise--"><code>concise()</code></a> for stripped-down
|
||||
options. This rendering will not be valid JSON since it has comments.</div>
|
||||
@ -248,7 +248,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>concise</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L50" target="_blank" >concise</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L50" target="_blank" >concise</a>()</pre>
|
||||
<div class="block">Returns concise render options (no whitespace or comments). For a
|
||||
resolved <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>, the concise rendering will be valid JSON.</div>
|
||||
<dl>
|
||||
@ -263,7 +263,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setComments</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L63" target="_blank" >setComments</a>(boolean value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L63" target="_blank" >setComments</a>(boolean value)</pre>
|
||||
<div class="block">Returns options with comments toggled. This controls human-written
|
||||
comments but not the autogenerated "origin of this setting" comments,
|
||||
which are controlled by <a href="../../../com/typesafe/config/ConfigRenderOptions.html#setOriginComments-boolean-"><code>setOriginComments(boolean)</code></a>.</div>
|
||||
@ -281,7 +281,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getComments</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L76" target="_blank" >getComments</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L76" target="_blank" >getComments</a>()</pre>
|
||||
<div class="block">Returns whether the options enable comments. This method is mostly used
|
||||
by the config lib internally, not by applications.</div>
|
||||
<dl>
|
||||
@ -296,7 +296,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setOriginComments</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L96" target="_blank" >setOriginComments</a>(boolean value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L96" target="_blank" >setOriginComments</a>(boolean value)</pre>
|
||||
<div class="block">Returns options with origin comments toggled. If this is enabled, the
|
||||
library generates comments for each setting based on the
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html#origin--"><code>ConfigValue.origin()</code></a> of that setting's value. For example these
|
||||
@ -321,7 +321,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getOriginComments</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L109" target="_blank" >getOriginComments</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L109" target="_blank" >getOriginComments</a>()</pre>
|
||||
<div class="block">Returns whether the options enable automated origin comments. This method
|
||||
is mostly used by the config lib internally, not by applications.</div>
|
||||
<dl>
|
||||
@ -336,7 +336,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setFormatted</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L121" target="_blank" >setFormatted</a>(boolean value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L121" target="_blank" >setFormatted</a>(boolean value)</pre>
|
||||
<div class="block">Returns options with formatting toggled. Formatting means indentation and
|
||||
whitespace, enabling formatting makes things prettier but larger.</div>
|
||||
<dl>
|
||||
@ -353,7 +353,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getFormatted</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L134" target="_blank" >getFormatted</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L134" target="_blank" >getFormatted</a>()</pre>
|
||||
<div class="block">Returns whether the options enable formatting. This method is mostly used
|
||||
by the config lib internally, not by applications.</div>
|
||||
<dl>
|
||||
@ -368,7 +368,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setJson</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L149" target="_blank" >setJson</a>(boolean value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L149" target="_blank" >setJson</a>(boolean value)</pre>
|
||||
<div class="block">Returns options with JSON toggled. JSON means that HOCON extensions
|
||||
(omitting commas, quotes for example) won't be used. However, whether to
|
||||
use comments is controlled by the separate <a href="../../../com/typesafe/config/ConfigRenderOptions.html#setComments-boolean-"><code>setComments(boolean)</code></a>
|
||||
@ -388,7 +388,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getJson</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L162" target="_blank" >getJson</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L162" target="_blank" >getJson</a>()</pre>
|
||||
<div class="block">Returns whether the options enable JSON. This method is mostly used by
|
||||
the config lib internally, not by applications.</div>
|
||||
<dl>
|
||||
@ -403,7 +403,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>toString</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L167" target="_blank" >toString</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L167" target="_blank" >toString</a>()</pre>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigResolveOptions</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L29" target="_blank" >ConfigResolveOptions</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L29" target="_blank" >ConfigResolveOptions</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">A set of options related to resolving substitutions. Substitutions use the
|
||||
<code>${foo.bar}</code> syntax and are documented in the <a
|
||||
@ -228,7 +228,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>defaults</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L47" target="_blank" >defaults</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L47" target="_blank" >defaults</a>()</pre>
|
||||
<div class="block">Returns the default resolve options. By default the system environment
|
||||
will be used and unresolved substitutions are not allowed.</div>
|
||||
<dl>
|
||||
@ -243,7 +243,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>noSystem</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L57" target="_blank" >noSystem</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L57" target="_blank" >noSystem</a>()</pre>
|
||||
<div class="block">Returns resolve options that disable any reference to "system" data
|
||||
(currently, this means environment variables).</div>
|
||||
<dl>
|
||||
@ -258,7 +258,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setUseSystemEnvironment</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L69" target="_blank" >setUseSystemEnvironment</a>(boolean value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L69" target="_blank" >setUseSystemEnvironment</a>(boolean value)</pre>
|
||||
<div class="block">Returns options with use of environment variables set to the given value.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -275,7 +275,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getUseSystemEnvironment</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L80" target="_blank" >getUseSystemEnvironment</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L80" target="_blank" >getUseSystemEnvironment</a>()</pre>
|
||||
<div class="block">Returns whether the options enable use of system environment variables.
|
||||
This method is mostly used by the config lib internally, not by
|
||||
applications.</div>
|
||||
@ -291,7 +291,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setAllowUnresolved</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L96" target="_blank" >setAllowUnresolved</a>(boolean value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L96" target="_blank" >setAllowUnresolved</a>(boolean value)</pre>
|
||||
<div class="block">Returns options with "allow unresolved" set to the given value. By
|
||||
default, unresolved substitutions are an error. If unresolved
|
||||
substitutions are allowed, then a future attempt to use the unresolved
|
||||
@ -313,7 +313,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>appendResolver</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L125" target="_blank" >appendResolver</a>(<a href="../../../com/typesafe/config/ConfigResolver.html" title="interface in com.typesafe.config">ConfigResolver</a> value)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L125" target="_blank" >appendResolver</a>(<a href="../../../com/typesafe/config/ConfigResolver.html" title="interface in com.typesafe.config">ConfigResolver</a> value)</pre>
|
||||
<div class="block">Returns options where the given resolver used as a fallback if a
|
||||
reference cannot be otherwise resolved. This resolver will only be called
|
||||
after resolution has failed to substitute with a value from within the
|
||||
@ -350,7 +350,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getResolver</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L144" target="_blank" >getResolver</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L144" target="_blank" >getResolver</a>()</pre>
|
||||
<div class="block">Returns the resolver to use as a fallback if a substitution cannot be
|
||||
otherwise resolved. Never returns null. This method is mostly used by the
|
||||
config lib internally, not by applications.</div>
|
||||
@ -368,7 +368,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getAllowUnresolved</h4>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L155" target="_blank" >getAllowUnresolved</a>()</pre>
|
||||
<pre>public boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolveOptions.java#L155" target="_blank" >getAllowUnresolved</a>()</pre>
|
||||
<div class="block">Returns whether the options allow unresolved substitutions. This method
|
||||
is mostly used by the config lib internally, not by applications.</div>
|
||||
<dl>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigResolver</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolver.java#L10" target="_blank" >ConfigResolver</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolver.java#L10" target="_blank" >ConfigResolver</a></pre>
|
||||
<div class="block">Implement this interface and provide an instance to
|
||||
<a href="../../../com/typesafe/config/ConfigResolveOptions.html#appendResolver-com.typesafe.config.ConfigResolver-"><code>ConfigResolveOptions.appendResolver()</code></a>
|
||||
to provide custom behavior when unresolved substitutions are encountered
|
||||
@ -161,7 +161,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>lookup</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolver.java#L22" target="_blank" >lookup</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolver.java#L22" target="_blank" >lookup</a>(java.lang.String path)</pre>
|
||||
<div class="block">Returns the value to substitute for the given unresolved path. To get the
|
||||
components of the path use <a href="../../../com/typesafe/config/ConfigUtil.html#splitPath-java.lang.String-"><code>ConfigUtil.splitPath(String)</code></a>. If a
|
||||
non-null value is returned that value will be substituted, otherwise
|
||||
@ -181,7 +181,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withFallback</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigResolver.java#L36" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigResolver.html" title="interface in com.typesafe.config">ConfigResolver</a> fallback)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigResolver.java#L36" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigResolver.html" title="interface in com.typesafe.config">ConfigResolver</a> fallback)</pre>
|
||||
<div class="block">Returns a new resolver that falls back to the given resolver if this
|
||||
one doesn't provide a substitution itself.
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigSyntax</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -117,7 +117,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public enum <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L14" target="_blank" >ConfigSyntax</a>
|
||||
<pre>public enum <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L14" target="_blank" >ConfigSyntax</a>
|
||||
extends java.lang.Enum<<a href="../../../com/typesafe/config/ConfigSyntax.html" title="enum in com.typesafe.config">ConfigSyntax</a>></pre>
|
||||
<div class="block">The syntax of a character stream (<a href="http://json.org">JSON</a>, <a
|
||||
href="https://github.com/lightbend/config/blob/master/HOCON.md">HOCON</a>
|
||||
@ -224,7 +224,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>JSON</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L21" target="_blank" >JSON</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L21" target="_blank" >JSON</a></pre>
|
||||
<div class="block">Pedantically strict <a href="http://json.org">JSON</a> format; no
|
||||
comments, no unexpected commas, no duplicate keys in the same object.
|
||||
Associated with the <code>.json</code> file extension and
|
||||
@ -237,7 +237,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>CONF</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L28" target="_blank" >CONF</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L28" target="_blank" >CONF</a></pre>
|
||||
<div class="block">The JSON-superset <a
|
||||
href="https://github.com/lightbend/config/blob/master/HOCON.md"
|
||||
>HOCON</a> format. Associated with the <code>.conf</code> file extension
|
||||
@ -250,7 +250,7 @@ the order they are declared.</div>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>PROPERTIES</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L35" target="_blank" >PROPERTIES</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L35" target="_blank" >PROPERTIES</a></pre>
|
||||
<div class="block">Standard <a href=
|
||||
"http://download.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29"
|
||||
>Java properties</a> format. Associated with the <code>.properties</code>
|
||||
@ -271,7 +271,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>values</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L14" target="_blank" >values</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L14" target="_blank" >values</a>()</pre>
|
||||
<div class="block">Returns an array containing the constants of this enum type, in
|
||||
the order they are declared. This method may be used to iterate
|
||||
over the constants as follows:
|
||||
@ -291,7 +291,7 @@ for (ConfigSyntax c : ConfigSyntax.values())
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>valueOf</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L14" target="_blank" >valueOf</a>(java.lang.String name)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigSyntax.java#L14" target="_blank" >valueOf</a>(java.lang.String name)</pre>
|
||||
<div class="block">Returns the enum constant of this type with the specified name.
|
||||
The string must match <i>exactly</i> an identifier used to declare an
|
||||
enum constant in this type. (Extraneous whitespace characters are
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigUtil</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigUtil.java#L11" target="_blank" >ConfigUtil</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigUtil.java#L11" target="_blank" >ConfigUtil</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Contains static utility methods.</div>
|
||||
</li>
|
||||
@ -184,7 +184,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>quoteString</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigUtil.java#L23" target="_blank" >quoteString</a>(java.lang.String s)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigUtil.java#L23" target="_blank" >quoteString</a>(java.lang.String s)</pre>
|
||||
<div class="block">Quotes and escapes a string, as in the JSON specification.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
@ -200,7 +200,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>joinPath</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigUtil.java#L42" target="_blank" >joinPath</a>(java.lang.String... elements)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigUtil.java#L42" target="_blank" >joinPath</a>(java.lang.String... elements)</pre>
|
||||
<div class="block">Converts a list of keys to a path expression, by quoting the path
|
||||
elements as needed and then joining them separated by a period. A path
|
||||
expression is usable with a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>, while individual path
|
||||
@ -224,7 +224,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>joinPath</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigUtil.java#L61" target="_blank" >joinPath</a>(java.util.List<java.lang.String> elements)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigUtil.java#L61" target="_blank" >joinPath</a>(java.util.List<java.lang.String> elements)</pre>
|
||||
<div class="block">Converts a list of strings to a path expression, by quoting the path
|
||||
elements as needed and then joining them separated by a period. A path
|
||||
expression is usable with a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>, while individual path
|
||||
@ -248,7 +248,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>splitPath</h4>
|
||||
<pre>public static java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigUtil.java#L80" target="_blank" >splitPath</a>(java.lang.String path)</pre>
|
||||
<pre>public static java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigUtil.java#L80" target="_blank" >splitPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Converts a path expression into a list of keys, by splitting on period
|
||||
and unquoting the individual path elements. A path expression is usable
|
||||
with a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>, while individual path elements are usable with a
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigValue</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L21" target="_blank" >ConfigValue</a>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L21" target="_blank" >ConfigValue</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a></pre>
|
||||
<div class="block">An immutable value, following the <a href="http://json.org">JSON</a> type
|
||||
schema.
|
||||
@ -222,7 +222,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>origin</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L28" target="_blank" >origin</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L28" target="_blank" >origin</a>()</pre>
|
||||
<div class="block">The origin of the value (file, line number, etc.), for debugging and
|
||||
error messages.</div>
|
||||
<dl>
|
||||
@ -237,7 +237,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>valueType</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L35" target="_blank" >valueType</a>()</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L35" target="_blank" >valueType</a>()</pre>
|
||||
<div class="block">The <a href="../../../com/typesafe/config/ConfigValueType.html" title="enum in com.typesafe.config"><code>ConfigValueType</code></a> of the value; matches the JSON type schema.</div>
|
||||
<dl>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
@ -251,7 +251,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>unwrapped</h4>
|
||||
<pre>java.lang.Object <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L45" target="_blank" >unwrapped</a>()</pre>
|
||||
<pre>java.lang.Object <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L45" target="_blank" >unwrapped</a>()</pre>
|
||||
<div class="block">Returns the value as a plain Java boxed value, that is, a <code>String</code>,
|
||||
<code>Number</code>, <code>Boolean</code>, <code>Map<String,Object></code>,
|
||||
<code>List<Object></code>, or <code>null</code>, matching the <a href="../../../com/typesafe/config/ConfigValue.html#valueType--"><code>valueType()</code></a>
|
||||
@ -269,7 +269,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>render</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L64" target="_blank" >render</a>()</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L64" target="_blank" >render</a>()</pre>
|
||||
<div class="block">Renders the config value as a HOCON string. This method is primarily
|
||||
intended for debugging, so it tries to add helpful comments and
|
||||
whitespace.
|
||||
@ -295,7 +295,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>render</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L85" target="_blank" >render</a>(<a href="../../../com/typesafe/config/ConfigRenderOptions.html" title="class in com.typesafe.config">ConfigRenderOptions</a> options)</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L85" target="_blank" >render</a>(<a href="../../../com/typesafe/config/ConfigRenderOptions.html" title="class in com.typesafe.config">ConfigRenderOptions</a> options)</pre>
|
||||
<div class="block">Renders the config value to a string, using the provided options.
|
||||
|
||||
<p>
|
||||
@ -323,7 +323,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withFallback</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L88" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L88" target="_blank" >withFallback</a>(<a href="../../../com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config">ConfigMergeable</a> other)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/typesafe/config/ConfigMergeable.html#withFallback-com.typesafe.config.ConfigMergeable-">ConfigMergeable</a></code></span></div>
|
||||
<div class="block">Returns a new value computed by merging this value with another, with
|
||||
keys in this value "winning" over the other one.
|
||||
@ -386,7 +386,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>atPath</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L99" target="_blank" >atPath</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L99" target="_blank" >atPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Places the value inside a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a> at the given path. See also
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html#atKey-java.lang.String-"><code>atKey(String)</code></a>.</div>
|
||||
<dl>
|
||||
@ -404,7 +404,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>atKey</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L109" target="_blank" >atKey</a>(java.lang.String key)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L109" target="_blank" >atKey</a>(java.lang.String key)</pre>
|
||||
<div class="block">Places the value inside a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a> at the given key. See also
|
||||
<a href="../../../com/typesafe/config/ConfigValue.html#atPath-java.lang.String-"><code>atPath(String)</code></a>.</div>
|
||||
<dl>
|
||||
@ -421,7 +421,7 @@ extends <a href="../../../com/typesafe/config/ConfigMergeable.html" title="inter
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>withOrigin</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValue.java#L121" target="_blank" >withOrigin</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValue.java#L121" target="_blank" >withOrigin</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)</pre>
|
||||
<div class="block">Returns a <code>ConfigValue</code> based on this one, but with the given
|
||||
origin. This is useful when you are parsing a new format of file or setting
|
||||
comments for a single ConfigValue.</div>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigValueFactory</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L15" target="_blank" >ConfigValueFactory</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L15" target="_blank" >ConfigValueFactory</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">This class holds some static factory methods for building <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a>
|
||||
instances. See also <a href="../../../com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config"><code>ConfigFactory</code></a> which has methods for parsing files
|
||||
@ -203,7 +203,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromAnyRef</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L71" target="_blank" >fromAnyRef</a>(java.lang.Object object,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L71" target="_blank" >fromAnyRef</a>(java.lang.Object object,
|
||||
java.lang.String originDescription)</pre>
|
||||
<div class="block">Creates a <a href="../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><code>ConfigValue</code></a> from a plain Java boxed value, which may be
|
||||
a <code>Boolean</code>, <code>Number</code>, <code>String</code>,
|
||||
@ -264,7 +264,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromMap</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L98" target="_blank" >fromMap</a>(java.util.Map<java.lang.String,? extends java.lang.Object> values,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L98" target="_blank" >fromMap</a>(java.util.Map<java.lang.String,? extends java.lang.Object> values,
|
||||
java.lang.String originDescription)</pre>
|
||||
<div class="block">See the <a href="../../../com/typesafe/config/ConfigValueFactory.html#fromAnyRef-java.lang.Object-java.lang.String-"><code>fromAnyRef(Object,String)</code></a> documentation for details.
|
||||
This is a typesafe wrapper that only works on <code>Map</code> and
|
||||
@ -298,7 +298,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromIterable</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L112" target="_blank" >fromIterable</a>(java.lang.Iterable<? extends java.lang.Object> values,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L112" target="_blank" >fromIterable</a>(java.lang.Iterable<? extends java.lang.Object> values,
|
||||
java.lang.String originDescription)</pre>
|
||||
<div class="block">See the <a href="../../../com/typesafe/config/ConfigValueFactory.html#fromAnyRef-java.lang.Object-java.lang.String-"><code>fromAnyRef(Object,String)</code></a> documentation for details.
|
||||
This is a typesafe wrapper that only works on <code>Iterable</code>
|
||||
@ -318,7 +318,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromAnyRef</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L124" target="_blank" >fromAnyRef</a>(java.lang.Object object)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L124" target="_blank" >fromAnyRef</a>(java.lang.Object object)</pre>
|
||||
<div class="block">See the other overload <a href="../../../com/typesafe/config/ConfigValueFactory.html#fromAnyRef-java.lang.Object-java.lang.String-"><code>fromAnyRef(Object,String)</code></a> for details,
|
||||
this one just uses a default origin description.</div>
|
||||
<dl>
|
||||
@ -335,7 +335,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromMap</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L139" target="_blank" >fromMap</a>(java.util.Map<java.lang.String,? extends java.lang.Object> values)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L139" target="_blank" >fromMap</a>(java.util.Map<java.lang.String,? extends java.lang.Object> values)</pre>
|
||||
<div class="block">See the other overload <a href="../../../com/typesafe/config/ConfigValueFactory.html#fromMap-java.util.Map-java.lang.String-"><code>fromMap(Map,String)</code></a> for details, this one
|
||||
just uses a default origin description.
|
||||
|
||||
@ -356,7 +356,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>fromIterable</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L150" target="_blank" >fromIterable</a>(java.lang.Iterable<? extends java.lang.Object> values)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueFactory.java#L150" target="_blank" >fromIterable</a>(java.lang.Iterable<? extends java.lang.Object> values)</pre>
|
||||
<div class="block">See the other overload of <a href="../../../com/typesafe/config/ConfigValueFactory.html#fromIterable-java.lang.Iterable-java.lang.String-"><code>fromIterable(Iterable, String)</code></a> for
|
||||
details, this one just uses a default origin description.</div>
|
||||
<dl>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>ConfigValueType</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -117,7 +117,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public enum <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L10" target="_blank" >ConfigValueType</a>
|
||||
<pre>public enum <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L10" target="_blank" >ConfigValueType</a>
|
||||
extends java.lang.Enum<<a href="../../../com/typesafe/config/ConfigValueType.html" title="enum in com.typesafe.config">ConfigValueType</a>></pre>
|
||||
<div class="block">The type of a configuration value (following the <a
|
||||
href="http://json.org">JSON</a> type schema).</div>
|
||||
@ -219,7 +219,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>OBJECT</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >OBJECT</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >OBJECT</a></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="LIST">
|
||||
@ -228,7 +228,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>LIST</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >LIST</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >LIST</a></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="NUMBER">
|
||||
@ -237,7 +237,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>NUMBER</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >NUMBER</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >NUMBER</a></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BOOLEAN">
|
||||
@ -246,7 +246,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BOOLEAN</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >BOOLEAN</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >BOOLEAN</a></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="NULL">
|
||||
@ -255,7 +255,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>NULL</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >NULL</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >NULL</a></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="STRING">
|
||||
@ -264,7 +264,7 @@ the order they are declared.</div>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>STRING</h4>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >STRING</a></pre>
|
||||
<pre>public static final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L11" target="_blank" >STRING</a></pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -281,7 +281,7 @@ the order they are declared.</div>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>values</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L8" target="_blank" >values</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L10" target="_blank" >values</a>()</pre>
|
||||
<div class="block">Returns an array containing the constants of this enum type, in
|
||||
the order they are declared. This method may be used to iterate
|
||||
over the constants as follows:
|
||||
@ -301,7 +301,7 @@ for (ConfigValueType c : ConfigValueType.values())
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>valueOf</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigValueType.java#L8" target="_blank" >valueOf</a>(java.lang.String name)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigValueType.java#L10" target="_blank" >valueOf</a>(java.lang.String name)</pre>
|
||||
<div class="block">Returns the enum constant of this type with the specified name.
|
||||
The string must match <i>exactly</i> an identifier used to declare an
|
||||
enum constant in this type. (Extraneous whitespace characters are
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>DefaultConfigLoadingStrategy</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/DefaultConfigLoadingStrategy.java#L12" target="_blank" >DefaultConfigLoadingStrategy</a>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/DefaultConfigLoadingStrategy.java#L8" target="_blank" >DefaultConfigLoadingStrategy</a>
|
||||
extends java.lang.Object
|
||||
implements <a href="../../../com/typesafe/config/ConfigLoadingStrategy.html" title="interface in com.typesafe.config">ConfigLoadingStrategy</a></pre>
|
||||
<div class="block">Default config loading strategy. Able to load resource, file or URL.
|
||||
@ -187,7 +187,7 @@ implements <a href="../../../com/typesafe/config/ConfigLoadingStrategy.html" tit
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>DefaultConfigLoadingStrategy</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/DefaultConfigLoadingStrategy.java#L12" target="_blank" >DefaultConfigLoadingStrategy</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/DefaultConfigLoadingStrategy.java#L8" target="_blank" >DefaultConfigLoadingStrategy</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -204,7 +204,7 @@ implements <a href="../../../com/typesafe/config/ConfigLoadingStrategy.html" tit
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>parseApplicationConfig</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/DefaultConfigLoadingStrategy.java#L14" target="_blank" >parseApplicationConfig</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> parseOptions)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/DefaultConfigLoadingStrategy.java#L10" target="_blank" >parseApplicationConfig</a>(<a href="../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> parseOptions)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/typesafe/config/ConfigLoadingStrategy.html#parseApplicationConfig-com.typesafe.config.ConfigParseOptions-">ConfigLoadingStrategy</a></code></span></div>
|
||||
<div class="block">This method must load and parse application config.</div>
|
||||
<dl>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Optional</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -94,7 +94,7 @@
|
||||
<br>
|
||||
<pre>@Documented
|
||||
@Retention(value=RUNTIME)
|
||||
public @interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/Optional.java#L12" target="_blank" >Optional</a></pre>
|
||||
public @interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/Optional.java#L12" target="_blank" >Optional</a></pre>
|
||||
<div class="block">Allows an config property to be <code>null</code>.</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigBeanImpl</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigBeanImpl.java#L33" target="_blank" >ConfigBeanImpl</a>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigBeanImpl.java#L33" target="_blank" >ConfigBeanImpl</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Internal implementation detail, not ABI stable, do not touch.
|
||||
For use only by the <code>com.typesafe.config</code> package.</div>
|
||||
@ -183,7 +183,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigBeanImpl</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigBeanImpl.java#L33" target="_blank" >ConfigBeanImpl</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigBeanImpl.java#L33" target="_blank" >ConfigBeanImpl</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -200,7 +200,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>createInternal</h4>
|
||||
<pre>public static <T> T <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigBeanImpl.java#L43" target="_blank" >createInternal</a>(<a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> config,
|
||||
<pre>public static <T> T <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigBeanImpl.java#L43" target="_blank" >createInternal</a>(<a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> config,
|
||||
java.lang.Class<T> clazz)</pre>
|
||||
<div class="block">This is public ONLY for use by the "config" package, DO NOT USE this ABI
|
||||
may change.</div>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigImpl</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -18,7 +18,7 @@
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9};
|
||||
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9};
|
||||
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L34" target="_blank" >ConfigImpl</a>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L34" target="_blank" >ConfigImpl</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Internal implementation detail, not ABI stable, do not touch.
|
||||
For use only by the <code>com.typesafe.config</code> package.</div>
|
||||
@ -159,84 +159,93 @@ extends java.lang.Object</pre>
|
||||
</tr>
|
||||
<tr id="i2" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#emptyConfig-java.lang.String-">emptyConfig</a></span>(java.lang.String originDescription)</code> </td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#defaultReferenceUnresolved-java.lang.ClassLoader-">defaultReferenceUnresolved</a></span>(java.lang.ClassLoader loader)</code>
|
||||
<div class="block">This returns the unresolved reference configuration, but before doing so,
|
||||
it verifies that the reference configuration resolves, to ensure that it
|
||||
is self contained and doesn't depend on any higher level configuration
|
||||
files.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="i3" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#envVariablesAsConfig--">envVariablesAsConfig</a></span>()</code> </td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#emptyConfig-java.lang.String-">emptyConfig</a></span>(java.lang.String originDescription)</code> </td>
|
||||
</tr>
|
||||
<tr id="i4" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#envVariablesOverridesAsConfig--">envVariablesOverridesAsConfig</a></span>()</code> </td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#envVariablesAsConfig--">envVariablesAsConfig</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i5" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#envVariablesOverridesAsConfig--">envVariablesOverridesAsConfig</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i6" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#fromAnyRef-java.lang.Object-java.lang.String-">fromAnyRef</a></span>(java.lang.Object object,
|
||||
java.lang.String originDescription)</code> </td>
|
||||
</tr>
|
||||
<tr id="i6" class="altColor">
|
||||
<tr id="i7" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config">ConfigObject</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#fromPathMap-java.util.Map-java.lang.String-">fromPathMap</a></span>(java.util.Map<java.lang.String,? extends java.lang.Object> pathMap,
|
||||
java.lang.String originDescription)</code> </td>
|
||||
</tr>
|
||||
<tr id="i7" class="rowColor">
|
||||
<tr id="i8" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#newFileOrigin-java.lang.String-">newFileOrigin</a></span>(java.lang.String filename)</code> </td>
|
||||
</tr>
|
||||
<tr id="i8" class="altColor">
|
||||
<tr id="i9" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#newSimpleOrigin-java.lang.String-">newSimpleOrigin</a></span>(java.lang.String description)</code> </td>
|
||||
</tr>
|
||||
<tr id="i9" class="rowColor">
|
||||
<tr id="i10" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#newURLOrigin-java.net.URL-">newURLOrigin</a></span>(java.net.URL url)</code> </td>
|
||||
</tr>
|
||||
<tr id="i10" class="altColor">
|
||||
<tr id="i11" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config">ConfigObject</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#parseFileAnySyntax-java.io.File-com.typesafe.config.ConfigParseOptions-">parseFileAnySyntax</a></span>(java.io.File basename,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</code> </td>
|
||||
</tr>
|
||||
<tr id="i11" class="rowColor">
|
||||
<tr id="i12" class="altColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config">ConfigObject</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#parseResourcesAnySyntax-java.lang.Class-java.lang.String-com.typesafe.config.ConfigParseOptions-">parseResourcesAnySyntax</a></span>(java.lang.Class<?> klass,
|
||||
java.lang.String resourceBasename,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</code> </td>
|
||||
</tr>
|
||||
<tr id="i12" class="altColor">
|
||||
<tr id="i13" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config">ConfigObject</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#parseResourcesAnySyntax-java.lang.String-com.typesafe.config.ConfigParseOptions-">parseResourcesAnySyntax</a></span>(java.lang.String resourceBasename,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</code> </td>
|
||||
</tr>
|
||||
<tr id="i13" class="rowColor">
|
||||
<tr id="i14" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#reloadEnvVariablesConfig--">reloadEnvVariablesConfig</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i14" class="altColor">
|
||||
<tr id="i15" class="rowColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#reloadEnvVariablesOverridesConfig--">reloadEnvVariablesOverridesConfig</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i15" class="rowColor">
|
||||
<tr id="i16" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#reloadSystemPropertiesConfig--">reloadSystemPropertiesConfig</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i16" class="altColor">
|
||||
<tr id="i17" class="rowColor">
|
||||
<td class="colFirst"><code>static <a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a></code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#systemPropertiesAsConfig--">systemPropertiesAsConfig</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i17" class="rowColor">
|
||||
<tr id="i18" class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#trace-int-java.lang.String-">trace</a></span>(int indentLevel,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr id="i18" class="altColor">
|
||||
<tr id="i19" class="rowColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#trace-java.lang.String-">trace</a></span>(java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr id="i19" class="rowColor">
|
||||
<tr id="i20" class="altColor">
|
||||
<td class="colFirst"><code>static boolean</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#traceLoadsEnabled--">traceLoadsEnabled</a></span>()</code> </td>
|
||||
</tr>
|
||||
<tr id="i20" class="altColor">
|
||||
<tr id="i21" class="rowColor">
|
||||
<td class="colFirst"><code>static boolean</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/typesafe/config/impl/ConfigImpl.html#traceSubstitutionsEnabled--">traceSubstitutionsEnabled</a></span>()</code> </td>
|
||||
</tr>
|
||||
@ -268,7 +277,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigImpl</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L34" target="_blank" >ConfigImpl</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L34" target="_blank" >ConfigImpl</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -285,7 +294,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>computeCachedConfig</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L85" target="_blank" >computeCachedConfig</a>(java.lang.ClassLoader loader,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L85" target="_blank" >computeCachedConfig</a>(java.lang.ClassLoader loader,
|
||||
java.lang.String key,
|
||||
java.util.concurrent.Callable<<a href="../../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a>> updater)</pre>
|
||||
</li>
|
||||
@ -296,7 +305,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseResourcesAnySyntax</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L124" target="_blank" >parseResourcesAnySyntax</a>(java.lang.Class<?> klass,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L124" target="_blank" >parseResourcesAnySyntax</a>(java.lang.Class<?> klass,
|
||||
java.lang.String resourceBasename,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
</li>
|
||||
@ -307,7 +316,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseResourcesAnySyntax</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L130" target="_blank" >parseResourcesAnySyntax</a>(java.lang.String resourceBasename,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L130" target="_blank" >parseResourcesAnySyntax</a>(java.lang.String resourceBasename,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -317,7 +326,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseFileAnySyntax</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L136" target="_blank" >parseFileAnySyntax</a>(java.io.File basename,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L136" target="_blank" >parseFileAnySyntax</a>(java.io.File basename,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -327,7 +336,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>emptyConfig</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L147" target="_blank" >emptyConfig</a>(java.lang.String originDescription)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L147" target="_blank" >emptyConfig</a>(java.lang.String originDescription)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="fromAnyRef-java.lang.Object-java.lang.String-">
|
||||
@ -336,7 +345,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromAnyRef</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L193" target="_blank" >fromAnyRef</a>(java.lang.Object object,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L193" target="_blank" >fromAnyRef</a>(java.lang.Object object,
|
||||
java.lang.String originDescription)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -346,7 +355,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>fromPathMap</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L198" target="_blank" >fromPathMap</a>(java.util.Map<java.lang.String,? extends java.lang.Object> pathMap,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L198" target="_blank" >fromPathMap</a>(java.util.Map<java.lang.String,? extends java.lang.Object> pathMap,
|
||||
java.lang.String originDescription)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -356,7 +365,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>systemPropertiesAsConfig</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L328" target="_blank" >systemPropertiesAsConfig</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L334" target="_blank" >systemPropertiesAsConfig</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="reloadSystemPropertiesConfig--">
|
||||
@ -365,7 +374,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>reloadSystemPropertiesConfig</h4>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L332" target="_blank" >reloadSystemPropertiesConfig</a>()</pre>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L338" target="_blank" >reloadSystemPropertiesConfig</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="envVariablesAsConfig--">
|
||||
@ -374,7 +383,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>envVariablesAsConfig</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L354" target="_blank" >envVariablesAsConfig</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L360" target="_blank" >envVariablesAsConfig</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="reloadEnvVariablesConfig--">
|
||||
@ -383,7 +392,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>reloadEnvVariablesConfig</h4>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L358" target="_blank" >reloadEnvVariablesConfig</a>()</pre>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L364" target="_blank" >reloadEnvVariablesConfig</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="envVariablesOverridesAsConfig--">
|
||||
@ -392,7 +401,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>envVariablesOverridesAsConfig</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L391" target="_blank" >envVariablesOverridesAsConfig</a>()</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L397" target="_blank" >envVariablesOverridesAsConfig</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="reloadEnvVariablesOverridesConfig--">
|
||||
@ -401,7 +410,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>reloadEnvVariablesOverridesConfig</h4>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L395" target="_blank" >reloadEnvVariablesOverridesConfig</a>()</pre>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L401" target="_blank" >reloadEnvVariablesOverridesConfig</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="defaultReference-java.lang.ClassLoader-">
|
||||
@ -410,7 +419,20 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>defaultReference</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L401" target="_blank" >defaultReference</a>(java.lang.ClassLoader loader)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L407" target="_blank" >defaultReference</a>(java.lang.ClassLoader loader)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="defaultReferenceUnresolved-java.lang.ClassLoader-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>defaultReferenceUnresolved</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L434" target="_blank" >defaultReferenceUnresolved</a>(java.lang.ClassLoader loader)</pre>
|
||||
<div class="block">This returns the unresolved reference configuration, but before doing so,
|
||||
it verifies that the reference configuration resolves, to ensure that it
|
||||
is self contained and doesn't depend on any higher level configuration
|
||||
files.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="traceLoadsEnabled--">
|
||||
@ -419,7 +441,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>traceLoadsEnabled</h4>
|
||||
<pre>public static boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L457" target="_blank" >traceLoadsEnabled</a>()</pre>
|
||||
<pre>public static boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L489" target="_blank" >traceLoadsEnabled</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="traceSubstitutionsEnabled--">
|
||||
@ -428,7 +450,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>traceSubstitutionsEnabled</h4>
|
||||
<pre>public static boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L465" target="_blank" >traceSubstitutionsEnabled</a>()</pre>
|
||||
<pre>public static boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L497" target="_blank" >traceSubstitutionsEnabled</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="trace-java.lang.String-">
|
||||
@ -437,7 +459,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>trace</h4>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L473" target="_blank" >trace</a>(java.lang.String message)</pre>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L505" target="_blank" >trace</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="trace-int-java.lang.String-">
|
||||
@ -446,7 +468,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>trace</h4>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L477" target="_blank" >trace</a>(int indentLevel,
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L509" target="_blank" >trace</a>(int indentLevel,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -456,7 +478,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newSimpleOrigin</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L500" target="_blank" >newSimpleOrigin</a>(java.lang.String description)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L532" target="_blank" >newSimpleOrigin</a>(java.lang.String description)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="newFileOrigin-java.lang.String-">
|
||||
@ -465,7 +487,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newFileOrigin</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L508" target="_blank" >newFileOrigin</a>(java.lang.String filename)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L540" target="_blank" >newFileOrigin</a>(java.lang.String filename)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="newURLOrigin-java.net.URL-">
|
||||
@ -474,7 +496,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>newURLOrigin</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L512" target="_blank" >newURLOrigin</a>(java.net.URL url)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java#L544" target="_blank" >newURLOrigin</a>(java.net.URL url)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigImplUtil</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L24" target="_blank" >ConfigImplUtil</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L24" target="_blank" >ConfigImplUtil</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Internal implementation detail, not ABI stable, do not touch.
|
||||
For use only by the <code>com.typesafe.config</code> package.</div>
|
||||
@ -214,7 +214,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigImplUtil</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L24" target="_blank" >ConfigImplUtil</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L24" target="_blank" >ConfigImplUtil</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -231,7 +231,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>renderJsonString</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L40" target="_blank" >renderJsonString</a>(java.lang.String s)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L40" target="_blank" >renderJsonString</a>(java.lang.String s)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="unicodeTrim-java.lang.String-">
|
||||
@ -240,7 +240,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>unicodeTrim</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L123" target="_blank" >unicodeTrim</a>(java.lang.String s)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L123" target="_blank" >unicodeTrim</a>(java.lang.String s)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="extractInitializerError-java.lang.ExceptionInInitializerError-">
|
||||
@ -249,7 +249,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>extractInitializerError</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L172" target="_blank" >extractInitializerError</a>(java.lang.ExceptionInInitializerError e)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L172" target="_blank" >extractInitializerError</a>(java.lang.ExceptionInInitializerError e)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="joinPath-java.lang.String...-">
|
||||
@ -258,7 +258,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>joinPath</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L197" target="_blank" >joinPath</a>(java.lang.String... elements)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L197" target="_blank" >joinPath</a>(java.lang.String... elements)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="joinPath-java.util.List-">
|
||||
@ -267,7 +267,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>joinPath</h4>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L201" target="_blank" >joinPath</a>(java.util.List<java.lang.String> elements)</pre>
|
||||
<pre>public static java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L201" target="_blank" >joinPath</a>(java.util.List<java.lang.String> elements)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="splitPath-java.lang.String-">
|
||||
@ -276,7 +276,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>splitPath</h4>
|
||||
<pre>public static java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L205" target="_blank" >splitPath</a>(java.lang.String path)</pre>
|
||||
<pre>public static java.util.List<java.lang.String> <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L205" target="_blank" >splitPath</a>(java.lang.String path)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="readOrigin-java.io.ObjectInputStream-">
|
||||
@ -285,7 +285,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>readOrigin</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L215" target="_blank" >readOrigin</a>(java.io.ObjectInputStream in)
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L215" target="_blank" >readOrigin</a>(java.io.ObjectInputStream in)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
@ -299,7 +299,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>writeOrigin</h4>
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L219" target="_blank" >writeOrigin</a>(java.io.ObjectOutputStream out,
|
||||
<pre>public static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L219" target="_blank" >writeOrigin</a>(java.io.ObjectOutputStream out,
|
||||
<a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
@ -314,7 +314,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>syntaxFromExtension</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L290" target="_blank" >syntaxFromExtension</a>(java.lang.String filename)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/ConfigImplUtil.java#L290" target="_blank" >syntaxFromExtension</a>(java.lang.String filename)</pre>
|
||||
<div class="block">Guess configuration syntax from given filename.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>Parseable.Relativizer</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -104,7 +104,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>protected static interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L44" target="_blank" >Parseable.Relativizer</a></pre>
|
||||
<pre>protected static interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L44" target="_blank" >Parseable.Relativizer</a></pre>
|
||||
<div class="block">Internal implementation detail, not ABI stable, do not touch.</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -149,7 +149,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>relativeTo</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.Relativizer.java#L45" target="_blank" >relativeTo</a>(java.lang.String filename)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.Relativizer.java#L45" target="_blank" >relativeTo</a>(java.lang.String filename)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>Parseable</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -112,7 +112,7 @@ var activeTableTab = "activeTableTab";
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public abstract class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L36" target="_blank" >Parseable</a>
|
||||
<pre>public abstract class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L36" target="_blank" >Parseable</a>
|
||||
extends java.lang.Object
|
||||
implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title="interface in com.typesafe.config">ConfigParseable</a></pre>
|
||||
<div class="block">Internal implementation detail, not ABI stable, do not touch.
|
||||
@ -311,7 +311,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Parseable</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L57" target="_blank" >Parseable</a>()</pre>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L57" target="_blank" >Parseable</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -328,7 +328,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>postConstruct</h4>
|
||||
<pre>protected void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L78" target="_blank" >postConstruct</a>(<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
<pre>protected void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L78" target="_blank" >postConstruct</a>(<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="reader--">
|
||||
@ -337,7 +337,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>reader</h4>
|
||||
<pre>protected abstract java.io.Reader <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L96" target="_blank" >reader</a>()
|
||||
<pre>protected abstract java.io.Reader <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L96" target="_blank" >reader</a>()
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
@ -351,7 +351,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>reader</h4>
|
||||
<pre>protected java.io.Reader <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L98" target="_blank" >reader</a>(<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)
|
||||
<pre>protected java.io.Reader <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L98" target="_blank" >reader</a>(<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
@ -365,7 +365,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>trace</h4>
|
||||
<pre>protected static void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L102" target="_blank" >trace</a>(java.lang.String message)</pre>
|
||||
<pre>protected static void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L102" target="_blank" >trace</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="parse-com.typesafe.config.ConfigParseOptions-">
|
||||
@ -374,7 +374,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parse</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L141" target="_blank" >parse</a>(<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L141" target="_blank" >parse</a>(<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> baseOptions)</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/typesafe/config/ConfigParseable.html#parse-com.typesafe.config.ConfigParseOptions-">ConfigParseable</a></code></span></div>
|
||||
<div class="block">Parse whatever it is. The options should come from
|
||||
<a href="../../../../com/typesafe/config/ConfigParseable.html#options--"><code>options()</code></a> but you could tweak them if you
|
||||
@ -396,7 +396,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>rawParseValue</h4>
|
||||
<pre>protected com.typesafe.config.impl.AbstractConfigValue <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L231" target="_blank" >rawParseValue</a>(<a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>protected com.typesafe.config.impl.AbstractConfigValue <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L231" target="_blank" >rawParseValue</a>(<a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> finalOptions)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
@ -411,7 +411,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>rawParseDocument</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L269" target="_blank" >rawParseDocument</a>(<a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L269" target="_blank" >rawParseDocument</a>(<a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> finalOptions)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
@ -426,7 +426,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parse</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L300" target="_blank" >parse</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L300" target="_blank" >parse</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="parseConfigDocument--">
|
||||
@ -435,7 +435,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseConfigDocument</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L304" target="_blank" >parseConfigDocument</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L304" target="_blank" >parseConfigDocument</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="origin--">
|
||||
@ -444,7 +444,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>origin</h4>
|
||||
<pre>public final <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L313" target="_blank" >origin</a>()</pre>
|
||||
<pre>public final <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L313" target="_blank" >origin</a>()</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/typesafe/config/ConfigParseable.html#origin--">ConfigParseable</a></code></span></div>
|
||||
<div class="block">Returns a <a href="../../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config"><code>ConfigOrigin</code></a> describing the origin of the parseable
|
||||
item.</div>
|
||||
@ -462,7 +462,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>createOrigin</h4>
|
||||
<pre>protected abstract <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L317" target="_blank" >createOrigin</a>()</pre>
|
||||
<pre>protected abstract <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L317" target="_blank" >createOrigin</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="options--">
|
||||
@ -471,7 +471,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>options</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L320" target="_blank" >options</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L320" target="_blank" >options</a>()</pre>
|
||||
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/typesafe/config/ConfigParseable.html#options--">ConfigParseable</a></code></span></div>
|
||||
<div class="block">Get the initial options, which can be modified then passed to parse().
|
||||
These options will have the right description, includer, and other
|
||||
@ -490,7 +490,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>toString</h4>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L325" target="_blank" >toString</a>()</pre>
|
||||
<pre>public java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L325" target="_blank" >toString</a>()</pre>
|
||||
<dl>
|
||||
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
||||
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
|
||||
@ -503,7 +503,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newNotFound</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L417" target="_blank" >newNotFound</a>(java.lang.String whatNotFound,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L417" target="_blank" >newNotFound</a>(java.lang.String whatNotFound,
|
||||
java.lang.String message,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
@ -514,7 +514,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newReader</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L445" target="_blank" >newReader</a>(java.io.Reader reader,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L445" target="_blank" >newReader</a>(java.io.Reader reader,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -524,7 +524,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newString</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L476" target="_blank" >newString</a>(java.lang.String input,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L476" target="_blank" >newString</a>(java.lang.String input,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -534,7 +534,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newURL</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L607" target="_blank" >newURL</a>(java.net.URL input,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L607" target="_blank" >newURL</a>(java.net.URL input,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -544,7 +544,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newFile</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L669" target="_blank" >newFile</a>(java.io.File input,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L669" target="_blank" >newFile</a>(java.io.File input,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -554,7 +554,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newResources</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L796" target="_blank" >newResources</a>(java.lang.Class<?> klass,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L796" target="_blank" >newResources</a>(java.lang.Class<?> klass,
|
||||
java.lang.String resource,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
@ -565,7 +565,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>newResources</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L826" target="_blank" >newResources</a>(java.lang.String resource,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L826" target="_blank" >newResources</a>(java.lang.String resource,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
@ -575,7 +575,7 @@ implements <a href="../../../../com/typesafe/config/ConfigParseable.html" title=
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>newProperties</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/impl/Parseable.java#L870" target="_blank" >newProperties</a>(java.util.Properties properties,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/impl/Parseable.java#L870" target="_blank" >newProperties</a>(java.util.Properties properties,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config.impl</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config.impl</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config.impl Class Hierarchy</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config Class Hierarchy</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
@ -183,8 +183,8 @@
|
||||
<ul>
|
||||
<li type="circle">java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">com.typesafe.config.<a href="../../../com/typesafe/config/ConfigValueType.html" title="enum in com.typesafe.config"><span class="typeNameLink">ConfigValueType</span></a></li>
|
||||
<li type="circle">com.typesafe.config.<a href="../../../com/typesafe/config/ConfigSyntax.html" title="enum in com.typesafe.config"><span class="typeNameLink">ConfigSyntax</span></a></li>
|
||||
<li type="circle">com.typesafe.config.<a href="../../../com/typesafe/config/ConfigValueType.html" title="enum in com.typesafe.config"><span class="typeNameLink">ConfigValueType</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigDocument</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L22" target="_blank" >ConfigDocument</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L22" target="_blank" >ConfigDocument</a></pre>
|
||||
<div class="block">Represents an individual HOCON or JSON file, preserving all
|
||||
formatting and syntax details. This can be used to replace
|
||||
individual values and exactly render the original text of the
|
||||
@ -192,7 +192,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withValueText</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L41" target="_blank" >withValueText</a>(java.lang.String path,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L41" target="_blank" >withValueText</a>(java.lang.String path,
|
||||
java.lang.String newValue)</pre>
|
||||
<div class="block">Returns a new ConfigDocument that is a copy of the current ConfigDocument,
|
||||
but with the desired value set at the desired path. If the path exists, it will
|
||||
@ -221,7 +221,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withValue</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L55" target="_blank" >withValue</a>(java.lang.String path,
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L55" target="_blank" >withValue</a>(java.lang.String path,
|
||||
<a href="../../../../com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config">ConfigValue</a> newValue)</pre>
|
||||
<div class="block">Returns a new ConfigDocument that is a copy of the current
|
||||
ConfigDocument, but with the desired value set at the
|
||||
@ -244,7 +244,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>withoutPath</h4>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L66" target="_blank" >withoutPath</a>(java.lang.String path)</pre>
|
||||
<pre><a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L66" target="_blank" >withoutPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Returns a new ConfigDocument that is a copy of the current ConfigDocument, but with
|
||||
all values at the desired path removed. If the path does not exist in the document,
|
||||
a copy of the current document will be returned. If there is an array at the root, an exception
|
||||
@ -263,7 +263,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>hasPath</h4>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L74" target="_blank" >hasPath</a>(java.lang.String path)</pre>
|
||||
<pre>boolean <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L74" target="_blank" >hasPath</a>(java.lang.String path)</pre>
|
||||
<div class="block">Returns a boolean indicating whether or not a ConfigDocument has a value at the desired path.
|
||||
null counts as a value for purposes of this check.</div>
|
||||
<dl>
|
||||
@ -280,7 +280,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>render</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L81" target="_blank" >render</a>()</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocument.java#L81" target="_blank" >render</a>()</pre>
|
||||
<div class="block">The original text of the input, modified if necessary with
|
||||
any replaced or added values.</div>
|
||||
<dl>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigDocumentFactory</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -108,7 +108,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L14" target="_blank" >ConfigDocumentFactory</a>
|
||||
<pre>public final class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L14" target="_blank" >ConfigDocumentFactory</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Factory for creating <a href="../../../../com/typesafe/config/parser/ConfigDocument.html" title="interface in com.typesafe.config.parser"><code>ConfigDocument</code></a> instances.</div>
|
||||
</li>
|
||||
@ -217,7 +217,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigDocumentFactory</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L14" target="_blank" >ConfigDocumentFactory</a>()</pre>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L14" target="_blank" >ConfigDocumentFactory</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -234,7 +234,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseReader</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L26" target="_blank" >parseReader</a>(java.io.Reader reader,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L26" target="_blank" >parseReader</a>(java.io.Reader reader,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<div class="block">Parses a Reader into a ConfigDocument instance.</div>
|
||||
<dl>
|
||||
@ -254,7 +254,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseReader</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L40" target="_blank" >parseReader</a>(java.io.Reader reader)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L40" target="_blank" >parseReader</a>(java.io.Reader reader)</pre>
|
||||
<div class="block">Parses a reader into a Config instance as with
|
||||
<a href="../../../../com/typesafe/config/parser/ConfigDocumentFactory.html#parseReader-java.io.Reader-com.typesafe.config.ConfigParseOptions-"><code>parseReader(Reader,ConfigParseOptions)</code></a> but always uses the
|
||||
default parse options.</div>
|
||||
@ -274,7 +274,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseFile</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L54" target="_blank" >parseFile</a>(java.io.File file,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L54" target="_blank" >parseFile</a>(java.io.File file,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<div class="block">Parses a file into a ConfigDocument instance.</div>
|
||||
<dl>
|
||||
@ -294,7 +294,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseFile</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L68" target="_blank" >parseFile</a>(java.io.File file)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L68" target="_blank" >parseFile</a>(java.io.File file)</pre>
|
||||
<div class="block">Parses a file into a ConfigDocument instance as with
|
||||
<a href="../../../../com/typesafe/config/parser/ConfigDocumentFactory.html#parseFile-java.io.File-com.typesafe.config.ConfigParseOptions-"><code>parseFile(File,ConfigParseOptions)</code></a> but always uses the
|
||||
default parse options.</div>
|
||||
@ -314,7 +314,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>parseString</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L79" target="_blank" >parseString</a>(java.lang.String s,
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L79" target="_blank" >parseString</a>(java.lang.String s,
|
||||
<a href="../../../../com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a> options)</pre>
|
||||
<div class="block">Parses a string which should be valid HOCON or JSON.</div>
|
||||
<dl>
|
||||
@ -332,7 +332,7 @@ extends java.lang.Object</pre>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>parseString</h4>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L90" target="_blank" >parseString</a>(java.lang.String s)</pre>
|
||||
<pre>public static <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigDocumentFactory.java#L90" target="_blank" >parseString</a>(java.lang.String s)</pre>
|
||||
<div class="block">Parses a string (which should be valid HOCON or JSON). Uses the
|
||||
default parse options.</div>
|
||||
<dl>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:47 WEST 2020 -->
|
||||
<title>ConfigNode</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
@ -100,7 +100,7 @@ var activeTableTab = "activeTableTab";
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigNode.java#L27" target="_blank" >ConfigNode</a></pre>
|
||||
<pre>public interface <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigNode.java#L27" target="_blank" >ConfigNode</a></pre>
|
||||
<div class="block">A node in the syntax tree for a HOCON or JSON document.
|
||||
|
||||
<p>
|
||||
@ -166,7 +166,7 @@ var activeTableTab = "activeTableTab";
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>render</h4>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/parser/ConfigNode.java#L34" target="_blank" >render</a>()</pre>
|
||||
<pre>java.lang.String <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/parser/ConfigNode.java#L34" target="_blank" >render</a>()</pre>
|
||||
<div class="block">The original text of the input which was used to form this particular
|
||||
node.</div>
|
||||
<dl>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config.parser</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config.parser</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>com.typesafe.config.parser Class Hierarchy</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../../script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Constant Field Values</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Deprecated List</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>API Help</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Index</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
@ -73,6 +73,8 @@
|
||||
</a>
|
||||
<h2 class="title">A</h2>
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigException.UnresolvedSubstitution.html#addExtraDetail-java.lang.String-">addExtraDetail(String)</a></span> - Method in exception com.typesafe.config.<a href="com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigParseOptions.html#appendIncluder-com.typesafe.config.ConfigIncluder-">appendIncluder(ConfigIncluder)</a></span> - Method in class com.typesafe.config.<a href="com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a></dt>
|
||||
<dd>
|
||||
<div class="block">Appends a <a href="com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><code>ConfigIncluder</code></a> which customizes how
|
||||
@ -473,6 +475,24 @@ files.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/impl/ConfigImpl.html#defaultReference-java.lang.ClassLoader-">defaultReference(ClassLoader)</a></span> - Static method in class com.typesafe.config.impl.<a href="com/typesafe/config/impl/ConfigImpl.html" title="class in com.typesafe.config.impl">ConfigImpl</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigFactory.html#defaultReferenceUnresolved--">defaultReferenceUnresolved()</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></dt>
|
||||
<dd>
|
||||
<div class="block">Obtains the default reference configuration, which is currently created
|
||||
by merging all resources "reference.conf" found on the classpath and
|
||||
overriding the result with system properties.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigFactory.html#defaultReferenceUnresolved-java.lang.ClassLoader-">defaultReferenceUnresolved(ClassLoader)</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></dt>
|
||||
<dd>
|
||||
<div class="block">Like <a href="com/typesafe/config/ConfigFactory.html#defaultReferenceUnresolved--"><code>ConfigFactory.defaultReferenceUnresolved()</code></a> but allows you to specify a
|
||||
class loader to use rather than the current context class loader.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/impl/ConfigImpl.html#defaultReferenceUnresolved-java.lang.ClassLoader-">defaultReferenceUnresolved(ClassLoader)</a></span> - Static method in class com.typesafe.config.impl.<a href="com/typesafe/config/impl/ConfigImpl.html" title="class in com.typesafe.config.impl">ConfigImpl</a></dt>
|
||||
<dd>
|
||||
<div class="block">This returns the unresolved reference configuration, but before doing so,
|
||||
it verifies that the reference configuration resolves, to ensure that it
|
||||
is self contained and doesn't depend on any higher level configuration
|
||||
files.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigParseOptions.html#defaults--">defaults()</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a></dt>
|
||||
<dd>
|
||||
<div class="block">Gets an instance of <code>ConfigParseOptions</code> with all fields
|
||||
@ -1032,6 +1052,11 @@ files.</div>
|
||||
</a>
|
||||
<h2 class="title">O</h2>
|
||||
<dl>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigMemorySize.html#ofBytes-java.math.BigInteger-">ofBytes(BigInteger)</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config">ConfigMemorySize</a></dt>
|
||||
<dd>
|
||||
<div class="block">Constructs a ConfigMemorySize representing the given
|
||||
number of bytes.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigMemorySize.html#ofBytes-long-">ofBytes(long)</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config">ConfigMemorySize</a></dt>
|
||||
<dd>
|
||||
<div class="block">Constructs a ConfigMemorySize representing the given
|
||||
@ -1108,6 +1133,20 @@ files.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/DefaultConfigLoadingStrategy.html#parseApplicationConfig-com.typesafe.config.ConfigParseOptions-">parseApplicationConfig(ConfigParseOptions)</a></span> - Method in class com.typesafe.config.<a href="com/typesafe/config/DefaultConfigLoadingStrategy.html" title="class in com.typesafe.config">DefaultConfigLoadingStrategy</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigFactory.html#parseApplicationReplacement--">parseApplicationReplacement()</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></dt>
|
||||
<dd>
|
||||
<div class="block">Parse only any application replacement (specified by one of config.{resource,file,url}), returning
|
||||
an empty Config if no overrides were set.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigFactory.html#parseApplicationReplacement-java.lang.ClassLoader-">parseApplicationReplacement(ClassLoader)</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></dt>
|
||||
<dd>
|
||||
<div class="block">Like <a href="com/typesafe/config/ConfigFactory.html#parseApplicationReplacement--"><code>ConfigFactory.parseApplicationReplacement()</code></a> but allows you to specify a class loader
|
||||
ti yse rather than the current context class loader.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigFactory.html#parseApplicationReplacement-com.typesafe.config.ConfigParseOptions-">parseApplicationReplacement(ConfigParseOptions)</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></dt>
|
||||
<dd>
|
||||
<div class="block">Like <a href="com/typesafe/config/ConfigFactory.html#parseApplicationReplacement--"><code>ConfigFactory.parseApplicationReplacement()</code></a> but allows you to specify parse options.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/impl/Parseable.html#parseConfigDocument--">parseConfigDocument()</a></span> - Method in class com.typesafe.config.impl.<a href="com/typesafe/config/impl/Parseable.html" title="class in com.typesafe.config.impl">Parseable</a></dt>
|
||||
<dd> </dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigFactory.html#parseFile-java.io.File-com.typesafe.config.ConfigParseOptions-">parseFile(File, ConfigParseOptions)</a></span> - Static method in class com.typesafe.config.<a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></dt>
|
||||
@ -1483,6 +1522,10 @@ files.</div>
|
||||
<dd>
|
||||
<div class="block">Gets the size in bytes.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigMemorySize.html#toBytesBigInteger--">toBytesBigInteger()</a></span> - Method in class com.typesafe.config.<a href="com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config">ConfigMemorySize</a></dt>
|
||||
<dd>
|
||||
<div class="block">Gets the size in bytes.</div>
|
||||
</dd>
|
||||
<dt><span class="memberNameLink"><a href="com/typesafe/config/ConfigObject.html#toConfig--">toConfig()</a></span> - Method in interface com.typesafe.config.<a href="com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config">ConfigObject</a></dt>
|
||||
<dd>
|
||||
<div class="block">Converts this object to a <a href="com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a> instance, enabling you to use
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<script type="text/javascript">
|
||||
tmpTargetPage = "" + window.location.search;
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:09 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Overview List</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Overview</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
@ -69,8 +69,8 @@
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="contentContainer">
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Public API (version 1.3.4) table, listing packages, and an explanation">
|
||||
<caption><span>Public API (version 1.3.4)</span><span class="tabEnd"> </span></caption>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Public API (version 1.4.1) table, listing packages, and an explanation">
|
||||
<caption><span>Public API (version 1.4.1)</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Package</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Class Hierarchy</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_202) on Thu Apr 18 15:35:10 EEST 2019 -->
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 22:56:48 WEST 2020 -->
|
||||
<title>Serialized Form</title>
|
||||
<meta name="date" content="2019-04-18">
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
@ -90,7 +90,7 @@
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>readObject</h4>
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L84" target="_blank" >readObject</a>(java.io.ObjectInputStream in)
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L84" target="_blank" >readObject</a>(java.io.ObjectInputStream in)
|
||||
throws java.io.IOException,
|
||||
java.lang.ClassNotFoundException</pre>
|
||||
<dl>
|
||||
@ -101,7 +101,7 @@
|
||||
</li>
|
||||
<li class="blockListLast">
|
||||
<h4>writeObject</h4>
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.java#L56" target="_blank" >writeObject</a>(java.io.ObjectOutputStream out)
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L56" target="_blank" >writeObject</a>(java.io.ObjectOutputStream out)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
@ -210,6 +210,17 @@
|
||||
<dt>serialVersionUID:</dt>
|
||||
<dd>1L</dd>
|
||||
</dl>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h3>Serialized Fields</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockListLast">
|
||||
<h4>detail</h4>
|
||||
<pre>java.lang.String detail</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList"><a name="com.typesafe.config.ConfigException.ValidationFailed">
|
||||
<!-- -->
|
||||
@ -241,7 +252,7 @@
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>readObject</h4>
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L365" target="_blank" >readObject</a>(java.io.ObjectInputStream in)
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L377" target="_blank" >readObject</a>(java.io.ObjectInputStream in)
|
||||
throws java.io.IOException,
|
||||
java.lang.ClassNotFoundException</pre>
|
||||
<dl>
|
||||
@ -252,7 +263,7 @@
|
||||
</li>
|
||||
<li class="blockListLast">
|
||||
<h4>writeObject</h4>
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/692edecb510ec091376e9e5bcdca614c718e11f8/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L360" target="_blank" >writeObject</a>(java.io.ObjectOutputStream out)
|
||||
<pre>private void <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.ValidationProblem.java#L372" target="_blank" >writeObject</a>(java.io.ObjectOutputStream out)
|
||||
throws java.io.IOException</pre>
|
||||
<dl>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -292,168 +292,180 @@
|
||||
<span class="sourceLineNo">284</span> public static class UnresolvedSubstitution extends Parse {<a name="line.284"></a>
|
||||
<span class="sourceLineNo">285</span> private static final long serialVersionUID = 1L;<a name="line.285"></a>
|
||||
<span class="sourceLineNo">286</span><a name="line.286"></a>
|
||||
<span class="sourceLineNo">287</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> }<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span><a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> this(origin, detail, null);<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span> }<a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> }<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span><a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> /**<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span> * Exception indicating that you tried to use a function that requires<a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> * either application code or the library; it's wrong to write a handler for<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> * this exception because you should be able to fix the code to avoid it by<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span> * adding calls to {@link Config#resolve}.<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> */<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> public static class NotResolved extends BugOrBroken {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> private static final long serialVersionUID = 1L;<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span><a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> public NotResolved(String message, Throwable cause) {<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> super(message, cause);<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> }<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span><a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> public NotResolved(String message) {<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> this(message, null);<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> /**<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> */<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> public static class ValidationProblem implements Serializable {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">287</span> private final String detail;<a name="line.287"></a>
|
||||
<span class="sourceLineNo">288</span><a name="line.288"></a>
|
||||
<span class="sourceLineNo">289</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail, Throwable cause) {<a name="line.289"></a>
|
||||
<span class="sourceLineNo">290</span> super(origin, "Could not resolve substitution to a value: " + detail, cause);<a name="line.290"></a>
|
||||
<span class="sourceLineNo">291</span> this.detail = detail;<a name="line.291"></a>
|
||||
<span class="sourceLineNo">292</span> }<a name="line.292"></a>
|
||||
<span class="sourceLineNo">293</span><a name="line.293"></a>
|
||||
<span class="sourceLineNo">294</span> public UnresolvedSubstitution(ConfigOrigin origin, String detail) {<a name="line.294"></a>
|
||||
<span class="sourceLineNo">295</span> this(origin, detail, null);<a name="line.295"></a>
|
||||
<span class="sourceLineNo">296</span> }<a name="line.296"></a>
|
||||
<span class="sourceLineNo">297</span><a name="line.297"></a>
|
||||
<span class="sourceLineNo">298</span> private UnresolvedSubstitution(UnresolvedSubstitution wrapped, ConfigOrigin origin, String message) {<a name="line.298"></a>
|
||||
<span class="sourceLineNo">299</span> super(origin, message, wrapped);<a name="line.299"></a>
|
||||
<span class="sourceLineNo">300</span> this.detail = wrapped.detail;<a name="line.300"></a>
|
||||
<span class="sourceLineNo">301</span> }<a name="line.301"></a>
|
||||
<span class="sourceLineNo">302</span><a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> public UnresolvedSubstitution addExtraDetail(String extra) {<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> return new UnresolvedSubstitution(this, origin(), String.format(extra, detail));<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> }<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span><a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> /**<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> * Exception indicating that you tried to use a function that requires<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> * substitutions to be resolved, but substitutions have not been resolved<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> * (that is, {@link Config#resolve} was not called). This is always a bug in<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> * either application code or the library; it's wrong to write a handler for<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> * this exception because you should be able to fix the code to avoid it by<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> * adding calls to {@link Config#resolve}.<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> */<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> public static class NotResolved extends BugOrBroken {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> private static final long serialVersionUID = 1L;<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span><a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> public NotResolved(String message, Throwable cause) {<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> super(message, cause);<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> }<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span><a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> final private String path;<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> final private transient ConfigOrigin origin;<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> final private String problem;<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span><a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> this.path = path;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> this.origin = origin;<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> this.problem = problem;<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span><a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> /**<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> * Returns the config setting causing the problem.<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> * @return the path of the problem setting<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> */<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> public String path() {<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> return path;<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> }<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span><a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> /**<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> * Returns where the problem occurred (origin may include info on the<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> * file, line number, etc.).<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> * @return the origin of the problem setting<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> */<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> public ConfigOrigin origin() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> return origin;<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> }<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span><a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> /**<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> * Returns a description of the problem.<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> * @return description of the problem<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> */<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public String problem() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return problem;<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> // We customize serialization because ConfigOrigin isn't<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // serializable and we don't want it to be<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> out.defaultWriteObject();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> }<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> ClassNotFoundException {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> in.defaultReadObject();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> }<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> @Override<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> public String toString() {<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.374"></a>
|
||||
<span class="sourceLineNo">323</span> public NotResolved(String message) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> this(message, null);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> /**<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> * Information about a problem that occurred in {@link Config#checkValid}. A<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> * {@link ConfigException.ValidationFailed} exception thrown from<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> * <code>checkValid()</code> includes a list of problems encountered.<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> */<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> public static class ValidationProblem implements Serializable {<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span><a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> final private String path;<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> final private transient ConfigOrigin origin;<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span> final private String problem;<a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span><a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> public ValidationProblem(String path, ConfigOrigin origin, String problem) {<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> this.path = path;<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> this.origin = origin;<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> this.problem = problem;<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> }<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span><a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> /**<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> * Returns the config setting causing the problem.<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> * @return the path of the problem setting<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> */<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> public String path() {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> return path;<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span><a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> /**<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> * Returns where the problem occurred (origin may include info on the<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> * file, line number, etc.).<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> * @return the origin of the problem setting<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> */<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public ConfigOrigin origin() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> return origin;<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> }<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span><a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> /**<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span> * Returns a description of the problem.<a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span> * @return description of the problem<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> */<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> public String problem() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> return problem;<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> // We customize serialization because ConfigOrigin isn't<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> // serializable and we don't want it to be<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private void writeObject(java.io.ObjectOutputStream out) throws IOException {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> out.defaultWriteObject();<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> ConfigImplUtil.writeOrigin(out, origin);<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span> }<a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> }<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span><a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> * long string listing all the problems found.<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> */<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> public static class ValidationFailed extends ConfigException {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static final long serialVersionUID = 1L;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span><a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> final private Iterable<ValidationProblem> problems;<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> super(makeMessage(problems), null);<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> this.problems = problems;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> }<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span><a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> public Iterable<ValidationProblem> problems() {<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> return problems;<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> }<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span><a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> StringBuilder sb = new StringBuilder();<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span> for (ValidationProblem p : problems) {<a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> sb.append(p.origin().description());<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> sb.append(": ");<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> sb.append(p.path());<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> sb.append(": ");<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> sb.append(p.problem());<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> sb.append(", ");<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> }<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> if (sb.length() == 0)<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> throw new ConfigException.BugOrBroken(<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> "ValidationFailed must have a non-empty list of problems");<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span><a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> return sb.toString();<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> }<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> /**<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> * @since 1.3.0<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> */<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> public static class BadBean extends BugOrBroken {<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> private static final long serialVersionUID = 1L;<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span><a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> public BadBean(String message, Throwable cause) {<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> super(message, cause);<a name="line.425"></a>
|
||||
<span class="sourceLineNo">376</span><a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> private void readObject(java.io.ObjectInputStream in) throws IOException,<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> ClassNotFoundException {<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> in.defaultReadObject();<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> ConfigOrigin origin = ConfigImplUtil.readOrigin(in);<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> setOriginField(this, ValidationProblem.class, origin);<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> }<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span><a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> @Override<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> public String toString() {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> return "ValidationProblem(" + path + "," + origin + "," + problem + ")";<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span><a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> /**<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> * Exception indicating that {@link Config#checkValid} found validity<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> * problems. The problems are available via the {@link #problems()} method.<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> * The <code>getMessage()</code> of this exception is a potentially very<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> * long string listing all the problems found.<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> */<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> public static class ValidationFailed extends ConfigException {<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> private static final long serialVersionUID = 1L;<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span><a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> final private Iterable<ValidationProblem> problems;<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public ValidationFailed(Iterable<ValidationProblem> problems) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> super(makeMessage(problems), null);<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> this.problems = problems;<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> }<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span><a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> public Iterable<ValidationProblem> problems() {<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> return problems;<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> }<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span><a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> private static String makeMessage(Iterable<ValidationProblem> problems) {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> StringBuilder sb = new StringBuilder();<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> for (ValidationProblem p : problems) {<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> sb.append(p.origin().description());<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> sb.append(": ");<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> sb.append(p.path());<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> sb.append(": ");<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> sb.append(p.problem());<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> sb.append(", ");<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> }<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> if (sb.length() == 0)<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> throw new ConfigException.BugOrBroken(<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> "ValidationFailed must have a non-empty list of problems");<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> sb.setLength(sb.length() - 2); // chop comma and space<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span><a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> return sb.toString();<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> public BadBean(String message) {<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> this(message, null);<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> }<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> }<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span><a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> /**<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> * Exception that doesn't fall into any other category.<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> */<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public static class Generic extends ConfigException {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> private static final long serialVersionUID = 1L;<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span><a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> public Generic(String message, Throwable cause) {<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> super(message, cause);<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> public Generic(String message) {<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span> this(message, null);<a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> }<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> }<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span>}<a name="line.448"></a>
|
||||
<span class="sourceLineNo">427</span> }<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span><a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> /**<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * Some problem with a JavaBean we are trying to initialize.<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * @since 1.3.0<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> */<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> public static class BadBean extends BugOrBroken {<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> private static final long serialVersionUID = 1L;<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span><a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> public BadBean(String message, Throwable cause) {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> super(message, cause);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span><a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> public BadBean(String message) {<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> this(message, null);<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> }<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> /**<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> * Exception that doesn't fall into any other category.<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> */<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> public static class Generic extends ConfigException {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> private static final long serialVersionUID = 1L;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span><a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> public Generic(String message, Throwable cause) {<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> super(message, cause);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> }<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> public Generic(String message) {<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> this(message, null);<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> }<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> }<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span><a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span>}<a name="line.460"></a>
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,64 +11,97 @@
|
||||
<span class="sourceLineNo">003</span> */<a name="line.3"></a>
|
||||
<span class="sourceLineNo">004</span>package com.typesafe.config;<a name="line.4"></a>
|
||||
<span class="sourceLineNo">005</span><a name="line.5"></a>
|
||||
<span class="sourceLineNo">006</span>/**<a name="line.6"></a>
|
||||
<span class="sourceLineNo">007</span> * An immutable class representing an amount of memory. Use<a name="line.7"></a>
|
||||
<span class="sourceLineNo">008</span> * static factory methods such as {@link<a name="line.8"></a>
|
||||
<span class="sourceLineNo">009</span> * ConfigMemorySize#ofBytes(long)} to create instances.<a name="line.9"></a>
|
||||
<span class="sourceLineNo">010</span> *<a name="line.10"></a>
|
||||
<span class="sourceLineNo">011</span> * @since 1.3.0<a name="line.11"></a>
|
||||
<span class="sourceLineNo">012</span> */<a name="line.12"></a>
|
||||
<span class="sourceLineNo">013</span>public final class ConfigMemorySize {<a name="line.13"></a>
|
||||
<span class="sourceLineNo">014</span> private final long bytes;<a name="line.14"></a>
|
||||
<span class="sourceLineNo">015</span><a name="line.15"></a>
|
||||
<span class="sourceLineNo">016</span> private ConfigMemorySize(long bytes) {<a name="line.16"></a>
|
||||
<span class="sourceLineNo">017</span> if (bytes < 0)<a name="line.17"></a>
|
||||
<span class="sourceLineNo">018</span> throw new IllegalArgumentException("Attempt to construct ConfigMemorySize with negative number: " + bytes);<a name="line.18"></a>
|
||||
<span class="sourceLineNo">019</span> this.bytes = bytes;<a name="line.19"></a>
|
||||
<span class="sourceLineNo">020</span> }<a name="line.20"></a>
|
||||
<span class="sourceLineNo">021</span><a name="line.21"></a>
|
||||
<span class="sourceLineNo">022</span> /**<a name="line.22"></a>
|
||||
<span class="sourceLineNo">023</span> * Constructs a ConfigMemorySize representing the given<a name="line.23"></a>
|
||||
<span class="sourceLineNo">024</span> * number of bytes.<a name="line.24"></a>
|
||||
<span class="sourceLineNo">025</span> * @since 1.3.0<a name="line.25"></a>
|
||||
<span class="sourceLineNo">026</span> * @param bytes a number of bytes<a name="line.26"></a>
|
||||
<span class="sourceLineNo">027</span> * @return an instance representing the number of bytes<a name="line.27"></a>
|
||||
<span class="sourceLineNo">028</span> */<a name="line.28"></a>
|
||||
<span class="sourceLineNo">029</span> public static ConfigMemorySize ofBytes(long bytes) {<a name="line.29"></a>
|
||||
<span class="sourceLineNo">030</span> return new ConfigMemorySize(bytes);<a name="line.30"></a>
|
||||
<span class="sourceLineNo">031</span> }<a name="line.31"></a>
|
||||
<span class="sourceLineNo">032</span><a name="line.32"></a>
|
||||
<span class="sourceLineNo">033</span> /**<a name="line.33"></a>
|
||||
<span class="sourceLineNo">034</span> * Gets the size in bytes.<a name="line.34"></a>
|
||||
<span class="sourceLineNo">035</span> * @since 1.3.0<a name="line.35"></a>
|
||||
<span class="sourceLineNo">036</span> * @return how many bytes<a name="line.36"></a>
|
||||
<span class="sourceLineNo">037</span> */<a name="line.37"></a>
|
||||
<span class="sourceLineNo">038</span> public long toBytes() {<a name="line.38"></a>
|
||||
<span class="sourceLineNo">039</span> return bytes;<a name="line.39"></a>
|
||||
<span class="sourceLineNo">040</span> }<a name="line.40"></a>
|
||||
<span class="sourceLineNo">041</span><a name="line.41"></a>
|
||||
<span class="sourceLineNo">042</span> @Override<a name="line.42"></a>
|
||||
<span class="sourceLineNo">043</span> public String toString() {<a name="line.43"></a>
|
||||
<span class="sourceLineNo">044</span> return "ConfigMemorySize(" + bytes + ")";<a name="line.44"></a>
|
||||
<span class="sourceLineNo">045</span> }<a name="line.45"></a>
|
||||
<span class="sourceLineNo">046</span><a name="line.46"></a>
|
||||
<span class="sourceLineNo">047</span> @Override<a name="line.47"></a>
|
||||
<span class="sourceLineNo">048</span> public boolean equals(Object other) {<a name="line.48"></a>
|
||||
<span class="sourceLineNo">049</span> if (other instanceof ConfigMemorySize) {<a name="line.49"></a>
|
||||
<span class="sourceLineNo">050</span> return ((ConfigMemorySize)other).bytes == this.bytes;<a name="line.50"></a>
|
||||
<span class="sourceLineNo">051</span> } else {<a name="line.51"></a>
|
||||
<span class="sourceLineNo">052</span> return false;<a name="line.52"></a>
|
||||
<span class="sourceLineNo">053</span> }<a name="line.53"></a>
|
||||
<span class="sourceLineNo">054</span> }<a name="line.54"></a>
|
||||
<span class="sourceLineNo">055</span><a name="line.55"></a>
|
||||
<span class="sourceLineNo">056</span> @Override<a name="line.56"></a>
|
||||
<span class="sourceLineNo">057</span> public int hashCode() {<a name="line.57"></a>
|
||||
<span class="sourceLineNo">058</span> // in Java 8 this can become Long.hashCode(bytes)<a name="line.58"></a>
|
||||
<span class="sourceLineNo">059</span> return Long.valueOf(bytes).hashCode();<a name="line.59"></a>
|
||||
<span class="sourceLineNo">060</span> }<a name="line.60"></a>
|
||||
<span class="sourceLineNo">061</span><a name="line.61"></a>
|
||||
<span class="sourceLineNo">062</span>}<a name="line.62"></a>
|
||||
<span class="sourceLineNo">063</span><a name="line.63"></a>
|
||||
<span class="sourceLineNo">006</span>import java.math.BigInteger;<a name="line.6"></a>
|
||||
<span class="sourceLineNo">007</span><a name="line.7"></a>
|
||||
<span class="sourceLineNo">008</span>/**<a name="line.8"></a>
|
||||
<span class="sourceLineNo">009</span> * An immutable class representing an amount of memory. Use<a name="line.9"></a>
|
||||
<span class="sourceLineNo">010</span> * static factory methods such as {@link<a name="line.10"></a>
|
||||
<span class="sourceLineNo">011</span> * ConfigMemorySize#ofBytes(BigInteger)} to create instances.<a name="line.11"></a>
|
||||
<span class="sourceLineNo">012</span> *<a name="line.12"></a>
|
||||
<span class="sourceLineNo">013</span> * @since 1.3.0<a name="line.13"></a>
|
||||
<span class="sourceLineNo">014</span> */<a name="line.14"></a>
|
||||
<span class="sourceLineNo">015</span>public final class ConfigMemorySize {<a name="line.15"></a>
|
||||
<span class="sourceLineNo">016</span><a name="line.16"></a>
|
||||
<span class="sourceLineNo">017</span> private BigInteger bytes;<a name="line.17"></a>
|
||||
<span class="sourceLineNo">018</span><a name="line.18"></a>
|
||||
<span class="sourceLineNo">019</span> private ConfigMemorySize(BigInteger bytes) {<a name="line.19"></a>
|
||||
<span class="sourceLineNo">020</span> if (bytes.signum() < 0)<a name="line.20"></a>
|
||||
<span class="sourceLineNo">021</span> throw new IllegalArgumentException("Attempt to construct ConfigMemorySize with negative number: " + bytes);<a name="line.21"></a>
|
||||
<span class="sourceLineNo">022</span> this.bytes = bytes;<a name="line.22"></a>
|
||||
<span class="sourceLineNo">023</span> }<a name="line.23"></a>
|
||||
<span class="sourceLineNo">024</span><a name="line.24"></a>
|
||||
<span class="sourceLineNo">025</span> /**<a name="line.25"></a>
|
||||
<span class="sourceLineNo">026</span> * Constructs a ConfigMemorySize representing the given<a name="line.26"></a>
|
||||
<span class="sourceLineNo">027</span> * number of bytes.<a name="line.27"></a>
|
||||
<span class="sourceLineNo">028</span> * @since 1.3.0<a name="line.28"></a>
|
||||
<span class="sourceLineNo">029</span> * @param bytes a number of bytes<a name="line.29"></a>
|
||||
<span class="sourceLineNo">030</span> * @return an instance representing the number of bytes<a name="line.30"></a>
|
||||
<span class="sourceLineNo">031</span> */<a name="line.31"></a>
|
||||
<span class="sourceLineNo">032</span> public static ConfigMemorySize ofBytes(BigInteger bytes) {<a name="line.32"></a>
|
||||
<span class="sourceLineNo">033</span> return new ConfigMemorySize(bytes);<a name="line.33"></a>
|
||||
<span class="sourceLineNo">034</span> }<a name="line.34"></a>
|
||||
<span class="sourceLineNo">035</span><a name="line.35"></a>
|
||||
<span class="sourceLineNo">036</span> /**<a name="line.36"></a>
|
||||
<span class="sourceLineNo">037</span> * Constructs a ConfigMemorySize representing the given<a name="line.37"></a>
|
||||
<span class="sourceLineNo">038</span> * number of bytes.<a name="line.38"></a>
|
||||
<span class="sourceLineNo">039</span> * @param bytes a number of bytes<a name="line.39"></a>
|
||||
<span class="sourceLineNo">040</span> * @return an instance representing the number of bytes<a name="line.40"></a>
|
||||
<span class="sourceLineNo">041</span> */<a name="line.41"></a>
|
||||
<span class="sourceLineNo">042</span> public static ConfigMemorySize ofBytes(long bytes) {<a name="line.42"></a>
|
||||
<span class="sourceLineNo">043</span> return new ConfigMemorySize(BigInteger.valueOf(bytes));<a name="line.43"></a>
|
||||
<span class="sourceLineNo">044</span> }<a name="line.44"></a>
|
||||
<span class="sourceLineNo">045</span><a name="line.45"></a>
|
||||
<span class="sourceLineNo">046</span> /**<a name="line.46"></a>
|
||||
<span class="sourceLineNo">047</span> * Gets the size in bytes.<a name="line.47"></a>
|
||||
<span class="sourceLineNo">048</span> *<a name="line.48"></a>
|
||||
<span class="sourceLineNo">049</span> * @since 1.3.0<a name="line.49"></a>
|
||||
<span class="sourceLineNo">050</span> * @return how many bytes<a name="line.50"></a>
|
||||
<span class="sourceLineNo">051</span> * @exception IllegalArgumentException when memory value<a name="line.51"></a>
|
||||
<span class="sourceLineNo">052</span> * in bytes doesn't fit in a long value. Consider using<a name="line.52"></a>
|
||||
<span class="sourceLineNo">053</span> * {@link #toBytesBigInteger} in this case.<a name="line.53"></a>
|
||||
<span class="sourceLineNo">054</span> */<a name="line.54"></a>
|
||||
<span class="sourceLineNo">055</span> public long toBytes() {<a name="line.55"></a>
|
||||
<span class="sourceLineNo">056</span> if (bytes.bitLength() < 64)<a name="line.56"></a>
|
||||
<span class="sourceLineNo">057</span> return bytes.longValue();<a name="line.57"></a>
|
||||
<span class="sourceLineNo">058</span> else<a name="line.58"></a>
|
||||
<span class="sourceLineNo">059</span> throw new IllegalArgumentException(<a name="line.59"></a>
|
||||
<span class="sourceLineNo">060</span> "size-in-bytes value is out of range for a 64-bit long: '" + bytes + "'");<a name="line.60"></a>
|
||||
<span class="sourceLineNo">061</span> }<a name="line.61"></a>
|
||||
<span class="sourceLineNo">062</span><a name="line.62"></a>
|
||||
<span class="sourceLineNo">063</span> /**<a name="line.63"></a>
|
||||
<span class="sourceLineNo">064</span> * Gets the size in bytes. The behavior of this method<a name="line.64"></a>
|
||||
<span class="sourceLineNo">065</span> * is the same as that of the {@link #toBytes()} method,<a name="line.65"></a>
|
||||
<span class="sourceLineNo">066</span> * except that the number of bytes returned as a<a name="line.66"></a>
|
||||
<span class="sourceLineNo">067</span> * BigInteger value. Use it when memory value in bytes<a name="line.67"></a>
|
||||
<span class="sourceLineNo">068</span> * doesn't fit in a long value.<a name="line.68"></a>
|
||||
<span class="sourceLineNo">069</span> * @return how many bytes<a name="line.69"></a>
|
||||
<span class="sourceLineNo">070</span> */<a name="line.70"></a>
|
||||
<span class="sourceLineNo">071</span> public BigInteger toBytesBigInteger() {<a name="line.71"></a>
|
||||
<span class="sourceLineNo">072</span> return bytes;<a name="line.72"></a>
|
||||
<span class="sourceLineNo">073</span> }<a name="line.73"></a>
|
||||
<span class="sourceLineNo">074</span><a name="line.74"></a>
|
||||
<span class="sourceLineNo">075</span> @Override<a name="line.75"></a>
|
||||
<span class="sourceLineNo">076</span> public String toString() {<a name="line.76"></a>
|
||||
<span class="sourceLineNo">077</span> return "ConfigMemorySize(" + bytes + ")";<a name="line.77"></a>
|
||||
<span class="sourceLineNo">078</span> }<a name="line.78"></a>
|
||||
<span class="sourceLineNo">079</span><a name="line.79"></a>
|
||||
<span class="sourceLineNo">080</span> @Override<a name="line.80"></a>
|
||||
<span class="sourceLineNo">081</span> public boolean equals(Object other) {<a name="line.81"></a>
|
||||
<span class="sourceLineNo">082</span> if (other instanceof ConfigMemorySize) {<a name="line.82"></a>
|
||||
<span class="sourceLineNo">083</span> return ((ConfigMemorySize)other).bytes.equals(this.bytes);<a name="line.83"></a>
|
||||
<span class="sourceLineNo">084</span> } else {<a name="line.84"></a>
|
||||
<span class="sourceLineNo">085</span> return false;<a name="line.85"></a>
|
||||
<span class="sourceLineNo">086</span> }<a name="line.86"></a>
|
||||
<span class="sourceLineNo">087</span> }<a name="line.87"></a>
|
||||
<span class="sourceLineNo">088</span><a name="line.88"></a>
|
||||
<span class="sourceLineNo">089</span> @Override<a name="line.89"></a>
|
||||
<span class="sourceLineNo">090</span> public int hashCode() {<a name="line.90"></a>
|
||||
<span class="sourceLineNo">091</span> // in Java 8 this can become Long.hashCode(bytes)<a name="line.91"></a>
|
||||
<span class="sourceLineNo">092</span> return bytes.hashCode();<a name="line.92"></a>
|
||||
<span class="sourceLineNo">093</span> }<a name="line.93"></a>
|
||||
<span class="sourceLineNo">094</span><a name="line.94"></a>
|
||||
<span class="sourceLineNo">095</span>}<a name="line.95"></a>
|
||||
<span class="sourceLineNo">096</span><a name="line.96"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -8,66 +8,18 @@
|
||||
<div class="sourceContainer">
|
||||
<pre><span class="sourceLineNo">001</span>package com.typesafe.config;<a name="line.1"></a>
|
||||
<span class="sourceLineNo">002</span><a name="line.2"></a>
|
||||
<span class="sourceLineNo">003</span>import java.io.File;<a name="line.3"></a>
|
||||
<span class="sourceLineNo">004</span>import java.net.MalformedURLException;<a name="line.4"></a>
|
||||
<span class="sourceLineNo">005</span>import java.net.URL;<a name="line.5"></a>
|
||||
<span class="sourceLineNo">006</span><a name="line.6"></a>
|
||||
<span class="sourceLineNo">007</span>/**<a name="line.7"></a>
|
||||
<span class="sourceLineNo">008</span> * Default config loading strategy. Able to load resource, file or URL.<a name="line.8"></a>
|
||||
<span class="sourceLineNo">009</span> * Behavior may be altered by defining one of VM properties<a name="line.9"></a>
|
||||
<span class="sourceLineNo">010</span> * {@code config.resource}, {@code config.file} or {@code config.url}<a name="line.10"></a>
|
||||
<span class="sourceLineNo">011</span> */<a name="line.11"></a>
|
||||
<span class="sourceLineNo">012</span>public class DefaultConfigLoadingStrategy implements ConfigLoadingStrategy {<a name="line.12"></a>
|
||||
<span class="sourceLineNo">013</span> @Override<a name="line.13"></a>
|
||||
<span class="sourceLineNo">014</span> public Config parseApplicationConfig(ConfigParseOptions parseOptions) {<a name="line.14"></a>
|
||||
<span class="sourceLineNo">015</span> ClassLoader loader = parseOptions.getClassLoader();<a name="line.15"></a>
|
||||
<span class="sourceLineNo">016</span> if (loader == null)<a name="line.16"></a>
|
||||
<span class="sourceLineNo">017</span> throw new ConfigException.BugOrBroken(<a name="line.17"></a>
|
||||
<span class="sourceLineNo">018</span> "ClassLoader should have been set here; bug in ConfigFactory. "<a name="line.18"></a>
|
||||
<span class="sourceLineNo">019</span> + "(You can probably work around this bug by passing in a class loader or calling currentThread().setContextClassLoader() though.)");<a name="line.19"></a>
|
||||
<span class="sourceLineNo">020</span><a name="line.20"></a>
|
||||
<span class="sourceLineNo">021</span> int specified = 0;<a name="line.21"></a>
|
||||
<span class="sourceLineNo">022</span><a name="line.22"></a>
|
||||
<span class="sourceLineNo">023</span> // override application.conf with config.file, config.resource,<a name="line.23"></a>
|
||||
<span class="sourceLineNo">024</span> // config.url if requested.<a name="line.24"></a>
|
||||
<span class="sourceLineNo">025</span> String resource = System.getProperty("config.resource");<a name="line.25"></a>
|
||||
<span class="sourceLineNo">026</span> if (resource != null)<a name="line.26"></a>
|
||||
<span class="sourceLineNo">027</span> specified += 1;<a name="line.27"></a>
|
||||
<span class="sourceLineNo">028</span> String file = System.getProperty("config.file");<a name="line.28"></a>
|
||||
<span class="sourceLineNo">029</span> if (file != null)<a name="line.29"></a>
|
||||
<span class="sourceLineNo">030</span> specified += 1;<a name="line.30"></a>
|
||||
<span class="sourceLineNo">031</span> String url = System.getProperty("config.url");<a name="line.31"></a>
|
||||
<span class="sourceLineNo">032</span> if (url != null)<a name="line.32"></a>
|
||||
<span class="sourceLineNo">033</span> specified += 1;<a name="line.33"></a>
|
||||
<span class="sourceLineNo">034</span><a name="line.34"></a>
|
||||
<span class="sourceLineNo">035</span> if (specified == 0) {<a name="line.35"></a>
|
||||
<span class="sourceLineNo">036</span> return ConfigFactory.parseResourcesAnySyntax("application", parseOptions);<a name="line.36"></a>
|
||||
<span class="sourceLineNo">037</span> } else if (specified > 1) {<a name="line.37"></a>
|
||||
<span class="sourceLineNo">038</span> throw new ConfigException.Generic("You set more than one of config.file='" + file<a name="line.38"></a>
|
||||
<span class="sourceLineNo">039</span> + "', config.url='" + url + "', config.resource='" + resource<a name="line.39"></a>
|
||||
<span class="sourceLineNo">040</span> + "'; don't know which one to use!");<a name="line.40"></a>
|
||||
<span class="sourceLineNo">041</span> } else {<a name="line.41"></a>
|
||||
<span class="sourceLineNo">042</span> // the override file/url/resource MUST be present or it's an error<a name="line.42"></a>
|
||||
<span class="sourceLineNo">043</span> ConfigParseOptions overrideOptions = parseOptions.setAllowMissing(false);<a name="line.43"></a>
|
||||
<span class="sourceLineNo">044</span> if (resource != null) {<a name="line.44"></a>
|
||||
<span class="sourceLineNo">045</span> if (resource.startsWith("/"))<a name="line.45"></a>
|
||||
<span class="sourceLineNo">046</span> resource = resource.substring(1);<a name="line.46"></a>
|
||||
<span class="sourceLineNo">047</span> // this deliberately does not parseResourcesAnySyntax; if<a name="line.47"></a>
|
||||
<span class="sourceLineNo">048</span> // people want that they can use an include statement.<a name="line.48"></a>
|
||||
<span class="sourceLineNo">049</span> return ConfigFactory.parseResources(loader, resource, overrideOptions);<a name="line.49"></a>
|
||||
<span class="sourceLineNo">050</span> } else if (file != null) {<a name="line.50"></a>
|
||||
<span class="sourceLineNo">051</span> return ConfigFactory.parseFile(new File(file), overrideOptions);<a name="line.51"></a>
|
||||
<span class="sourceLineNo">052</span> } else {<a name="line.52"></a>
|
||||
<span class="sourceLineNo">053</span> try {<a name="line.53"></a>
|
||||
<span class="sourceLineNo">054</span> return ConfigFactory.parseURL(new URL(url), overrideOptions);<a name="line.54"></a>
|
||||
<span class="sourceLineNo">055</span> } catch (MalformedURLException e) {<a name="line.55"></a>
|
||||
<span class="sourceLineNo">056</span> throw new ConfigException.Generic("Bad URL in config.url system property: '"<a name="line.56"></a>
|
||||
<span class="sourceLineNo">057</span> + url + "': " + e.getMessage(), e);<a name="line.57"></a>
|
||||
<span class="sourceLineNo">058</span> }<a name="line.58"></a>
|
||||
<span class="sourceLineNo">059</span> }<a name="line.59"></a>
|
||||
<span class="sourceLineNo">060</span> }<a name="line.60"></a>
|
||||
<span class="sourceLineNo">061</span> }<a name="line.61"></a>
|
||||
<span class="sourceLineNo">062</span>}<a name="line.62"></a>
|
||||
<span class="sourceLineNo">003</span>/**<a name="line.3"></a>
|
||||
<span class="sourceLineNo">004</span> * Default config loading strategy. Able to load resource, file or URL.<a name="line.4"></a>
|
||||
<span class="sourceLineNo">005</span> * Behavior may be altered by defining one of VM properties<a name="line.5"></a>
|
||||
<span class="sourceLineNo">006</span> * {@code config.resource}, {@code config.file} or {@code config.url}<a name="line.6"></a>
|
||||
<span class="sourceLineNo">007</span> */<a name="line.7"></a>
|
||||
<span class="sourceLineNo">008</span>public class DefaultConfigLoadingStrategy implements ConfigLoadingStrategy {<a name="line.8"></a>
|
||||
<span class="sourceLineNo">009</span> @Override<a name="line.9"></a>
|
||||
<span class="sourceLineNo">010</span> public Config parseApplicationConfig(ConfigParseOptions parseOptions) {<a name="line.10"></a>
|
||||
<span class="sourceLineNo">011</span> return ConfigFactory.parseApplicationReplacement(parseOptions)<a name="line.11"></a>
|
||||
<span class="sourceLineNo">012</span> .orElseGet(() -> ConfigFactory.parseResourcesAnySyntax("application", parseOptions));<a name="line.12"></a>
|
||||
<span class="sourceLineNo">013</span> }<a name="line.13"></a>
|
||||
<span class="sourceLineNo">014</span>}<a name="line.14"></a>
|
||||
|
||||
|
||||
|
||||
|
@ -310,217 +310,249 @@
|
||||
<span class="sourceLineNo">302</span> final Properties systemProperties = System.getProperties();<a name="line.302"></a>
|
||||
<span class="sourceLineNo">303</span> final Properties systemPropertiesCopy = new Properties();<a name="line.303"></a>
|
||||
<span class="sourceLineNo">304</span> synchronized (systemProperties) {<a name="line.304"></a>
|
||||
<span class="sourceLineNo">305</span> systemPropertiesCopy.putAll(systemProperties);<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> }<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> return systemPropertiesCopy;<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> }<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span><a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> private static AbstractConfigObject loadSystemProperties() {<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> return (AbstractConfigObject) Parseable.newProperties(getSystemProperties(),<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> ConfigParseOptions.defaults().setOriginDescription("system properties")).parse();<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> }<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span><a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span> private static class SystemPropertiesHolder {<a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> // this isn't final due to the reloadSystemPropertiesConfig() hack below<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> static volatile AbstractConfigObject systemProperties = loadSystemProperties();<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> }<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span><a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span> static AbstractConfigObject systemPropertiesAsConfigObject() {<a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> try {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span> return SystemPropertiesHolder.systemProperties;<a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> } catch (ExceptionInInitializerError e) {<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span> }<a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> }<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span><a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> public static Config systemPropertiesAsConfig() {<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> return systemPropertiesAsConfigObject().toConfig();<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> }<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span><a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> public static void reloadSystemPropertiesConfig() {<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span> // ConfigFactory.invalidateCaches() relies on this having the side<a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> // effect that it drops all caches<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> SystemPropertiesHolder.systemProperties = loadSystemProperties();<a name="line.335"></a>
|
||||
<span class="sourceLineNo">305</span> for (Map.Entry<Object, Object> entry: systemProperties.entrySet()) {<a name="line.305"></a>
|
||||
<span class="sourceLineNo">306</span> // Java 11 introduces 'java.version.date', but we don't want that to<a name="line.306"></a>
|
||||
<span class="sourceLineNo">307</span> // overwrite 'java.version'<a name="line.307"></a>
|
||||
<span class="sourceLineNo">308</span> if (!entry.getKey().toString().startsWith("java.version.")) {<a name="line.308"></a>
|
||||
<span class="sourceLineNo">309</span> systemPropertiesCopy.put(entry.getKey(), entry.getValue());<a name="line.309"></a>
|
||||
<span class="sourceLineNo">310</span> }<a name="line.310"></a>
|
||||
<span class="sourceLineNo">311</span> }<a name="line.311"></a>
|
||||
<span class="sourceLineNo">312</span> }<a name="line.312"></a>
|
||||
<span class="sourceLineNo">313</span> return systemPropertiesCopy;<a name="line.313"></a>
|
||||
<span class="sourceLineNo">314</span> }<a name="line.314"></a>
|
||||
<span class="sourceLineNo">315</span><a name="line.315"></a>
|
||||
<span class="sourceLineNo">316</span> private static AbstractConfigObject loadSystemProperties() {<a name="line.316"></a>
|
||||
<span class="sourceLineNo">317</span> return (AbstractConfigObject) Parseable.newProperties(getSystemProperties(),<a name="line.317"></a>
|
||||
<span class="sourceLineNo">318</span> ConfigParseOptions.defaults().setOriginDescription("system properties")).parse();<a name="line.318"></a>
|
||||
<span class="sourceLineNo">319</span> }<a name="line.319"></a>
|
||||
<span class="sourceLineNo">320</span><a name="line.320"></a>
|
||||
<span class="sourceLineNo">321</span> private static class SystemPropertiesHolder {<a name="line.321"></a>
|
||||
<span class="sourceLineNo">322</span> // this isn't final due to the reloadSystemPropertiesConfig() hack below<a name="line.322"></a>
|
||||
<span class="sourceLineNo">323</span> static volatile AbstractConfigObject systemProperties = loadSystemProperties();<a name="line.323"></a>
|
||||
<span class="sourceLineNo">324</span> }<a name="line.324"></a>
|
||||
<span class="sourceLineNo">325</span><a name="line.325"></a>
|
||||
<span class="sourceLineNo">326</span> static AbstractConfigObject systemPropertiesAsConfigObject() {<a name="line.326"></a>
|
||||
<span class="sourceLineNo">327</span> try {<a name="line.327"></a>
|
||||
<span class="sourceLineNo">328</span> return SystemPropertiesHolder.systemProperties;<a name="line.328"></a>
|
||||
<span class="sourceLineNo">329</span> } catch (ExceptionInInitializerError e) {<a name="line.329"></a>
|
||||
<span class="sourceLineNo">330</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.330"></a>
|
||||
<span class="sourceLineNo">331</span> }<a name="line.331"></a>
|
||||
<span class="sourceLineNo">332</span> }<a name="line.332"></a>
|
||||
<span class="sourceLineNo">333</span><a name="line.333"></a>
|
||||
<span class="sourceLineNo">334</span> public static Config systemPropertiesAsConfig() {<a name="line.334"></a>
|
||||
<span class="sourceLineNo">335</span> return systemPropertiesAsConfigObject().toConfig();<a name="line.335"></a>
|
||||
<span class="sourceLineNo">336</span> }<a name="line.336"></a>
|
||||
<span class="sourceLineNo">337</span><a name="line.337"></a>
|
||||
<span class="sourceLineNo">338</span> private static AbstractConfigObject loadEnvVariables() {<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> return PropertiesParser.fromStringMap(newSimpleOrigin("env variables"), System.getenv());<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> }<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span><a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> private static class EnvVariablesHolder {<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span> static volatile AbstractConfigObject envVariables = loadEnvVariables();<a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> }<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span><a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> static AbstractConfigObject envVariablesAsConfigObject() {<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span> try {<a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> return EnvVariablesHolder.envVariables;<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> } catch (ExceptionInInitializerError e) {<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span> }<a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> }<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span><a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> public static Config envVariablesAsConfig() {<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> return envVariablesAsConfigObject().toConfig();<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> }<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span><a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> public static void reloadEnvVariablesConfig() {<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span> // ConfigFactory.invalidateCaches() relies on this having the side<a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> // effect that it drops all caches<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> EnvVariablesHolder.envVariables = loadEnvVariables();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">338</span> public static void reloadSystemPropertiesConfig() {<a name="line.338"></a>
|
||||
<span class="sourceLineNo">339</span> // ConfigFactory.invalidateCaches() relies on this having the side<a name="line.339"></a>
|
||||
<span class="sourceLineNo">340</span> // effect that it drops all caches<a name="line.340"></a>
|
||||
<span class="sourceLineNo">341</span> SystemPropertiesHolder.systemProperties = loadSystemProperties();<a name="line.341"></a>
|
||||
<span class="sourceLineNo">342</span> }<a name="line.342"></a>
|
||||
<span class="sourceLineNo">343</span><a name="line.343"></a>
|
||||
<span class="sourceLineNo">344</span> private static AbstractConfigObject loadEnvVariables() {<a name="line.344"></a>
|
||||
<span class="sourceLineNo">345</span> return PropertiesParser.fromStringMap(newSimpleOrigin("env variables"), System.getenv());<a name="line.345"></a>
|
||||
<span class="sourceLineNo">346</span> }<a name="line.346"></a>
|
||||
<span class="sourceLineNo">347</span><a name="line.347"></a>
|
||||
<span class="sourceLineNo">348</span> private static class EnvVariablesHolder {<a name="line.348"></a>
|
||||
<span class="sourceLineNo">349</span> static volatile AbstractConfigObject envVariables = loadEnvVariables();<a name="line.349"></a>
|
||||
<span class="sourceLineNo">350</span> }<a name="line.350"></a>
|
||||
<span class="sourceLineNo">351</span><a name="line.351"></a>
|
||||
<span class="sourceLineNo">352</span> static AbstractConfigObject envVariablesAsConfigObject() {<a name="line.352"></a>
|
||||
<span class="sourceLineNo">353</span> try {<a name="line.353"></a>
|
||||
<span class="sourceLineNo">354</span> return EnvVariablesHolder.envVariables;<a name="line.354"></a>
|
||||
<span class="sourceLineNo">355</span> } catch (ExceptionInInitializerError e) {<a name="line.355"></a>
|
||||
<span class="sourceLineNo">356</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.356"></a>
|
||||
<span class="sourceLineNo">357</span> }<a name="line.357"></a>
|
||||
<span class="sourceLineNo">358</span> }<a name="line.358"></a>
|
||||
<span class="sourceLineNo">359</span><a name="line.359"></a>
|
||||
<span class="sourceLineNo">360</span> public static Config envVariablesAsConfig() {<a name="line.360"></a>
|
||||
<span class="sourceLineNo">361</span> return envVariablesAsConfigObject().toConfig();<a name="line.361"></a>
|
||||
<span class="sourceLineNo">362</span> }<a name="line.362"></a>
|
||||
<span class="sourceLineNo">363</span><a name="line.363"></a>
|
||||
<span class="sourceLineNo">364</span><a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span><a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> private static AbstractConfigObject loadEnvVariablesOverrides() {<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> Map<String, String> env = new HashMap(System.getenv());<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> Map<String, String> result = new HashMap(System.getenv());<a name="line.368"></a>
|
||||
<span class="sourceLineNo">364</span> public static void reloadEnvVariablesConfig() {<a name="line.364"></a>
|
||||
<span class="sourceLineNo">365</span> // ConfigFactory.invalidateCaches() relies on this having the side<a name="line.365"></a>
|
||||
<span class="sourceLineNo">366</span> // effect that it drops all caches<a name="line.366"></a>
|
||||
<span class="sourceLineNo">367</span> EnvVariablesHolder.envVariables = loadEnvVariables();<a name="line.367"></a>
|
||||
<span class="sourceLineNo">368</span> }<a name="line.368"></a>
|
||||
<span class="sourceLineNo">369</span><a name="line.369"></a>
|
||||
<span class="sourceLineNo">370</span> for (String key : env.keySet()) {<a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span> if (key.startsWith(ENV_VAR_OVERRIDE_PREFIX)) {<a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> result.put(ConfigImplUtil.envVariableAsProperty(key, ENV_VAR_OVERRIDE_PREFIX), env.get(key));<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> }<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> }<a name="line.374"></a>
|
||||
<span class="sourceLineNo">370</span><a name="line.370"></a>
|
||||
<span class="sourceLineNo">371</span><a name="line.371"></a>
|
||||
<span class="sourceLineNo">372</span> private static AbstractConfigObject loadEnvVariablesOverrides() {<a name="line.372"></a>
|
||||
<span class="sourceLineNo">373</span> Map<String, String> env = new HashMap(System.getenv());<a name="line.373"></a>
|
||||
<span class="sourceLineNo">374</span> Map<String, String> result = new HashMap();<a name="line.374"></a>
|
||||
<span class="sourceLineNo">375</span><a name="line.375"></a>
|
||||
<span class="sourceLineNo">376</span> return PropertiesParser.fromStringMap(newSimpleOrigin("env variables overrides"), result);<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> }<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span><a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> private static class EnvVariablesOverridesHolder {<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> static volatile AbstractConfigObject envVariables = loadEnvVariablesOverrides();<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span> }<a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span><a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> static AbstractConfigObject envVariablesOverridesAsConfigObject() {<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span> try {<a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> return EnvVariablesOverridesHolder.envVariables;<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> } catch (ExceptionInInitializerError e) {<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span> }<a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> }<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span><a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> public static Config envVariablesOverridesAsConfig() {<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> return envVariablesOverridesAsConfigObject().toConfig();<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> }<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span><a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> public static void reloadEnvVariablesOverridesConfig() {<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span> // ConfigFactory.invalidateCaches() relies on this having the side<a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> // effect that it drops all caches<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> EnvVariablesOverridesHolder.envVariables = loadEnvVariablesOverrides();<a name="line.398"></a>
|
||||
<span class="sourceLineNo">376</span> for (String key : env.keySet()) {<a name="line.376"></a>
|
||||
<span class="sourceLineNo">377</span> if (key.startsWith(ENV_VAR_OVERRIDE_PREFIX)) {<a name="line.377"></a>
|
||||
<span class="sourceLineNo">378</span> result.put(ConfigImplUtil.envVariableAsProperty(key, ENV_VAR_OVERRIDE_PREFIX), env.get(key));<a name="line.378"></a>
|
||||
<span class="sourceLineNo">379</span> }<a name="line.379"></a>
|
||||
<span class="sourceLineNo">380</span> }<a name="line.380"></a>
|
||||
<span class="sourceLineNo">381</span><a name="line.381"></a>
|
||||
<span class="sourceLineNo">382</span> return PropertiesParser.fromStringMap(newSimpleOrigin("env variables overrides"), result);<a name="line.382"></a>
|
||||
<span class="sourceLineNo">383</span> }<a name="line.383"></a>
|
||||
<span class="sourceLineNo">384</span><a name="line.384"></a>
|
||||
<span class="sourceLineNo">385</span> private static class EnvVariablesOverridesHolder {<a name="line.385"></a>
|
||||
<span class="sourceLineNo">386</span> static volatile AbstractConfigObject envVariables = loadEnvVariablesOverrides();<a name="line.386"></a>
|
||||
<span class="sourceLineNo">387</span> }<a name="line.387"></a>
|
||||
<span class="sourceLineNo">388</span><a name="line.388"></a>
|
||||
<span class="sourceLineNo">389</span> static AbstractConfigObject envVariablesOverridesAsConfigObject() {<a name="line.389"></a>
|
||||
<span class="sourceLineNo">390</span> try {<a name="line.390"></a>
|
||||
<span class="sourceLineNo">391</span> return EnvVariablesOverridesHolder.envVariables;<a name="line.391"></a>
|
||||
<span class="sourceLineNo">392</span> } catch (ExceptionInInitializerError e) {<a name="line.392"></a>
|
||||
<span class="sourceLineNo">393</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.393"></a>
|
||||
<span class="sourceLineNo">394</span> }<a name="line.394"></a>
|
||||
<span class="sourceLineNo">395</span> }<a name="line.395"></a>
|
||||
<span class="sourceLineNo">396</span><a name="line.396"></a>
|
||||
<span class="sourceLineNo">397</span> public static Config envVariablesOverridesAsConfig() {<a name="line.397"></a>
|
||||
<span class="sourceLineNo">398</span> return envVariablesOverridesAsConfigObject().toConfig();<a name="line.398"></a>
|
||||
<span class="sourceLineNo">399</span> }<a name="line.399"></a>
|
||||
<span class="sourceLineNo">400</span><a name="line.400"></a>
|
||||
<span class="sourceLineNo">401</span> public static Config defaultReference(final ClassLoader loader) {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> return computeCachedConfig(loader, "defaultReference", new Callable<Config>() {<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> @Override<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> public Config call() {<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> Config unresolvedResources = Parseable<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span> .newResources("reference.conf",<a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> ConfigParseOptions.defaults().setClassLoader(loader))<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> .parse().toConfig();<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> return systemPropertiesAsConfig().withFallback(unresolvedResources).resolve();<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> }<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> });<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> }<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span><a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> private static class DebugHolder {<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> private static String LOADS = "loads";<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span> private static String SUBSTITUTIONS = "substitutions";<a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span><a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> private static Map<String, Boolean> loadDiagnostics() {<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> Map<String, Boolean> result = new HashMap<String, Boolean>();<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> result.put(LOADS, false);<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> result.put(SUBSTITUTIONS, false);<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span><a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> // People do -Dconfig.trace=foo,bar to enable tracing of different things<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> String s = System.getProperty("config.trace");<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> if (s == null) {<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> return result;<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span> } else {<a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> String[] keys = s.split(",");<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> for (String k : keys) {<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> if (k.equals(LOADS)) {<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> result.put(LOADS, true);<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> } else if (k.equals(SUBSTITUTIONS)) {<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> result.put(SUBSTITUTIONS, true);<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> } else {<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> System.err.println("config.trace property contains unknown trace topic '"<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> + k + "'");<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> }<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> }<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> return result;<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> }<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> }<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span><a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> private static final Map<String, Boolean> diagnostics = loadDiagnostics();<a name="line.443"></a>
|
||||
<span class="sourceLineNo">401</span> public static void reloadEnvVariablesOverridesConfig() {<a name="line.401"></a>
|
||||
<span class="sourceLineNo">402</span> // ConfigFactory.invalidateCaches() relies on this having the side<a name="line.402"></a>
|
||||
<span class="sourceLineNo">403</span> // effect that it drops all caches<a name="line.403"></a>
|
||||
<span class="sourceLineNo">404</span> EnvVariablesOverridesHolder.envVariables = loadEnvVariablesOverrides();<a name="line.404"></a>
|
||||
<span class="sourceLineNo">405</span> }<a name="line.405"></a>
|
||||
<span class="sourceLineNo">406</span><a name="line.406"></a>
|
||||
<span class="sourceLineNo">407</span> public static Config defaultReference(final ClassLoader loader) {<a name="line.407"></a>
|
||||
<span class="sourceLineNo">408</span> return computeCachedConfig(loader, "defaultReference", new Callable<Config>() {<a name="line.408"></a>
|
||||
<span class="sourceLineNo">409</span> @Override<a name="line.409"></a>
|
||||
<span class="sourceLineNo">410</span> public Config call() {<a name="line.410"></a>
|
||||
<span class="sourceLineNo">411</span> Config unresolvedResources = unresolvedReference(loader);<a name="line.411"></a>
|
||||
<span class="sourceLineNo">412</span> return systemPropertiesAsConfig().withFallback(unresolvedResources).resolve();<a name="line.412"></a>
|
||||
<span class="sourceLineNo">413</span> }<a name="line.413"></a>
|
||||
<span class="sourceLineNo">414</span> });<a name="line.414"></a>
|
||||
<span class="sourceLineNo">415</span> }<a name="line.415"></a>
|
||||
<span class="sourceLineNo">416</span><a name="line.416"></a>
|
||||
<span class="sourceLineNo">417</span> private static Config unresolvedReference(final ClassLoader loader) {<a name="line.417"></a>
|
||||
<span class="sourceLineNo">418</span> return computeCachedConfig(loader, "unresolvedReference", new Callable<Config>() {<a name="line.418"></a>
|
||||
<span class="sourceLineNo">419</span> @Override<a name="line.419"></a>
|
||||
<span class="sourceLineNo">420</span> public Config call() {<a name="line.420"></a>
|
||||
<span class="sourceLineNo">421</span> return Parseable.newResources("reference.conf",<a name="line.421"></a>
|
||||
<span class="sourceLineNo">422</span> ConfigParseOptions.defaults().setClassLoader(loader))<a name="line.422"></a>
|
||||
<span class="sourceLineNo">423</span> .parse().toConfig();<a name="line.423"></a>
|
||||
<span class="sourceLineNo">424</span> }<a name="line.424"></a>
|
||||
<span class="sourceLineNo">425</span> });<a name="line.425"></a>
|
||||
<span class="sourceLineNo">426</span> }<a name="line.426"></a>
|
||||
<span class="sourceLineNo">427</span><a name="line.427"></a>
|
||||
<span class="sourceLineNo">428</span> /**<a name="line.428"></a>
|
||||
<span class="sourceLineNo">429</span> * This returns the unresolved reference configuration, but before doing so,<a name="line.429"></a>
|
||||
<span class="sourceLineNo">430</span> * it verifies that the reference configuration resolves, to ensure that it<a name="line.430"></a>
|
||||
<span class="sourceLineNo">431</span> * is self contained and doesn't depend on any higher level configuration<a name="line.431"></a>
|
||||
<span class="sourceLineNo">432</span> * files.<a name="line.432"></a>
|
||||
<span class="sourceLineNo">433</span> */<a name="line.433"></a>
|
||||
<span class="sourceLineNo">434</span> public static Config defaultReferenceUnresolved(final ClassLoader loader) {<a name="line.434"></a>
|
||||
<span class="sourceLineNo">435</span> // First, verify that `reference.conf` resolves by itself.<a name="line.435"></a>
|
||||
<span class="sourceLineNo">436</span> try {<a name="line.436"></a>
|
||||
<span class="sourceLineNo">437</span> defaultReference(loader);<a name="line.437"></a>
|
||||
<span class="sourceLineNo">438</span> } catch (ConfigException.UnresolvedSubstitution e) {<a name="line.438"></a>
|
||||
<span class="sourceLineNo">439</span> throw e.addExtraDetail("Could not resolve substitution in reference.conf to a value: %s. All reference.conf files are required to be fully, independently resolvable, and should not require the presence of values for substitutions from further up the hierarchy.");<a name="line.439"></a>
|
||||
<span class="sourceLineNo">440</span> }<a name="line.440"></a>
|
||||
<span class="sourceLineNo">441</span> // Now load the unresolved version<a name="line.441"></a>
|
||||
<span class="sourceLineNo">442</span> return unresolvedReference(loader);<a name="line.442"></a>
|
||||
<span class="sourceLineNo">443</span> }<a name="line.443"></a>
|
||||
<span class="sourceLineNo">444</span><a name="line.444"></a>
|
||||
<span class="sourceLineNo">445</span> private static final boolean traceLoadsEnabled = diagnostics.get(LOADS);<a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> private static final boolean traceSubstitutionsEnabled = diagnostics.get(SUBSTITUTIONS);<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span><a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> static boolean traceLoadsEnabled() {<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span> return traceLoadsEnabled;<a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span> }<a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span><a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> static boolean traceSubstitutionsEnabled() {<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> return traceSubstitutionsEnabled;<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span> }<a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> }<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span><a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> public static boolean traceLoadsEnabled() {<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> try {<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span> return DebugHolder.traceLoadsEnabled();<a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span> } catch (ExceptionInInitializerError e) {<a name="line.460"></a>
|
||||
<span class="sourceLineNo">461</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.461"></a>
|
||||
<span class="sourceLineNo">462</span> }<a name="line.462"></a>
|
||||
<span class="sourceLineNo">463</span> }<a name="line.463"></a>
|
||||
<span class="sourceLineNo">464</span><a name="line.464"></a>
|
||||
<span class="sourceLineNo">465</span> public static boolean traceSubstitutionsEnabled() {<a name="line.465"></a>
|
||||
<span class="sourceLineNo">466</span> try {<a name="line.466"></a>
|
||||
<span class="sourceLineNo">467</span> return DebugHolder.traceSubstitutionsEnabled();<a name="line.467"></a>
|
||||
<span class="sourceLineNo">468</span> } catch (ExceptionInInitializerError e) {<a name="line.468"></a>
|
||||
<span class="sourceLineNo">469</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.469"></a>
|
||||
<span class="sourceLineNo">470</span> }<a name="line.470"></a>
|
||||
<span class="sourceLineNo">471</span> }<a name="line.471"></a>
|
||||
<span class="sourceLineNo">472</span><a name="line.472"></a>
|
||||
<span class="sourceLineNo">473</span> public static void trace(String message) {<a name="line.473"></a>
|
||||
<span class="sourceLineNo">474</span> System.err.println(message);<a name="line.474"></a>
|
||||
<span class="sourceLineNo">475</span> }<a name="line.475"></a>
|
||||
<span class="sourceLineNo">445</span><a name="line.445"></a>
|
||||
<span class="sourceLineNo">446</span> private static class DebugHolder {<a name="line.446"></a>
|
||||
<span class="sourceLineNo">447</span> private static String LOADS = "loads";<a name="line.447"></a>
|
||||
<span class="sourceLineNo">448</span> private static String SUBSTITUTIONS = "substitutions";<a name="line.448"></a>
|
||||
<span class="sourceLineNo">449</span><a name="line.449"></a>
|
||||
<span class="sourceLineNo">450</span> private static Map<String, Boolean> loadDiagnostics() {<a name="line.450"></a>
|
||||
<span class="sourceLineNo">451</span> Map<String, Boolean> result = new HashMap<String, Boolean>();<a name="line.451"></a>
|
||||
<span class="sourceLineNo">452</span> result.put(LOADS, false);<a name="line.452"></a>
|
||||
<span class="sourceLineNo">453</span> result.put(SUBSTITUTIONS, false);<a name="line.453"></a>
|
||||
<span class="sourceLineNo">454</span><a name="line.454"></a>
|
||||
<span class="sourceLineNo">455</span> // People do -Dconfig.trace=foo,bar to enable tracing of different things<a name="line.455"></a>
|
||||
<span class="sourceLineNo">456</span> String s = System.getProperty("config.trace");<a name="line.456"></a>
|
||||
<span class="sourceLineNo">457</span> if (s == null) {<a name="line.457"></a>
|
||||
<span class="sourceLineNo">458</span> return result;<a name="line.458"></a>
|
||||
<span class="sourceLineNo">459</span> } else {<a name="line.459"></a>
|
||||
<span class="sourceLineNo">460</span> String[] keys = s.split(",");<a name="line.460"></a>
|
||||
<span class="sourceLineNo">461</span> for (String k : keys) {<a name="line.461"></a>
|
||||
<span class="sourceLineNo">462</span> if (k.equals(LOADS)) {<a name="line.462"></a>
|
||||
<span class="sourceLineNo">463</span> result.put(LOADS, true);<a name="line.463"></a>
|
||||
<span class="sourceLineNo">464</span> } else if (k.equals(SUBSTITUTIONS)) {<a name="line.464"></a>
|
||||
<span class="sourceLineNo">465</span> result.put(SUBSTITUTIONS, true);<a name="line.465"></a>
|
||||
<span class="sourceLineNo">466</span> } else {<a name="line.466"></a>
|
||||
<span class="sourceLineNo">467</span> System.err.println("config.trace property contains unknown trace topic '"<a name="line.467"></a>
|
||||
<span class="sourceLineNo">468</span> + k + "'");<a name="line.468"></a>
|
||||
<span class="sourceLineNo">469</span> }<a name="line.469"></a>
|
||||
<span class="sourceLineNo">470</span> }<a name="line.470"></a>
|
||||
<span class="sourceLineNo">471</span> return result;<a name="line.471"></a>
|
||||
<span class="sourceLineNo">472</span> }<a name="line.472"></a>
|
||||
<span class="sourceLineNo">473</span> }<a name="line.473"></a>
|
||||
<span class="sourceLineNo">474</span><a name="line.474"></a>
|
||||
<span class="sourceLineNo">475</span> private static final Map<String, Boolean> diagnostics = loadDiagnostics();<a name="line.475"></a>
|
||||
<span class="sourceLineNo">476</span><a name="line.476"></a>
|
||||
<span class="sourceLineNo">477</span> public static void trace(int indentLevel, String message) {<a name="line.477"></a>
|
||||
<span class="sourceLineNo">478</span> while (indentLevel > 0) {<a name="line.478"></a>
|
||||
<span class="sourceLineNo">479</span> System.err.print(" ");<a name="line.479"></a>
|
||||
<span class="sourceLineNo">480</span> indentLevel -= 1;<a name="line.480"></a>
|
||||
<span class="sourceLineNo">481</span> }<a name="line.481"></a>
|
||||
<span class="sourceLineNo">482</span> System.err.println(message);<a name="line.482"></a>
|
||||
<span class="sourceLineNo">483</span> }<a name="line.483"></a>
|
||||
<span class="sourceLineNo">484</span><a name="line.484"></a>
|
||||
<span class="sourceLineNo">485</span> // the basic idea here is to add the "what" and have a canonical<a name="line.485"></a>
|
||||
<span class="sourceLineNo">486</span> // toplevel error message. the "original" exception may however have extra<a name="line.486"></a>
|
||||
<span class="sourceLineNo">487</span> // detail about what happened. call this if you have a better "what" than<a name="line.487"></a>
|
||||
<span class="sourceLineNo">488</span> // further down on the stack.<a name="line.488"></a>
|
||||
<span class="sourceLineNo">489</span> static ConfigException.NotResolved improveNotResolved(Path what,<a name="line.489"></a>
|
||||
<span class="sourceLineNo">490</span> ConfigException.NotResolved original) {<a name="line.490"></a>
|
||||
<span class="sourceLineNo">491</span> String newMessage = what.render()<a name="line.491"></a>
|
||||
<span class="sourceLineNo">492</span> + " has not been resolved, you need to call Config#resolve(),"<a name="line.492"></a>
|
||||
<span class="sourceLineNo">493</span> + " see API docs for Config#resolve()";<a name="line.493"></a>
|
||||
<span class="sourceLineNo">494</span> if (newMessage.equals(original.getMessage()))<a name="line.494"></a>
|
||||
<span class="sourceLineNo">495</span> return original;<a name="line.495"></a>
|
||||
<span class="sourceLineNo">496</span> else<a name="line.496"></a>
|
||||
<span class="sourceLineNo">497</span> return new ConfigException.NotResolved(newMessage, original);<a name="line.497"></a>
|
||||
<span class="sourceLineNo">498</span> }<a name="line.498"></a>
|
||||
<span class="sourceLineNo">499</span><a name="line.499"></a>
|
||||
<span class="sourceLineNo">500</span> public static ConfigOrigin newSimpleOrigin(String description) {<a name="line.500"></a>
|
||||
<span class="sourceLineNo">501</span> if (description == null) {<a name="line.501"></a>
|
||||
<span class="sourceLineNo">502</span> return defaultValueOrigin;<a name="line.502"></a>
|
||||
<span class="sourceLineNo">503</span> } else {<a name="line.503"></a>
|
||||
<span class="sourceLineNo">504</span> return SimpleConfigOrigin.newSimple(description);<a name="line.504"></a>
|
||||
<span class="sourceLineNo">505</span> }<a name="line.505"></a>
|
||||
<span class="sourceLineNo">506</span> }<a name="line.506"></a>
|
||||
<span class="sourceLineNo">507</span><a name="line.507"></a>
|
||||
<span class="sourceLineNo">508</span> public static ConfigOrigin newFileOrigin(String filename) {<a name="line.508"></a>
|
||||
<span class="sourceLineNo">509</span> return SimpleConfigOrigin.newFile(filename);<a name="line.509"></a>
|
||||
<span class="sourceLineNo">510</span> }<a name="line.510"></a>
|
||||
<span class="sourceLineNo">511</span><a name="line.511"></a>
|
||||
<span class="sourceLineNo">512</span> public static ConfigOrigin newURLOrigin(URL url) {<a name="line.512"></a>
|
||||
<span class="sourceLineNo">513</span> return SimpleConfigOrigin.newURL(url);<a name="line.513"></a>
|
||||
<span class="sourceLineNo">514</span> }<a name="line.514"></a>
|
||||
<span class="sourceLineNo">515</span>}<a name="line.515"></a>
|
||||
<span class="sourceLineNo">477</span> private static final boolean traceLoadsEnabled = diagnostics.get(LOADS);<a name="line.477"></a>
|
||||
<span class="sourceLineNo">478</span> private static final boolean traceSubstitutionsEnabled = diagnostics.get(SUBSTITUTIONS);<a name="line.478"></a>
|
||||
<span class="sourceLineNo">479</span><a name="line.479"></a>
|
||||
<span class="sourceLineNo">480</span> static boolean traceLoadsEnabled() {<a name="line.480"></a>
|
||||
<span class="sourceLineNo">481</span> return traceLoadsEnabled;<a name="line.481"></a>
|
||||
<span class="sourceLineNo">482</span> }<a name="line.482"></a>
|
||||
<span class="sourceLineNo">483</span><a name="line.483"></a>
|
||||
<span class="sourceLineNo">484</span> static boolean traceSubstitutionsEnabled() {<a name="line.484"></a>
|
||||
<span class="sourceLineNo">485</span> return traceSubstitutionsEnabled;<a name="line.485"></a>
|
||||
<span class="sourceLineNo">486</span> }<a name="line.486"></a>
|
||||
<span class="sourceLineNo">487</span> }<a name="line.487"></a>
|
||||
<span class="sourceLineNo">488</span><a name="line.488"></a>
|
||||
<span class="sourceLineNo">489</span> public static boolean traceLoadsEnabled() {<a name="line.489"></a>
|
||||
<span class="sourceLineNo">490</span> try {<a name="line.490"></a>
|
||||
<span class="sourceLineNo">491</span> return DebugHolder.traceLoadsEnabled();<a name="line.491"></a>
|
||||
<span class="sourceLineNo">492</span> } catch (ExceptionInInitializerError e) {<a name="line.492"></a>
|
||||
<span class="sourceLineNo">493</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.493"></a>
|
||||
<span class="sourceLineNo">494</span> }<a name="line.494"></a>
|
||||
<span class="sourceLineNo">495</span> }<a name="line.495"></a>
|
||||
<span class="sourceLineNo">496</span><a name="line.496"></a>
|
||||
<span class="sourceLineNo">497</span> public static boolean traceSubstitutionsEnabled() {<a name="line.497"></a>
|
||||
<span class="sourceLineNo">498</span> try {<a name="line.498"></a>
|
||||
<span class="sourceLineNo">499</span> return DebugHolder.traceSubstitutionsEnabled();<a name="line.499"></a>
|
||||
<span class="sourceLineNo">500</span> } catch (ExceptionInInitializerError e) {<a name="line.500"></a>
|
||||
<span class="sourceLineNo">501</span> throw ConfigImplUtil.extractInitializerError(e);<a name="line.501"></a>
|
||||
<span class="sourceLineNo">502</span> }<a name="line.502"></a>
|
||||
<span class="sourceLineNo">503</span> }<a name="line.503"></a>
|
||||
<span class="sourceLineNo">504</span><a name="line.504"></a>
|
||||
<span class="sourceLineNo">505</span> public static void trace(String message) {<a name="line.505"></a>
|
||||
<span class="sourceLineNo">506</span> System.err.println(message);<a name="line.506"></a>
|
||||
<span class="sourceLineNo">507</span> }<a name="line.507"></a>
|
||||
<span class="sourceLineNo">508</span><a name="line.508"></a>
|
||||
<span class="sourceLineNo">509</span> public static void trace(int indentLevel, String message) {<a name="line.509"></a>
|
||||
<span class="sourceLineNo">510</span> while (indentLevel > 0) {<a name="line.510"></a>
|
||||
<span class="sourceLineNo">511</span> System.err.print(" ");<a name="line.511"></a>
|
||||
<span class="sourceLineNo">512</span> indentLevel -= 1;<a name="line.512"></a>
|
||||
<span class="sourceLineNo">513</span> }<a name="line.513"></a>
|
||||
<span class="sourceLineNo">514</span> System.err.println(message);<a name="line.514"></a>
|
||||
<span class="sourceLineNo">515</span> }<a name="line.515"></a>
|
||||
<span class="sourceLineNo">516</span><a name="line.516"></a>
|
||||
<span class="sourceLineNo">517</span> // the basic idea here is to add the "what" and have a canonical<a name="line.517"></a>
|
||||
<span class="sourceLineNo">518</span> // toplevel error message. the "original" exception may however have extra<a name="line.518"></a>
|
||||
<span class="sourceLineNo">519</span> // detail about what happened. call this if you have a better "what" than<a name="line.519"></a>
|
||||
<span class="sourceLineNo">520</span> // further down on the stack.<a name="line.520"></a>
|
||||
<span class="sourceLineNo">521</span> static ConfigException.NotResolved improveNotResolved(Path what,<a name="line.521"></a>
|
||||
<span class="sourceLineNo">522</span> ConfigException.NotResolved original) {<a name="line.522"></a>
|
||||
<span class="sourceLineNo">523</span> String newMessage = what.render()<a name="line.523"></a>
|
||||
<span class="sourceLineNo">524</span> + " has not been resolved, you need to call Config#resolve(),"<a name="line.524"></a>
|
||||
<span class="sourceLineNo">525</span> + " see API docs for Config#resolve()";<a name="line.525"></a>
|
||||
<span class="sourceLineNo">526</span> if (newMessage.equals(original.getMessage()))<a name="line.526"></a>
|
||||
<span class="sourceLineNo">527</span> return original;<a name="line.527"></a>
|
||||
<span class="sourceLineNo">528</span> else<a name="line.528"></a>
|
||||
<span class="sourceLineNo">529</span> return new ConfigException.NotResolved(newMessage, original);<a name="line.529"></a>
|
||||
<span class="sourceLineNo">530</span> }<a name="line.530"></a>
|
||||
<span class="sourceLineNo">531</span><a name="line.531"></a>
|
||||
<span class="sourceLineNo">532</span> public static ConfigOrigin newSimpleOrigin(String description) {<a name="line.532"></a>
|
||||
<span class="sourceLineNo">533</span> if (description == null) {<a name="line.533"></a>
|
||||
<span class="sourceLineNo">534</span> return defaultValueOrigin;<a name="line.534"></a>
|
||||
<span class="sourceLineNo">535</span> } else {<a name="line.535"></a>
|
||||
<span class="sourceLineNo">536</span> return SimpleConfigOrigin.newSimple(description);<a name="line.536"></a>
|
||||
<span class="sourceLineNo">537</span> }<a name="line.537"></a>
|
||||
<span class="sourceLineNo">538</span> }<a name="line.538"></a>
|
||||
<span class="sourceLineNo">539</span><a name="line.539"></a>
|
||||
<span class="sourceLineNo">540</span> public static ConfigOrigin newFileOrigin(String filename) {<a name="line.540"></a>
|
||||
<span class="sourceLineNo">541</span> return SimpleConfigOrigin.newFile(filename);<a name="line.541"></a>
|
||||
<span class="sourceLineNo">542</span> }<a name="line.542"></a>
|
||||
<span class="sourceLineNo">543</span><a name="line.543"></a>
|
||||
<span class="sourceLineNo">544</span> public static ConfigOrigin newURLOrigin(URL url) {<a name="line.544"></a>
|
||||
<span class="sourceLineNo">545</span> return SimpleConfigOrigin.newURL(url);<a name="line.545"></a>
|
||||
<span class="sourceLineNo">546</span> }<a name="line.546"></a>
|
||||
<span class="sourceLineNo">547</span>}<a name="line.547"></a>
|
||||
|
||||
|
||||
|
||||
|
68
v1.4.1/allclasses-frame.html
Normal file
68
v1.4.1/allclasses-frame.html
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:40 WEST 2020 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="com/typesafe/config/Config.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">Config</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigBeanFactory.html" title="class in com.typesafe.config" target="classFrame">ConfigBeanFactory</a></li>
|
||||
<li><a href="com/typesafe/config/impl/ConfigBeanImpl.html" title="class in com.typesafe.config.impl" target="classFrame">ConfigBeanImpl</a></li>
|
||||
<li><a href="com/typesafe/config/parser/ConfigDocument.html" title="interface in com.typesafe.config.parser" target="classFrame"><span class="interfaceName">ConfigDocument</span></a></li>
|
||||
<li><a href="com/typesafe/config/parser/ConfigDocumentFactory.html" title="class in com.typesafe.config.parser" target="classFrame">ConfigDocumentFactory</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.html" title="class in com.typesafe.config" target="classFrame">ConfigException</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config" target="classFrame">ConfigException.BadBean</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config" target="classFrame">ConfigException.BadPath</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config" target="classFrame">ConfigException.BadValue</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config" target="classFrame">ConfigException.BugOrBroken</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config" target="classFrame">ConfigException.Generic</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config" target="classFrame">ConfigException.IO</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config" target="classFrame">ConfigException.Missing</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config" target="classFrame">ConfigException.NotResolved</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config" target="classFrame">ConfigException.Null</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config" target="classFrame">ConfigException.Parse</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config" target="classFrame">ConfigException.UnresolvedSubstitution</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config" target="classFrame">ConfigException.ValidationFailed</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config" target="classFrame">ConfigException.ValidationProblem</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config" target="classFrame">ConfigException.WrongType</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config" target="classFrame">ConfigFactory</a></li>
|
||||
<li><a href="com/typesafe/config/impl/ConfigImpl.html" title="class in com.typesafe.config.impl" target="classFrame">ConfigImpl</a></li>
|
||||
<li><a href="com/typesafe/config/impl/ConfigImplUtil.html" title="class in com.typesafe.config.impl" target="classFrame">ConfigImplUtil</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigIncludeContext</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigIncluder</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluderClasspath.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigIncluderClasspath</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluderFile.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigIncluderFile</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluderURL.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigIncluderURL</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigList.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigList</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigLoadingStrategy.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigLoadingStrategy</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config" target="classFrame">ConfigMemorySize</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigMergeable</span></a></li>
|
||||
<li><a href="com/typesafe/config/parser/ConfigNode.html" title="interface in com.typesafe.config.parser" target="classFrame"><span class="interfaceName">ConfigNode</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigObject</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigOrigin</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigOriginFactory.html" title="class in com.typesafe.config" target="classFrame">ConfigOriginFactory</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigParseable.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigParseable</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config" target="classFrame">ConfigParseOptions</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigRenderOptions.html" title="class in com.typesafe.config" target="classFrame">ConfigRenderOptions</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigResolveOptions.html" title="class in com.typesafe.config" target="classFrame">ConfigResolveOptions</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigResolver.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigResolver</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigSyntax.html" title="enum in com.typesafe.config" target="classFrame">ConfigSyntax</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigUtil.html" title="class in com.typesafe.config" target="classFrame">ConfigUtil</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config" target="classFrame"><span class="interfaceName">ConfigValue</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigValueFactory.html" title="class in com.typesafe.config" target="classFrame">ConfigValueFactory</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigValueType.html" title="enum in com.typesafe.config" target="classFrame">ConfigValueType</a></li>
|
||||
<li><a href="com/typesafe/config/DefaultConfigLoadingStrategy.html" title="class in com.typesafe.config" target="classFrame">DefaultConfigLoadingStrategy</a></li>
|
||||
<li><a href="com/typesafe/config/Optional.html" title="annotation in com.typesafe.config" target="classFrame">Optional</a></li>
|
||||
<li><a href="com/typesafe/config/impl/Parseable.html" title="class in com.typesafe.config.impl" target="classFrame">Parseable</a></li>
|
||||
<li><a href="com/typesafe/config/impl/Parseable.Relativizer.html" title="interface in com.typesafe.config.impl" target="classFrame"><span class="interfaceName">Parseable.Relativizer</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
68
v1.4.1/allclasses-noframe.html
Normal file
68
v1.4.1/allclasses-noframe.html
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:40 WEST 2020 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="com/typesafe/config/Config.html" title="interface in com.typesafe.config"><span class="interfaceName">Config</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigBeanFactory.html" title="class in com.typesafe.config">ConfigBeanFactory</a></li>
|
||||
<li><a href="com/typesafe/config/impl/ConfigBeanImpl.html" title="class in com.typesafe.config.impl">ConfigBeanImpl</a></li>
|
||||
<li><a href="com/typesafe/config/parser/ConfigDocument.html" title="interface in com.typesafe.config.parser"><span class="interfaceName">ConfigDocument</span></a></li>
|
||||
<li><a href="com/typesafe/config/parser/ConfigDocumentFactory.html" title="class in com.typesafe.config.parser">ConfigDocumentFactory</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigFactory.html" title="class in com.typesafe.config">ConfigFactory</a></li>
|
||||
<li><a href="com/typesafe/config/impl/ConfigImpl.html" title="class in com.typesafe.config.impl">ConfigImpl</a></li>
|
||||
<li><a href="com/typesafe/config/impl/ConfigImplUtil.html" title="class in com.typesafe.config.impl">ConfigImplUtil</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncludeContext.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigIncludeContext</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluder.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigIncluder</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluderClasspath.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigIncluderClasspath</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluderFile.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigIncluderFile</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigIncluderURL.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigIncluderURL</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigList.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigList</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigLoadingStrategy.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigLoadingStrategy</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config">ConfigMemorySize</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigMergeable.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigMergeable</span></a></li>
|
||||
<li><a href="com/typesafe/config/parser/ConfigNode.html" title="interface in com.typesafe.config.parser"><span class="interfaceName">ConfigNode</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigObject.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigObject</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigOrigin</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigOriginFactory.html" title="class in com.typesafe.config">ConfigOriginFactory</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigParseable.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigParseable</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigParseOptions.html" title="class in com.typesafe.config">ConfigParseOptions</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigRenderOptions.html" title="class in com.typesafe.config">ConfigRenderOptions</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigResolveOptions.html" title="class in com.typesafe.config">ConfigResolveOptions</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigResolver.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigResolver</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigSyntax.html" title="enum in com.typesafe.config">ConfigSyntax</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigUtil.html" title="class in com.typesafe.config">ConfigUtil</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigValue.html" title="interface in com.typesafe.config"><span class="interfaceName">ConfigValue</span></a></li>
|
||||
<li><a href="com/typesafe/config/ConfigValueFactory.html" title="class in com.typesafe.config">ConfigValueFactory</a></li>
|
||||
<li><a href="com/typesafe/config/ConfigValueType.html" title="enum in com.typesafe.config">ConfigValueType</a></li>
|
||||
<li><a href="com/typesafe/config/DefaultConfigLoadingStrategy.html" title="class in com.typesafe.config">DefaultConfigLoadingStrategy</a></li>
|
||||
<li><a href="com/typesafe/config/Optional.html" title="annotation in com.typesafe.config">Optional</a></li>
|
||||
<li><a href="com/typesafe/config/impl/Parseable.html" title="class in com.typesafe.config.impl">Parseable</a></li>
|
||||
<li><a href="com/typesafe/config/impl/Parseable.Relativizer.html" title="interface in com.typesafe.config.impl"><span class="interfaceName">Parseable.Relativizer</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
2101
v1.4.1/com/typesafe/config/Config.html
Normal file
2101
v1.4.1/com/typesafe/config/Config.html
Normal file
File diff suppressed because it is too large
Load Diff
310
v1.4.1/com/typesafe/config/ConfigBeanFactory.html
Normal file
310
v1.4.1/com/typesafe/config/ConfigBeanFactory.html
Normal file
@ -0,0 +1,310 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigBeanFactory</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigBeanFactory";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var methods = {"i0":9};
|
||||
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
|
||||
var altColor = "altColor";
|
||||
var rowColor = "rowColor";
|
||||
var tableTab = "tableTab";
|
||||
var activeTableTab = "activeTableTab";
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigBeanFactory.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigBeanFactory.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </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>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigBeanFactory" class="title">Class ConfigBeanFactory</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigBeanFactory</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L11" target="_blank" >ConfigBeanFactory</a>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Factory for automatically creating a Java class from a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>.
|
||||
See <a href="../../../com/typesafe/config/ConfigBeanFactory.html#create-com.typesafe.config.Config-java.lang.Class-"><code>create(Config,Class)</code></a>.</div>
|
||||
<dl>
|
||||
<dt><span class="simpleTagLabel">Since:</span></dt>
|
||||
<dd>1.3.0</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigBeanFactory.html#ConfigBeanFactory--">ConfigBeanFactory</a></span>()</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </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="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr id="i0" class="altColor">
|
||||
<td class="colFirst"><code>static <T> T</code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigBeanFactory.html#create-com.typesafe.config.Config-java.lang.Class-">create</a></span>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> config,
|
||||
java.lang.Class<T> clazz)</code>
|
||||
<div class="block">Creates an instance of a class, initializing its fields from a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="ConfigBeanFactory--">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>ConfigBeanFactory</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L11" target="_blank" >ConfigBeanFactory</a>()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="create-com.typesafe.config.Config-java.lang.Class-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>create</h4>
|
||||
<pre>public static <T> T <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigBeanFactory.java#L46" target="_blank" >create</a>(<a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config">Config</a> config,
|
||||
java.lang.Class<T> clazz)</pre>
|
||||
<div class="block">Creates an instance of a class, initializing its fields from a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>.
|
||||
|
||||
Example usage:
|
||||
|
||||
<pre>
|
||||
Config configSource = ConfigFactory.load().getConfig("foo");
|
||||
FooConfig config = ConfigBeanFactory.create(configSource, FooConfig.class);
|
||||
</pre>
|
||||
|
||||
The Java class should follow JavaBean conventions. Field types
|
||||
can be any of the types you can normally get from a <a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><code>Config</code></a>, including <code>java.time.Duration</code> or <a href="../../../com/typesafe/config/ConfigMemorySize.html" title="class in com.typesafe.config"><code>ConfigMemorySize</code></a>. Fields may also be another JavaBean-style
|
||||
class.
|
||||
|
||||
Fields are mapped to config by converting the config key to
|
||||
camel case. So the key <code>foo-bar</code> becomes JavaBean
|
||||
setter <code>setFooBar</code>.</div>
|
||||
<dl>
|
||||
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
||||
<dd><code>T</code> - the type of the class to be instantiated</dd>
|
||||
<dt><span class="paramLabel">Parameters:</span></dt>
|
||||
<dd><code>config</code> - source of config information</dd>
|
||||
<dd><code>clazz</code> - class to be instantiated</dd>
|
||||
<dt><span class="returnLabel">Returns:</span></dt>
|
||||
<dd>an instance of the class populated with data from the config</dd>
|
||||
<dt><span class="throwsLabel">Throws:</span></dt>
|
||||
<dd><code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a></code> - If something is wrong with the JavaBean</dd>
|
||||
<dd><code><a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a></code> - If the config doesn't conform to the bean's implied schema</dd>
|
||||
<dd><code><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></code> - Can throw the same exceptions as the getters on <code>Config</code></dd>
|
||||
<dt><span class="simpleTagLabel">Since:</span></dt>
|
||||
<dd>1.3.0</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/Config.html" title="interface in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigBeanFactory.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigBeanFactory.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </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>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li><a href="#method.detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
318
v1.4.1/com/typesafe/config/ConfigException.BadBean.html
Normal file
318
v1.4.1/com/typesafe/config/ConfigException.BadBean.html
Normal file
@ -0,0 +1,318 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.BadBean</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.BadBean";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BadBean.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BadBean.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.BadBean" class="title">Class ConfigException.BadBean</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException.BugOrBroken</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.BadBean</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L433" target="_blank" >ConfigException.BadBean</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a></pre>
|
||||
<div class="block">Some problem with a JavaBean we are trying to initialize.</div>
|
||||
<dl>
|
||||
<dt><span class="simpleTagLabel">Since:</span></dt>
|
||||
<dd>1.3.0</dd>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.BadBean">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadBean.html#BadBean-java.lang.String-">BadBean</a></span>(java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadBean.html#BadBean-java.lang.String-java.lang.Throwable-">BadBean</a></span>(java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="BadBean-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadBean</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadBean.java#L436" target="_blank" >BadBean</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadBean-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BadBean</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadBean.java#L440" target="_blank" >BadBean</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BadBean.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BadBean.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
364
v1.4.1/com/typesafe/config/ConfigException.BadPath.html
Normal file
364
v1.4.1/com/typesafe/config/ConfigException.BadPath.html
Normal file
@ -0,0 +1,364 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.BadPath</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.BadPath";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BadPath.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BadPath.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.BadPath" class="title">Class ConfigException.BadPath</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.BadPath</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L201" target="_blank" >ConfigException.BadPath</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that a path expression was invalid. Try putting
|
||||
double quotes around path elements that contain "special" characters.</div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.BadPath">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadPath.html#BadPath-com.typesafe.config.ConfigOrigin-java.lang.String-">BadPath</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadPath.html#BadPath-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-">BadPath</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadPath.html#BadPath-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-java.lang.Throwable-">BadPath</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadPath.html#BadPath-java.lang.String-java.lang.String-">BadPath</a></span>(java.lang.String path,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadPath.html#BadPath-java.lang.String-java.lang.String-java.lang.Throwable-">BadPath</a></span>(java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="BadPath-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L204" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadPath-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L211" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadPath-java.lang.String-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L215" target="_blank" >BadPath</a>(java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadPath-java.lang.String-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L220" target="_blank" >BadPath</a>(java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadPath-com.typesafe.config.ConfigOrigin-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BadPath</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadPath.java#L224" target="_blank" >BadPath</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BadPath.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BadPath.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
351
v1.4.1/com/typesafe/config/ConfigException.BadValue.html
Normal file
351
v1.4.1/com/typesafe/config/ConfigException.BadValue.html
Normal file
@ -0,0 +1,351 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.BadValue</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.BadValue";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BadValue.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BadValue.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.BadValue" class="title">Class ConfigException.BadValue</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.BadValue</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L175" target="_blank" >ConfigException.BadValue</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that a value was messed up, for example you may have
|
||||
asked for a duration and the value can't be sensibly parsed as a
|
||||
duration.</div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.BadValue">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadValue.html#BadValue-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-">BadValue</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadValue.html#BadValue-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-java.lang.Throwable-">BadValue</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadValue.html#BadValue-java.lang.String-java.lang.String-">BadValue</a></span>(java.lang.String path,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BadValue.html#BadValue-java.lang.String-java.lang.String-java.lang.Throwable-">BadValue</a></span>(java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="BadValue-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L178" target="_blank" >BadValue</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadValue-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L183" target="_blank" >BadValue</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadValue-java.lang.String-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L187" target="_blank" >BadValue</a>(java.lang.String path,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BadValue-java.lang.String-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BadValue</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BadValue.java#L191" target="_blank" >BadValue</a>(java.lang.String path,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BadValue.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BadValue.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
319
v1.4.1/com/typesafe/config/ConfigException.BugOrBroken.html
Normal file
319
v1.4.1/com/typesafe/config/ConfigException.BugOrBroken.html
Normal file
@ -0,0 +1,319 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.BugOrBroken</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.BugOrBroken";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BugOrBroken.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BugOrBroken.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.BugOrBroken" class="title">Class ConfigException.BugOrBroken</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.BugOrBroken</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Direct Known Subclasses:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L236" target="_blank" >ConfigException.BugOrBroken</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that there's a bug in something (possibly the
|
||||
library itself) or the runtime environment is broken. This exception
|
||||
should never be handled; instead, something should be fixed to keep the
|
||||
exception from occurring. This exception can be thrown by any method in
|
||||
the library.</div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.BugOrBroken">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html#BugOrBroken-java.lang.String-">BugOrBroken</a></span>(java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html#BugOrBroken-java.lang.String-java.lang.Throwable-">BugOrBroken</a></span>(java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="BugOrBroken-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>BugOrBroken</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BugOrBroken.java#L239" target="_blank" >BugOrBroken</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="BugOrBroken-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BugOrBroken</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.BugOrBroken.java#L243" target="_blank" >BugOrBroken</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.BugOrBroken.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.BugOrBroken.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
311
v1.4.1/com/typesafe/config/ConfigException.Generic.html
Normal file
311
v1.4.1/com/typesafe/config/ConfigException.Generic.html
Normal file
@ -0,0 +1,311 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.Generic</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.Generic";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.Generic.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.Generic.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.Generic" class="title">Class ConfigException.Generic</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.Generic</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L448" target="_blank" >ConfigException.Generic</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception that doesn't fall into any other category.</div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.Generic">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.Generic.html#Generic-java.lang.String-">Generic</a></span>(java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.Generic.html#Generic-java.lang.String-java.lang.Throwable-">Generic</a></span>(java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="Generic-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Generic</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Generic.java#L451" target="_blank" >Generic</a>(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="Generic-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Generic</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Generic.java#L455" target="_blank" >Generic</a>(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.Generic.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.Generic.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
315
v1.4.1/com/typesafe/config/ConfigException.IO.html
Normal file
315
v1.4.1/com/typesafe/config/ConfigException.IO.html
Normal file
@ -0,0 +1,315 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.IO</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.IO";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.IO.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.IO.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.IO" class="title">Class ConfigException.IO</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.IO</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L252" target="_blank" >ConfigException.IO</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicating that there was an IO error.</div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.IO">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.IO.html#IO-com.typesafe.config.ConfigOrigin-java.lang.String-">IO</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.IO.html#IO-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.Throwable-">IO</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="IO-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>IO</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.IO.java#L255" target="_blank" >IO</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="IO-com.typesafe.config.ConfigOrigin-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>IO</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.IO.java#L259" target="_blank" >IO</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.IO.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.IO.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
351
v1.4.1/com/typesafe/config/ConfigException.Missing.html
Normal file
351
v1.4.1/com/typesafe/config/ConfigException.Missing.html
Normal file
@ -0,0 +1,351 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_265) on Thu Oct 22 23:01:39 WEST 2020 -->
|
||||
<title>ConfigException.Missing</title>
|
||||
<meta name="date" content="2020-10-22">
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="../../../script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="ConfigException.Missing";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.Missing.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.Missing.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">com.typesafe.config</div>
|
||||
<h2 title="Class ConfigException.Missing" class="title">Class ConfigException.Missing</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.RuntimeException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">com.typesafe.config.ConfigException</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>com.typesafe.config.ConfigException.Missing</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Direct Known Subclasses:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Enclosing class:</dt>
|
||||
<dd><a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public static class <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.java#L121" target="_blank" >ConfigException.Missing</a>
|
||||
extends <a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></pre>
|
||||
<div class="block">Exception indicates that the setting was never set to anything, not even
|
||||
null.</div>
|
||||
<dl>
|
||||
<dt><span class="seeLabel">See Also:</span></dt>
|
||||
<dd><a href="../../../serialized-form.html#com.typesafe.config.ConfigException.Missing">Serialized Form</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.class.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested.classes.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.BadBean.html" title="class in com.typesafe.config">ConfigException.BadBean</a>, <a href="../../../com/typesafe/config/ConfigException.BadPath.html" title="class in com.typesafe.config">ConfigException.BadPath</a>, <a href="../../../com/typesafe/config/ConfigException.BadValue.html" title="class in com.typesafe.config">ConfigException.BadValue</a>, <a href="../../../com/typesafe/config/ConfigException.BugOrBroken.html" title="class in com.typesafe.config">ConfigException.BugOrBroken</a>, <a href="../../../com/typesafe/config/ConfigException.Generic.html" title="class in com.typesafe.config">ConfigException.Generic</a>, <a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config">ConfigException.IO</a>, <a href="../../../com/typesafe/config/ConfigException.Missing.html" title="class in com.typesafe.config">ConfigException.Missing</a>, <a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config">ConfigException.NotResolved</a>, <a href="../../../com/typesafe/config/ConfigException.Null.html" title="class in com.typesafe.config">ConfigException.Null</a>, <a href="../../../com/typesafe/config/ConfigException.Parse.html" title="class in com.typesafe.config">ConfigException.Parse</a>, <a href="../../../com/typesafe/config/ConfigException.UnresolvedSubstitution.html" title="class in com.typesafe.config">ConfigException.UnresolvedSubstitution</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationFailed.html" title="class in com.typesafe.config">ConfigException.ValidationFailed</a>, <a href="../../../com/typesafe/config/ConfigException.ValidationProblem.html" title="class in com.typesafe.config">ConfigException.ValidationProblem</a>, <a href="../../../com/typesafe/config/ConfigException.WrongType.html" title="class in com.typesafe.config">ConfigException.WrongType</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier</th>
|
||||
<th class="colLast" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code> </code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.Missing.html#Missing-com.typesafe.config.ConfigOrigin-java.lang.String-">Missing</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected </code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.Missing.html#Missing-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.Throwable-">Missing</a></span>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code> </code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.Missing.html#Missing-java.lang.String-">Missing</a></span>(java.lang.String path)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code> </code></td>
|
||||
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/typesafe/config/ConfigException.Missing.html#Missing-java.lang.String-java.lang.Throwable-">Missing</a></span>(java.lang.String path,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method.summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.com.typesafe.config.ConfigException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class com.typesafe.config.<a href="../../../com/typesafe/config/ConfigException.html" title="class in com.typesafe.config">ConfigException</a></h3>
|
||||
<code><a href="../../../com/typesafe/config/ConfigException.html#origin--">origin</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="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, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor.detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="Missing-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L124" target="_blank" >Missing</a>(java.lang.String path,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="Missing-com.typesafe.config.ConfigOrigin-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L129" target="_blank" >Missing</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String path)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="Missing-java.lang.String-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>public <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L133" target="_blank" >Missing</a>(java.lang.String path)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="Missing-com.typesafe.config.ConfigOrigin-java.lang.String-java.lang.Throwable-">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Missing</h4>
|
||||
<pre>protected <a href="https://github.com/lightbend/config/blob/8d9672c88728d070a4546833c47f0ecfd4a2fb43/config/src/main/java/com/typesafe/config/ConfigException.Missing.java#L137" target="_blank" >Missing</a>(<a href="../../../com/typesafe/config/ConfigOrigin.html" title="interface in com.typesafe.config">ConfigOrigin</a> origin,
|
||||
java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../overview-summary.html">Overview</a></li>
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.IO.html" title="class in com.typesafe.config"><span class="typeNameLink">Prev Class</span></a></li>
|
||||
<li><a href="../../../com/typesafe/config/ConfigException.NotResolved.html" title="class in com.typesafe.config"><span class="typeNameLink">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?com/typesafe/config/ConfigException.Missing.html" target="_top">Frames</a></li>
|
||||
<li><a href="ConfigException.Missing.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.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>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested.classes.inherited.from.class.com.typesafe.config.ConfigException">Nested</a> | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.summary">Constr</a> | </li>
|
||||
<li><a href="#methods.inherited.from.class.com.typesafe.config.ConfigException">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor.detail">Constr</a> | </li>
|
||||
<li>Method</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user