http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/a61cb5e3/content/site/apidocs/org/apache/juneau/ini/ConfigFile.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/ini/ConfigFile.html b/content/site/apidocs/org/apache/juneau/ini/ConfigFile.html index 0e0dbd5..b066999 100644 --- a/content/site/apidocs/org/apache/juneau/ini/ConfigFile.html +++ b/content/site/apidocs/org/apache/juneau/ini/ConfigFile.html @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":10,"i6":6,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":10,"i21":10,"i22":6,"i23":10,"i24":6,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":10,"i36":10,"i37":6,"i38":6,"i39":6,"i40":6,"i41":6,"i42":10,"i43":6,"i44":10,"i45":6,"i46":6,"i47":6,"i48":6,"i49":10}; +var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":10,"i6":6,"i7":6,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":10,"i24":10,"i25":10,"i26":6,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":10,"i40":10,"i41":6,"i42":6,"i43":6,"i44":6,"i45":6,"i46":6,"i47":10,"i48":6,"i49":6,"i50":10,"i51":6,"i52":6,"i53":6,"i54":6,"i55":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -218,103 +218,128 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? </td> </tr> <tr id="i7" class="rowColor"> +<td class="colFirst"><code>protected abstract <a href="../../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau">BeanSession</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getBeanSession--">getBeanSession</a></span>()</code> +<div class="block">Returns the reusable bean session associated with this config file.</div> +</td> +</tr> +<tr id="i8" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getBoolean-java.lang.String-">getBoolean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> <div class="block">Convenience method for getting boolean config values.</div> </td> </tr> -<tr id="i8" class="altColor"> +<tr id="i9" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getBoolean-java.lang.String-boolean-">getBoolean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, boolean def)</code> <div class="block">Convenience method for getting boolean config values.</div> </td> </tr> -<tr id="i9" class="rowColor"> +<tr id="i10" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getInt-java.lang.String-">getInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> <div class="block">Convenience method for getting int config values.</div> </td> </tr> -<tr id="i10" class="altColor"> +<tr id="i11" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getInt-java.lang.String-int-">getInt</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, int def)</code> <div class="block">Convenience method for getting int config values.</div> </td> </tr> -<tr id="i11" class="rowColor"> +<tr id="i12" class="altColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.Class-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</code> +<div class="block">Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"><code>getObject(String, Type, Type...)</code></a> except optimized for a non-parameterized class.</div> +</td> +</tr> +<tr id="i13" class="rowColor"> <td class="colFirst"><code><T> T</code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.Class-java.lang.String-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.String-java.lang.Class-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> <div class="block">Gets the entry with the specified key and converts it to the specified value.</div> </td> </tr> -<tr id="i12" class="altColor"> +<tr id="i14" class="altColor"> <td class="colFirst"><code><T> T</code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.Class-java.lang.String-java.lang.String-T-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, - T def)</code> -<div class="block">Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.Class-java.lang.String-T-"><code>getObject(Class, String, Object)</code></a>, but value is referenced through section name and key instead of full key.</div> + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args)</code> +<div class="block">Gets the entry with the specified key and converts it to the specified value.</div> </td> </tr> -<tr id="i13" class="rowColor"> +<tr id="i15" class="rowColor"> <td class="colFirst"><code><T> T</code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.Class-java.lang.String-T-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, - T def)</code> -<div class="block">Gets the entry with the specified key and converts it to the specified value..</div> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-">getObject</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args)</code> +<div class="block">Gets the entry with the specified key and converts it to the specified value.</div> </td> </tr> -<tr id="i14" class="altColor"> -<td class="colFirst"><code>protected abstract <a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getParser--">getParser</a></span>()</code> -<div class="block">Returns the parser in use for this config file.</div> +<tr id="i16" class="altColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObjectWithDefault-java.lang.String-T-java.lang.Class-">getObjectWithDefault</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + T def, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</code> +<div class="block">Gets the entry with the specified key and converts it to the specified value.</div> </td> </tr> -<tr id="i15" class="rowColor"> +<tr id="i17" class="rowColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObjectWithDefault-java.lang.String-T-java.lang.reflect.Type-java.lang.reflect.Type...-">getObjectWithDefault</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + T def, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args)</code> +<div class="block">Gets the entry with the specified key and converts it to the specified value.</div> +</td> +</tr> +<tr id="i18" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getResolving--">getResolving</a></span>()</code> <div class="block">Returns a wrapped instance of this config file where calls to getters have their values first resolved by a default <a href="../../../../org/apache/juneau/svl/VarResolver.html" title="class in org.apache.juneau.svl"><code>VarResolver</code></a>.</div> </td> </tr> -<tr id="i16" class="altColor"> +<tr id="i19" class="rowColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getResolving-org.apache.juneau.svl.VarResolver-">getResolving</a></span>(<a href="../../../../org/apache/juneau/svl/VarResolver.html" title="class in org.apache.juneau.svl">VarResolver</a> vr)</code> <div class="block">Returns a wrapped instance of this config file where calls to getters have their values first resolved by the specified <a href="../../../../org/apache/juneau/svl/VarResolver.html" title="class in org.apache.juneau.svl"><code>VarResolver</code></a>.</div> </td> </tr> -<tr id="i17" class="rowColor"> +<tr id="i20" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getResolving-org.apache.juneau.svl.VarResolverSession-">getResolving</a></span>(<a href="../../../../org/apache/juneau/svl/VarResolverSession.html" title="class in org.apache.juneau.svl">VarResolverSession</a> vs)</code> <div class="block">Returns a wrapped instance of this config file where calls to getters have their values first resolved by the specified <a href="../../../../org/apache/juneau/svl/VarResolverSession.html" title="class in org.apache.juneau.svl"><code>VarResolverSession</code></a>.</div> </td> </tr> -<tr id="i18" class="altColor"> +<tr id="i21" class="rowColor"> <td class="colFirst"><code>protected abstract <a href="../../../../org/apache/juneau/ini/Section.html" title="class in org.apache.juneau.ini">Section</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSection-java.lang.String-">getSection</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> <div class="block">Gets the section with the specified name.</div> </td> </tr> -<tr id="i19" class="rowColor"> +<tr id="i22" class="altColor"> <td class="colFirst"><code>protected abstract <a href="../../../../org/apache/juneau/ini/Section.html" title="class in org.apache.juneau.ini">Section</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSection-java.lang.String-boolean-">getSection</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, boolean create)</code> <div class="block">Gets the section with the specified name and optionally creates it if it's not there.</div> </td> </tr> -<tr id="i20" class="altColor"> +<tr id="i23" class="rowColor"> <td class="colFirst"><code><T> T</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSectionAsBean-java.lang.String-java.lang.Class-">getSectionAsBean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> -<div class="block">Shortcut for calling <code>asBean(sectionName, c, <jk>false</jk>)</code>.</div> +<div class="block">Shortcut for calling <code>getSectionAsBean(sectionName, c, <jk>false</jk>)</code>.</div> </td> </tr> -<tr id="i21" class="rowColor"> +<tr id="i24" class="altColor"> <td class="colFirst"><code><T> T</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSectionAsBean-java.lang.String-java.lang.Class-boolean-">getSectionAsBean</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, @@ -322,92 +347,102 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <div class="block">Converts this config file section to the specified bean instance.</div> </td> </tr> -<tr id="i22" class="altColor"> +<tr id="i25" class="rowColor"> +<td class="colFirst"><code><T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSectionAsInterface-java.lang.String-java.lang.Class-">getSectionAsInterface</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c)</code> +<div class="block">Wraps a config file section inside a Java interface so that values in the section can be read and + write using getters and setters.</div> +</td> +</tr> +<tr id="i26" class="altColor"> <td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSectionKeys-java.lang.String-">getSectionKeys</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName)</code> <div class="block">Returns the current set of keys in the specified section.</div> </td> </tr> -<tr id="i23" class="rowColor"> +<tr id="i27" class="rowColor"> <td class="colFirst"><code><a href="../../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSectionMap-java.lang.String-">getSectionMap</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName)</code> <div class="block">Returns the specified section as a map of key/value pairs.</div> </td> </tr> -<tr id="i24" class="altColor"> -<td class="colFirst"><code>protected abstract <a href="../../../../org/apache/juneau/serializer/WriterSerializer.html" title="class in org.apache.juneau.serializer">WriterSerializer</a></code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getSerializer--">getSerializer</a></span>()</code> -<div class="block">Returns the serializer in use for this config file.</div> -</td> -</tr> -<tr id="i25" class="rowColor"> +<tr id="i28" class="altColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getString-java.lang.String-">getString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> <div class="block">Gets the entry with the specified key.</div> </td> </tr> -<tr id="i26" class="altColor"> +<tr id="i29" class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getString-java.lang.String-java.lang.String-">getString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> def)</code> <div class="block">Returns the specified value as a string from the config file.</div> </td> </tr> -<tr id="i27" class="rowColor"> +<tr id="i30" class="altColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getStringArray-java.lang.String-">getStringArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> <div class="block">Gets the entry with the specified key, splits the value on commas, and returns the values as trimmed strings.</div> </td> </tr> -<tr id="i28" class="altColor"> +<tr id="i31" class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getStringArray-java.lang.String-java.lang.String:A-">getStringArray</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] def)</code> <div class="block">Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getStringArray-java.lang.String-"><code>getStringArray(String)</code></a> but returns a default value if the value cannot be found.</div> </td> </tr> -<tr id="i29" class="rowColor"> +<tr id="i32" class="altColor"> <td class="colFirst"><code>protected <a href="../../../../org/apache/juneau/svl/VarResolver.html" title="class in org.apache.juneau.svl">VarResolver</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#getVarResolver--">getVarResolver</a></span>()</code> </td> </tr> -<tr id="i30" class="altColor"> +<tr id="i33" class="rowColor"> <td class="colFirst"><code>abstract boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#isEncoded-java.lang.String-">isEncoded</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> <div class="block">Returns <jk>true</jk> if the encoding flag is set on the specified entry.</div> </td> </tr> -<tr id="i31" class="rowColor"> +<tr id="i34" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#load--">load</a></span>()</code> <div class="block">Loads ths config file object from the persisted file contents.</div> </td> </tr> -<tr id="i32" class="altColor"> +<tr id="i35" class="rowColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#load-java.io.Reader-">load</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a> r)</code> <div class="block">Loads ths config file object from the specified reader.</div> </td> </tr> -<tr id="i33" class="rowColor"> +<tr id="i36" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#loadIfModified--">loadIfModified</a></span>()</code> <div class="block">Reloads ths config file object from the persisted file contents if the modified timestamp on the file has changed.</div> </td> </tr> -<tr id="i34" class="altColor"> +<tr id="i37" class="rowColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#merge-org.apache.juneau.ini.ConfigFile-">merge</a></span>(<a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> cf)</code> <div class="block">Merges the contents of the specified config file into this config file.</div> </td> </tr> -<tr id="i35" class="rowColor"> +<tr id="i38" class="altColor"> +<td class="colFirst"><code>protected abstract <T> T</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#parse-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-">parse</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args)</code> +<div class="block">Converts the specified string to an object of the specified type.</div> +</td> +</tr> +<tr id="i39" class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#put-java.lang.String-java.lang.Object-">put</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value)</code> <div class="block">Adds or replaces an entry with the specified key with a POJO serialized to a string using the registered serializer.</div> </td> </tr> -<tr id="i36" class="altColor"> +<tr id="i40" class="altColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#put-java.lang.String-java.lang.Object-boolean-">put</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, @@ -415,7 +450,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <div class="block">Adds or replaces an entry with the specified key with the specified value.</div> </td> </tr> -<tr id="i37" class="rowColor"> +<tr id="i41" class="rowColor"> <td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#put-java.lang.String-java.lang.String-java.lang.Object-boolean-">put</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, @@ -424,76 +459,92 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <div class="block">Sets an entry value in this config file.</div> </td> </tr> -<tr id="i38" class="altColor"> +<tr id="i42" class="altColor"> +<td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#put-java.lang.String-java.lang.String-java.lang.String-boolean-">put</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + boolean encoded)</code> +<div class="block">Identical to <a href="../../../../org/apache/juneau/ini/ConfigFile.html#put-java.lang.String-java.lang.String-java.lang.Object-boolean-"><code>put(String, String, Object, boolean)</code></a> except used when the value is a simple string + to avoid having to catch a <a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer"><code>SerializeException</code></a>.</div> +</td> +</tr> +<tr id="i43" class="rowColor"> <td class="colFirst"><code>protected abstract void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#readLock--">readLock</a></span>()</code> <div class="block">Places a read lock on this config file.</div> </td> </tr> -<tr id="i39" class="rowColor"> +<tr id="i44" class="altColor"> <td class="colFirst"><code>protected abstract void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#readUnlock--">readUnlock</a></span>()</code> <div class="block">Removes the read lock on this config file.</div> </td> </tr> -<tr id="i40" class="altColor"> +<tr id="i45" class="rowColor"> <td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#remove-java.lang.String-java.lang.String-">remove</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey)</code> <div class="block">Removes an antry from this config file.</div> </td> </tr> -<tr id="i41" class="rowColor"> +<tr id="i46" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#removeSection-java.lang.String-">removeSection</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> <div class="block">Removes the section with the specified name.</div> </td> </tr> -<tr id="i42" class="altColor"> +<tr id="i47" class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#removeString-java.lang.String-">removeString</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</code> <div class="block">Removes an entry with the specified key.</div> </td> </tr> -<tr id="i43" class="rowColor"> +<tr id="i48" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#save--">save</a></span>()</code> <div class="block">Saves this config file to disk.</div> </td> </tr> -<tr id="i44" class="altColor"> +<tr id="i49" class="rowColor"> +<td class="colFirst"><code>protected abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#serialize-java.lang.Object-">serialize</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o)</code> +<div class="block">Converts the specified object to a string.</div> +</td> +</tr> +<tr id="i50" class="altColor"> <td class="colFirst"><code><a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#serializeTo-java.io.Writer-">serializeTo</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out)</code> <div class="block">Saves this config file to the specified writer as an INI file.</div> </td> </tr> -<tr id="i45" class="rowColor"> +<tr id="i51" class="rowColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#serializeTo-java.io.Writer-org.apache.juneau.ini.ConfigFileFormat-">serializeTo</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out, <a href="../../../../org/apache/juneau/ini/ConfigFileFormat.html" title="enum in org.apache.juneau.ini">ConfigFileFormat</a> format)</code> <div class="block">Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#serializeTo-java.io.Writer-"><code>serializeTo(Writer)</code></a>, except allows you to explicitely specify a format.</div> </td> </tr> -<tr id="i46" class="altColor"> +<tr id="i52" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#setSection-java.lang.String-java.util.Map-">setSection</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> contents)</code> <div class="block">Creates or overwrites the specified section.</div> </td> </tr> -<tr id="i47" class="rowColor"> +<tr id="i53" class="rowColor"> <td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#toString--">toString</a></span>()</code> <div class="block">Returns the config file contents as a string.</div> </td> </tr> -<tr id="i48" class="altColor"> +<tr id="i54" class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../org/apache/juneau/Writable.html" title="interface in org.apache.juneau">Writable</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#toWritable--">toWritable</a></span>()</code> <div class="block">Wraps this config file in a <a href="../../../../org/apache/juneau/Writable.html" title="interface in org.apache.juneau"><code>Writable</code></a> interface that renders it as plain text.</div> </td> </tr> -<tr id="i49" class="rowColor"> +<tr id="i55" class="rowColor"> <td class="colFirst"><code><a href="../../../../org/apache/juneau/ObjectMap.html" title="class in org.apache.juneau">ObjectMap</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/juneau/ini/ConfigFile.html#writeProperties-java.lang.String-java.lang.Object-boolean-java.lang.Class...-">writeProperties</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> bean, @@ -572,10 +623,11 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>put</h4> -<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.62">put</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, +<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.63">put</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> value, - boolean encoded)</pre> + boolean encoded) + throws <a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer">SerializeException</a></pre> <div class="block">Sets an entry value in this config file.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -586,6 +638,32 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <dt><span class="returnLabel">Returns:</span></dt> <dd>The previous value, or <jk>null</jk> if the section or key did not previously exist.</dd> <dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer">SerializeException</a></code> - If the object value could not be converted to a JSON string for some reason.</dd> +<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - If config file is read only.</dd> +</dl> +</li> +</ul> +<a name="put-java.lang.String-java.lang.String-java.lang.String-boolean-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>put</h4> +<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.76">put</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value, + boolean encoded)</pre> +<div class="block">Identical to <a href="../../../../org/apache/juneau/ini/ConfigFile.html#put-java.lang.String-java.lang.String-java.lang.Object-boolean-"><code>put(String, String, Object, boolean)</code></a> except used when the value is a simple string + to avoid having to catch a <a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer"><code>SerializeException</code></a>.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sectionName</code> - The section name. Must not be <jk>null</jk>.</dd> +<dd><code>sectionKey</code> - The section key. Must not be <jk>null</jk>.</dd> +<dd><code>value</code> - The new value.</dd> +<dd><code>encoded</code> - </dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The previous value, or <jk>null</jk> if the section or key did not previously exist.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - If config file is read only.</dd> </dl> </li> @@ -596,7 +674,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>remove</h4> -<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.72">remove</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, +<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.87">remove</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey)</pre> <div class="block">Removes an antry from this config file.</div> <dl> @@ -616,7 +694,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>getSectionKeys</h4> -<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.81">getSectionKeys</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName)</pre> +<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.96">getSectionKeys</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName)</pre> <div class="block">Returns the current set of keys in the specified section.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -634,7 +712,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>loadIfModified</h4> -<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.90">loadIfModified</a>() +<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.105">loadIfModified</a>() throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> <div class="block">Reloads ths config file object from the persisted file contents if the modified timestamp on the file has changed.</div> <dl> @@ -652,7 +730,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>load</h4> -<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.99">load</a>() +<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.114">load</a>() throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> <div class="block">Loads ths config file object from the persisted file contents.</div> <dl> @@ -670,7 +748,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>load</h4> -<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.109">load</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a> r) +<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.124">load</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a> r) throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> <div class="block">Loads ths config file object from the specified reader.</div> <dl> @@ -690,7 +768,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>addLines</h4> -<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.128">addLines</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> section, +<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.143">addLines</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> section, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>... lines)</pre> <div class="block">Adds arbitrary lines to the specified config file section. <p> @@ -719,7 +797,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>addHeaderComments</h4> -<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.149">addHeaderComments</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> section, +<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.164">addHeaderComments</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> section, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>... headerComments)</pre> <div class="block">Adds header comments to the specified section. <p> @@ -750,7 +828,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>clearHeaderComments</h4> -<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.158">clearHeaderComments</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> section)</pre> +<pre>public abstract <a href="../../../../org/apache/juneau/ini/ConfigFile.html" title="class in org.apache.juneau.ini">ConfigFile</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.173">clearHeaderComments</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> section)</pre> <div class="block">Removes any header comments from the specified section.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -762,37 +840,66 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? </dl> </li> </ul> -<a name="getSerializer--"> +<a name="getBeanSession--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>getSerializer</h4> -<pre>protected abstract <a href="../../../../org/apache/juneau/serializer/WriterSerializer.html" title="class in org.apache.juneau.serializer">WriterSerializer</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.166">getSerializer</a>() - throws <a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer">SerializeException</a></pre> -<div class="block">Returns the serializer in use for this config file.</div> +<h4>getBeanSession</h4> +<pre>protected abstract <a href="../../../../org/apache/juneau/BeanSession.html" title="class in org.apache.juneau">BeanSession</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.182">getBeanSession</a>()</pre> +<div class="block">Returns the reusable bean session associated with this config file. + <p> + Used for performing simple datatype conversions.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> -<dd>This object (for method chaining).</dd> +<dd>The reusable bean session associated with this config file.</dd> +</dl> +</li> +</ul> +<a name="serialize-java.lang.Object-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>serialize</h4> +<pre>protected abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.196">serialize</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> o) + throws <a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer">SerializeException</a></pre> +<div class="block">Converts the specified object to a string. + <p> + The serialized output is identical to LAX JSON (JSON with unquoted attributes) except for the following exceptions: + <ul> + <li>Top level strings are not quoted. + </ul></div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>o</code> - The object to serialize.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The serialized object.</dd> <dt><span class="throwsLabel">Throws:</span></dt> -<dd><code><a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer">SerializeException</a></code> - If no serializer is defined on this config file.</dd> +<dd><code><a href="../../../../org/apache/juneau/serializer/SerializeException.html" title="class in org.apache.juneau.serializer">SerializeException</a></code></dd> </dl> </li> </ul> -<a name="getParser--"> +<a name="parse-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>getParser</h4> -<pre>protected abstract <a href="../../../../org/apache/juneau/parser/ReaderParser.html" title="class in org.apache.juneau.parser">ReaderParser</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.174">getParser</a>() - throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> -<div class="block">Returns the parser in use for this config file.</div> +<h4>parse</h4> +<pre>protected abstract <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.207">parse</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args) + throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> +<div class="block">Converts the specified string to an object of the specified type.</div> <dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>s</code> - The string to parse.</dd> +<dd><code>type</code> - The data type to create.</dd> +<dd><code>args</code> - The generic type arguments if the type is a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a></dd> <dt><span class="returnLabel">Returns:</span></dt> -<dd>This object (for method chaining).</dd> +<dd>The parsed object.</dd> <dt><span class="throwsLabel">Throws:</span></dt> -<dd><code><a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></code> - If no parser is defined on this config file.</dd> +<dd><code><a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></code></dd> </dl> </li> </ul> @@ -802,7 +909,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>readLock</h4> -<pre>protected abstract void <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.179">readLock</a>()</pre> +<pre>protected abstract void <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.212">readLock</a>()</pre> <div class="block">Places a read lock on this config file.</div> </li> </ul> @@ -812,7 +919,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>readUnlock</h4> -<pre>protected abstract void <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.184">readUnlock</a>()</pre> +<pre>protected abstract void <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.217">readUnlock</a>()</pre> <div class="block">Removes the read lock on this config file.</div> </li> </ul> @@ -822,7 +929,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>getString</h4> -<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.198">getString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.231">getString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> def)</pre> <div class="block">Returns the specified value as a string from the config file.</div> <dl> @@ -840,7 +947,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>removeString</h4> -<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.211">removeString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.244">removeString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> <div class="block">Removes an entry with the specified key.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> @@ -852,14 +959,15 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? </dl> </li> </ul> -<a name="getObject-java.lang.Class-java.lang.String-"> +<a name="getObject-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getObject</h4> -<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.236">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key) +<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.301">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args) throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> <div class="block">Gets the entry with the specified key and converts it to the specified value. <p> @@ -869,14 +977,46 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <li><js>"section/key"</js> - A value from the specified section. </ul> <p> - If the class type is an array, the value is split on commas and converted individually. + The type can be a simple type (e.g. beans, strings, numbers) or parameterized type (collections/maps). + + <h5 class='section'>Examples:</h5> + <p class='bcode'> + ConfigFile cf = <jk>new</jk> ConfigFileBuilder().build(<js>"MyConfig.cfg"</js>); + + <jc>// Parse into a linked-list of strings.</jc> + List l = cf.getObject(<js>"MySection/myListOfStrings"</js>, LinkedList.<jk>class</jk>, String.<jk>class</jk>); + + <jc>// Parse into a linked-list of beans.</jc> + List l = cf.getObject(<js>"MySection/myListOfBeans"</js>, LinkedList.<jk>class</jk>, MyBean.<jk>class</jk>); + + <jc>// Parse into a linked-list of linked-lists of strings.</jc> + List l = cf.getObject(<js>"MySection/my2dListOfStrings"</js>, LinkedList.<jk>class</jk>, LinkedList.<jk>class</jk>, String.<jk>class</jk>); + + <jc>// Parse into a map of string keys/values.</jc> + Map m = cf.getObject(<js>"MySection/myMap"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>, String.<jk>class</jk>); + + <jc>// Parse into a map containing string keys and values of lists containing beans.</jc> + Map m = cf.getObject(<js>"MySection/myMapOfListsOfBeans"</js>, TreeMap.<jk>class</jk>, String.<jk>class</jk>, List.<jk>class</jk>, MyBean.<jk>class</jk>); + </p> + <p> + <code>Collection</code> classes are assumed to be followed by zero or one objects indicating the element type. + <p> + <code>Map</code> classes are assumed to be followed by zero or two meta objects indicating the key and value types. <p> - If you specify a primitive element type using this method (e.g. <code><jk>int</jk>.<jk>class</jk></code>, - you will get an array of wrapped objects (e.g. <code>Integer[].<jk>class</jk></code>.</div> + The array can be arbitrarily long to indicate arbitrarily complex data structures. + <p> + <h5 class='section'>Notes:</h5> + <ul> + <li>Use the <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.Class-"><code>getObject(String, Class)</code></a> method instead if you don't need a parameterized map/collection. + </ul></div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>c</code> - The class to convert the value to.</dd> <dd><code>key</code> - The key. See <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getString-java.lang.String-"><code>getString(String)</code></a> for a description of the key.</dd> +<dd><code>type</code> - The object type to create. + <br>Can be any of the following: <a href="../../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a></dd> +<dd><code>args</code> - The type arguments of the class if it's a collection or map. + <br>Can be any of the following: <a href="../../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a> + <br>Ignored if the main type is not a map or collection.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>The value, or <jk>null</jk> if the section or key does not exist.</dd> <dt><span class="throwsLabel">Throws:</span></dt> @@ -884,30 +1024,72 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? </dl> </li> </ul> -<a name="getObject-java.lang.Class-java.lang.String-java.lang.Object-"> -<!-- --> -</a><a name="getObject-java.lang.Class-java.lang.String-T-"> +<a name="getObject-java.lang.String-java.lang.Class-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getObject</h4> -<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.256">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, - T def) +<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.338">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type) throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> -<div class="block">Gets the entry with the specified key and converts it to the specified value.. +<div class="block">Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"><code>getObject(String, Type, Type...)</code></a> except optimized for a non-parameterized class. <p> - The key can be in one of the following formats... - <ul class='spaced-list'> - <li><js>"key"</js> - A value in the default section (i.e. defined above any <code>[section]</code> header). - <li><js>"section/key"</js> - A value from the specified section. - </ul></div> + This is the preferred parse method for simple types since you don't need to cast the results. + <h5 class='section'>Examples:</h5> + <p class='bcode'> + ConfigFile cf = <jk>new</jk> ConfigFileBuilder().build(<js>"MyConfig.cfg"</js>); + + <jc>// Parse into a string.</jc> + String s = cf.getObject(<js>"MySection/mySimpleString"</js>, String.<jk>class</jk>); + + <jc>// Parse into a bean.</jc> + MyBean b = cf.getObject(<js>"MySection/myBean"</js>, MyBean.<jk>class</jk>); + + <jc>// Parse into a bean array.</jc> + MyBean[] ba = cf.getObject(<js>"MySection/myBeanArray"</js>, MyBean[].<jk>class</jk>); + + <jc>// Parse into a linked-list of objects.</jc> + List l = cf.getObject(<js>"MySection/myList"</js>, LinkedList.<jk>class</jk>); + + <jc>// Parse into a map of object keys/values.</jc> + Map m = cf.getObject(<js>"MySection/myMap"</js>, TreeMap.<jk>class</jk>); + </p></div> +<dl> +<dt><span class="paramLabel">Type Parameters:</span></dt> +<dd><code>T</code> - The class type of the object being created.</dd> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key. See <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getString-java.lang.String-"><code>getString(String)</code></a> for a description of the key.</dd> +<dd><code>type</code> - The object type to create.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The parsed object.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></code> - If the input contains a syntax error or is malformed, or is not valid for the specified type.</dd> +<dt><span class="seeLabel">See Also:</span></dt> +<dd><a href="../../../../org/apache/juneau/BeanSession.html#getClassMeta-java.lang.reflect.Type-java.lang.reflect.Type...-"><code>for argument syntax for maps and collections.</code></a></dd> +</dl> +</li> +</ul> +<a name="getObjectWithDefault-java.lang.String-java.lang.Object-java.lang.Class-"> +<!-- --> +</a><a name="getObjectWithDefault-java.lang.String-T-java.lang.Class-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getObjectWithDefault</h4> +<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.357">getObjectWithDefault</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + T def, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type) + throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> +<div class="block">Gets the entry with the specified key and converts it to the specified value. + <p> + Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.Class-"><code>getObject(String, Class)</code></a>, but with a default value.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>c</code> - The class to convert the value to.</dd> <dd><code>key</code> - The key. See <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getString-java.lang.String-"><code>getString(String)</code></a> for a description of the key.</dd> <dd><code>def</code> - The default value if section or key does not exist.</dd> +<dd><code>type</code> - The class to convert the value to.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>The value, or <jk>null</jk> if the section or key does not exist.</dd> <dt><span class="throwsLabel">Throws:</span></dt> @@ -915,26 +1097,56 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? </dl> </li> </ul> -<a name="getObject-java.lang.Class-java.lang.String-java.lang.String-java.lang.Object-"> +<a name="getObjectWithDefault-java.lang.String-java.lang.Object-java.lang.reflect.Type-java.lang.reflect.Type:A-"> <!-- --> -</a><a name="getObject-java.lang.Class-java.lang.String-java.lang.String-T-"> +</a><a name="getObjectWithDefault-java.lang.String-T-java.lang.reflect.Type-java.lang.reflect.Type...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getObjectWithDefault</h4> +<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.380">getObjectWithDefault</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key, + T def, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args) + throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> +<div class="block">Gets the entry with the specified key and converts it to the specified value. + <p> + Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"><code>getObject(String, Type, Type...)</code></a>, but with a default value.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>key</code> - The key. See <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getString-java.lang.String-"><code>getString(String)</code></a> for a description of the key.</dd> +<dd><code>def</code> - The default value if section or key does not exist.</dd> +<dd><code>type</code> - The object type to create. + <br>Can be any of the following: <a href="../../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a></dd> +<dd><code>args</code> - The type arguments of the class if it's a collection or map. + <br>Can be any of the following: <a href="../../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a> + <br>Ignored if the main type is not a map or collection.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The value, or <jk>null</jk> if the section or key does not exist.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></code> - If parser could not parse the value or if a parser is not registered with this config file.</dd> +</dl> +</li> +</ul> +<a name="getObject-java.lang.String-java.lang.String-java.lang.Class-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getObject</h4> -<pre>public <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.273">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, - <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, - T def) - throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> -<div class="block">Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.Class-java.lang.String-T-"><code>getObject(Class, String, Object)</code></a>, but value is referenced through section name and key instead of full key.</div> +<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.399">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> c) + throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> +<div class="block">Gets the entry with the specified key and converts it to the specified value. + <p> + Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.Class-"><code>getObject(String, Class)</code></a>, but used when key is already broken into section/key.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>c</code> - The class to convert the value to.</dd> <dd><code>sectionName</code> - The section name. Must not be <jk>null</jk>.</dd> <dd><code>sectionKey</code> - The section key. Must not be <jk>null</jk>.</dd> -<dd><code>def</code> - The default value if section or key does not exist.</dd> +<dd><code>c</code> - The class to convert the value to.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>The value, or the default value if the section or value doesn't exist.</dd> <dt><span class="throwsLabel">Throws:</span></dt> @@ -942,13 +1154,43 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? </dl> </li> </ul> +<a name="getObject-java.lang.String-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getObject</h4> +<pre>public final <T> T <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.421">getObject</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionName, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sectionKey, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a> type, + <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</a>... args) + throws <a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></pre> +<div class="block">Gets the entry with the specified key and converts it to the specified value. + <p> + Same as <a href="../../../../org/apache/juneau/ini/ConfigFile.html#getObject-java.lang.String-java.lang.reflect.Type-java.lang.reflect.Type...-"><code>getObject(String, Type, Type...)</code></a>, but used when key is already broken into section/key.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>sectionName</code> - The section name. Must not be <jk>null</jk>.</dd> +<dd><code>sectionKey</code> - The section key. Must not be <jk>null</jk>.</dd> +<dd><code>type</code> - The object type to create. + <br>Can be any of the following: <a href="../../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a></dd> +<dd><code>args</code> - The type arguments of the class if it's a collection or map. + <br>Can be any of the following: <a href="../../../../org/apache/juneau/ClassMeta.html" title="class in org.apache.juneau"><code>ClassMeta</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang"><code>Class</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/ParameterizedType.html?is-external=true" title="class or interface in java.lang.reflect"><code>ParameterizedType</code></a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/GenericArrayType.html?is-external=true" title="class or interface in java.lang.reflect"><code>GenericArrayType</code></a> + <br>Ignored if the main type is not a map or collection.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>The value, or <jk>null</jk> if the section or key does not exist.</dd> +<dt><span class="throwsLabel">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/juneau/parser/ParseException.html" title="class in org.apache.juneau.parser">ParseException</a></code> - If parser could not parse the value or if a parser is not registered with this config file.</dd> +</dl> +</li> +</ul> <a name="getString-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getString</h4> -<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.314">getString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> +<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/juneau/ini/ConfigFile.html#line.439">getString</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> key)</pre> <div class="block">Gets the entry with the specified key. <p> The key can be in one of the following formats... @@ -970,7 +1212,7 @@ implements <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html? <ul class="blockList"> <li class="blockList"> <h4>getStringArray</h4> -<pre>public final <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-
<TRUNCATED>
