summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Config
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-04-25 14:55:32 +0200
committerNoel Grandin <noel@peralex.com>2013-04-26 08:18:40 +0200
commitfb39e719895689a290d3eb910bee994e5ffa2c25 (patch)
treebe58bdffdb299f875f0854ad9c39ea94dce9f3be /odk/examples/DevelopersGuide/Config
parentd2d3e5d2a86cf91a9b38fabe76dc919c77c62852 (diff)
Java cleanup, call static methods statically
Change-Id: Ibe0454d490153f723a58c3c619be7f8d443639c8
Diffstat (limited to 'odk/examples/DevelopersGuide/Config')
-rw-r--r--odk/examples/DevelopersGuide/Config/ConfigExamples.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
index 0281dca8324a..ae3b0ceede52 100644
--- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java
+++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
@@ -465,9 +465,8 @@ public class ConfigExamples
for(int i=0; i< aElementNames.length; ++i)
{
Object aChild = xChildAccess.getByName( aElementNames[i] );
- AnyConverter aAnyConv = new AnyConverter();
// is it a structural element (object) ...
- if ( aAnyConv.isObject(aChild) && !aAnyConv.isArray(aChild) )
+ if ( AnyConverter.isObject(aChild) && !AnyConverter.isArray(aChild) )
{
// then get an interface
XInterface xChildElement = UnoRuntime.queryInterface(XInterface.class, aChild);
@@ -527,7 +526,7 @@ public class ConfigExamples
new IConfigurationProcessor () {
/// prints Path and Value of properties
public void processValueElement( String sPath_, Object aValue_ ) {
- if (new AnyConverter().isArray(aValue_))
+ if (AnyConverter.isArray(aValue_))
{
final Object [] aArray = (Object [])aValue_;
@@ -751,11 +750,10 @@ public class ConfigExamples
String aItemNames [] = aReplace.getElementNames();
for (int i=0; i < aItemNames.length; ++i) {
Object aItem = aReplace.getByName( aItemNames [i] );
- AnyConverter aAnyConv = new AnyConverter();
// replace integers by a 'complement' value
- if ( aAnyConv.isInt(aItem) )
+ if ( AnyConverter.isInt(aItem) )
{
- int nOld = aAnyConv.toInt(aItem);
+ int nOld = AnyConverter.toInt(aItem);
int nNew = 9999 - nOld;
System.out.println("Replacing integer value: " + aItemNames [i]);
@@ -763,9 +761,9 @@ public class ConfigExamples
}
// and booleans by their negated value
- else if ( aAnyConv.isBoolean(aItem) )
+ else if ( AnyConverter.isBoolean(aItem) )
{
- boolean bOld = aAnyConv.toBoolean(aItem);
+ boolean bOld = AnyConverter.toBoolean(aItem);
boolean bNew = ! bOld;
System.out.println("Replacing boolean value: " + aItemNames [i]);