From 8be40d31d78723debd47f671544f480c1c606db7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 3 May 2013 15:03:19 +0200 Subject: Java cleanup, convert Hashtable to HashMap Change-Id: If8a9c0c3a4b357fb9c0ff096f44ed1b44ebbcef4 --- odk/examples/java/Inspector/SourceCodeGenerator.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'odk/examples/java') 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 aVariables = new Hashtable(); + private HashMap aVariables = new HashMap(); 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 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); } -- cgit