diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-03 15:03:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-05-06 11:45:53 +0200 |
commit | 8be40d31d78723debd47f671544f480c1c606db7 (patch) | |
tree | 0051888bb41793e4d65704a93a4cfc659119c8bc /odk/examples/java | |
parent | e527a340051b55a6f05d05f397d82ec797165163 (diff) |
Java cleanup, convert Hashtable to HashMap
Change-Id: If8a9c0c3a4b357fb9c0ff096f44ed1b44ebbcef4
Diffstat (limited to 'odk/examples/java')
-rw-r--r-- | odk/examples/java/Inspector/SourceCodeGenerator.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java index 4e6f3bc30115..8ccba8bba944 100644 --- a/odk/examples/java/Inspector/SourceCodeGenerator.java +++ b/odk/examples/java/Inspector/SourceCodeGenerator.java @@ -33,8 +33,7 @@ *************************************************************************/ import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; +import java.util.HashMap; import com.sun.star.reflection.ParamInfo; import com.sun.star.reflection.XIdlClass; @@ -55,7 +54,7 @@ public class SourceCodeGenerator { private String sStatementCode = ""; private String sMainMethodSignature = ""; - private Hashtable<String, UnoObjectDefinition> aVariables = new Hashtable<String, UnoObjectDefinition>(); + private HashMap<String, UnoObjectDefinition> aVariables = new HashMap<String, UnoObjectDefinition>(); private final String SSUFFIXSEPARATOR = "_"; private final String SVARIABLENAME = "VariableName"; private final String SARRAYVARIABLENAME = "VariableNameList"; @@ -344,9 +343,7 @@ public class SourceCodeGenerator { private String getHeaderSourceCode(){ - Enumeration<UnoObjectDefinition> aEnumeration = aVariables.elements(); - while(aEnumeration.hasMoreElements()){ - UnoObjectDefinition oUnoObjectDefinition = aEnumeration.nextElement(); + for(UnoObjectDefinition oUnoObjectDefinition : aVariables.values()){ String sCurHeaderStatement = m_xLanguageSourceCodeGenerator.getHeaderSourceCode(oUnoObjectDefinition.getUnoObject(), oUnoObjectDefinition.getTypeName(), oUnoObjectDefinition.getTypeClass()); sHeaderStatements.add(sCurHeaderStatement); } |