blob: a1763096cec4e08bf66ffcf36e260743611c09d7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>ConfigBuilder</title>
<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="ConfigBuilder";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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>Prev&nbsp;Class</li>
<li><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigProviderResolver.html" title="class in org.eclipse.microprofile.config.spi"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/microprofile/config/spi/ConfigBuilder.html" target="_top">Frames</a></li>
<li><a href="ConfigBuilder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.eclipse.microprofile.config.spi</div>
<h2 title="Interface ConfigBuilder" class="title">Interface ConfigBuilder</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ConfigBuilder</span></pre>
<div class="block">Builder for manually creating an instance of a <code>Config</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigProviderResolver.html#getBuilder--"><code>ConfigProviderResolver.getBuilder()</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</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="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#addDefaultSources--">addDefaultSources</a></span>()</code>
<div class="block">Add the default config sources appearing on the builder's classpath
including:
System properties
Environment properties
/META-INF/microprofile-config.properties
</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#addDiscoveredConverters--">addDiscoveredConverters</a></span>()</code>
<div class="block">Add the converters to be loaded via service loader pattern</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#addDiscoveredSources--">addDiscoveredSources</a></span>()</code>
<div class="block">Add the config sources appearing to be loaded via service loader pattern</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/config/Config.html" title="interface in org.eclipse.microprofile.config">Config</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#build--">build</a></span>()</code>
<div class="block">Build the <a href="../../../../../org/eclipse/microprofile/config/Config.html" title="interface in org.eclipse.microprofile.config"><code>Config</code></a> object.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#forClassLoader-java.lang.ClassLoader-">forClassLoader</a></span>(java.lang.ClassLoader&nbsp;loader)</code>
<div class="block">Return the ConfigBuilder for a given classloader</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#withConverter-java.lang.Class-int-org.eclipse.microprofile.config.spi.Converter-">withConverter</a></span>(java.lang.Class&lt;T&gt;&nbsp;type,
int&nbsp;priority,
<a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi">Converter</a>&lt;T&gt;&nbsp;converter)</code>
<div class="block">Add the specified <a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi"><code>Converter</code></a> for the given type.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#withConverters-org.eclipse.microprofile.config.spi.Converter...-">withConverters</a></span>(<a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi">Converter</a>&lt;?&gt;...&nbsp;converters)</code>
<div class="block">Add the specified <a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi"><code>Converter</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#withSources-org.eclipse.microprofile.config.spi.ConfigSource...-">withSources</a></span>(<a href="../../../../../org/eclipse/microprofile/config/spi/ConfigSource.html" title="interface in org.eclipse.microprofile.config.spi">ConfigSource</a>...&nbsp;sources)</code>
<div class="block">Add the specified <a href="../../../../../org/eclipse/microprofile/config/spi/ConfigSource.html" title="interface in org.eclipse.microprofile.config.spi"><code>ConfigSource</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="addDefaultSources--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDefaultSources</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;addDefaultSources()</pre>
<div class="block">Add the default config sources appearing on the builder's classpath
including:
<ol>
<li>System properties</li>
<li>Environment properties</li>
<li>/META-INF/microprofile-config.properties</li>
</ol></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigBuilder with the default config sources</dd>
</dl>
</li>
</ul>
<a name="addDiscoveredSources--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDiscoveredSources</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;addDiscoveredSources()</pre>
<div class="block">Add the config sources appearing to be loaded via service loader pattern</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigBuilder with the autodiscovered config sources</dd>
</dl>
</li>
</ul>
<a name="addDiscoveredConverters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDiscoveredConverters</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;addDiscoveredConverters()</pre>
<div class="block">Add the converters to be loaded via service loader pattern</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigBuilder with the autodiscovered converters</dd>
</dl>
</li>
</ul>
<a name="forClassLoader-java.lang.ClassLoader-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forClassLoader</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;forClassLoader(java.lang.ClassLoader&nbsp;loader)</pre>
<div class="block">Return the ConfigBuilder for a given classloader</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>loader</code> - the specified classloader</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigureBuilder for the given classloader</dd>
</dl>
</li>
</ul>
<a name="withSources-org.eclipse.microprofile.config.spi.ConfigSource...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withSources</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;withSources(<a href="../../../../../org/eclipse/microprofile/config/spi/ConfigSource.html" title="interface in org.eclipse.microprofile.config.spi">ConfigSource</a>...&nbsp;sources)</pre>
<div class="block">Add the specified <a href="../../../../../org/eclipse/microprofile/config/spi/ConfigSource.html" title="interface in org.eclipse.microprofile.config.spi"><code>ConfigSource</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sources</code> - the config sources</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigBuilder with the configured sources</dd>
</dl>
</li>
</ul>
<a name="withConverters-org.eclipse.microprofile.config.spi.Converter...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withConverters</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;withConverters(<a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi">Converter</a>&lt;?&gt;...&nbsp;converters)</pre>
<div class="block">Add the specified <a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi"><code>Converter</code></a>.
This method uses reflection to determine what type the converter is for.
When using lambda expressions for custom converters you should use
<a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html#withConverter-java.lang.Class-int-org.eclipse.microprofile.config.spi.Converter-"><code>withConverter(Class, int, Converter)</code></a> and pass the target type explicitly
as lambda expressions do not offer enough type information to the reflection API.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>converters</code> - the converters</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigBuilder with the added converters</dd>
</dl>
</li>
</ul>
<a name="withConverter-java.lang.Class-int-org.eclipse.microprofile.config.spi.Converter-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withConverter</h4>
<pre>&lt;T&gt;&nbsp;<a href="../../../../../org/eclipse/microprofile/config/spi/ConfigBuilder.html" title="interface in org.eclipse.microprofile.config.spi">ConfigBuilder</a>&nbsp;withConverter(java.lang.Class&lt;T&gt;&nbsp;type,
int&nbsp;priority,
<a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi">Converter</a>&lt;T&gt;&nbsp;converter)</pre>
<div class="block">Add the specified <a href="../../../../../org/eclipse/microprofile/config/spi/Converter.html" title="interface in org.eclipse.microprofile.config.spi"><code>Converter</code></a> for the given type.
This method does not rely on reflection to determine what type the converter is for
therefore also lambda expressions can be used.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type to convert</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the Class of type to convert</dd>
<dd><code>priority</code> - the priority of the converter (custom converters have a default priority of 100).</dd>
<dd><code>converter</code> - the converter (can not be <code>null</code>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ConfigBuilder with the added converters</dd>
</dl>
</li>
</ul>
<a name="build--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre><a href="../../../../../org/eclipse/microprofile/config/Config.html" title="interface in org.eclipse.microprofile.config">Config</a>&nbsp;build()</pre>
<div class="block">Build the <a href="../../../../../org/eclipse/microprofile/config/Config.html" title="interface in org.eclipse.microprofile.config"><code>Config</code></a> object.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Config object</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>Prev&nbsp;Class</li>
<li><a href="../../../../../org/eclipse/microprofile/config/spi/ConfigProviderResolver.html" title="class in org.eclipse.microprofile.config.spi"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/microprofile/config/spi/ConfigBuilder.html" target="_top">Frames</a></li>
<li><a href="ConfigBuilder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>