CVSROOT: /sources/classpath Module name: cp-tools Changes by: Andrew John Hughes <gnu_andrew> 12/01/20 15:13:51
Modified files: . : ChangeLog src/gnu/ldml : AliasElement.java Analyzer.java DataElement.java DetailedListElement.java Element.java ListDataElement.java Parser.java src/gnu/localegen: JavaGenerator.java PropertiesGenerator.java Log message: Make ListDataElement fields private and switch to use of Map. Disable analysis of alias element (broken). 2012-01-20 Andrew John Hughes <gnu_and...@member.fsf.org> * src/gnu/ldml/AliasElement.java: (toString()): Implemented. * src/gnu/ldml/Analyzer.java: (Analyzer(URL)): Disable resolving dependencies for now as handling of the alias element is completely broken. (addResourceFile(URL)): Handle the special source 'locale' which refers to the current locale. Avoid going into an endless loop if no files are found. Search for replacement path not the source. * src/gnu/ldml/DataElement.java: (toString()): Implemented. * src/gnu/ldml/DetailedListElement.java: (Parser,ListDataElement,String,String)): Require a ListDataElement as argument to avoid a potential ClassCastException. Use addElement method rather than accessing ListDataElement.listData directly. * src/gnu/ldml/Element.java: (toString()): Implemented. * src/gnu/ldml/ListDataElement.java: Make fields private and use HashMap rather than Hashtable. Use separate collections for elements and data. (defaultLeaf): removed; unused. (addChild(Element)): removed; unused. (flattenLeaf(String)): Use separate element collection, avoiding the need for runtime type checking. (leaves()): Return an Iterator rather than an Enumeration. (addData(String,String)): Allow data to be added, now listData is private. (addElement(String,DetailedListElement)): Likewise for additions to the new listElms. (getElement(String)): New accessor for listElms. (getData(String)): Likewise for listData. (elmKeys()): Returns an iterator over listElms. (getData()): Provide monitored access to listData. (toString()): Implemented. * src/gnu/ldml/Parser.java: (Alias.start(String,Attributes)): Retrieve value of path attribute rather than non-existent type. (List.end(String)): Use mutators for ListDataElement. (Collations.start(String,Attributes)): Likewise. (startElement(String,String,String,Attributes)): Remove unnecessary cast. (endElement(String,String,String)): Likewise. * src/gnu/localegen/JavaGenerator.java: (OrderedListContent.data): Change type to Map. (OrderedListContent(String,Map,String[],int,int)): Accept Map rather than Hashtable. (OrderedListContent.generateContent(PrintWriter)): Use Iterator rather than Enumeration, Map in place of Hashtable. (HashtableContent.table): Change type to Map. (HashtableContent(String,Map)): Accept Map rather than Hashtable. (HashtableContent.generateContent(PrintWriter)): Use Iterator rather than Enumeration. Avoid unnecessary casts. (addStringContent(Map,String,String)): Accept Map rather than Hashtable. Cleanup name formatting. (addOrderedListContent(Map,String,String,String[],int,int)): Likewise. (computeCalendar(Map)): Likewise. (computeCollations(Map)): Likewise. (computeTimeZones(Map)): Likewise. (computeLocalNames(Map)): Likewise. (computeCurrencies(Map)): Likewise. * src/gnu/localegen/PropertiesGenerator.java, (OrderedListContent.data): Change type to Map. (OrderedListContent(String,Map,String[],int,int)): Accept Map rather than Hashtable. (OrderedListContent.generateContent(PrintWriter)): Use Iterator rather than Enumeration, Map in place of Hashtable. (HashtableContent.table): Change type to Map. (HashtableContent(String,Map)): Accept Map rather than Hashtable. (HashtableContent.generateContent(PrintWriter)): Use Iterator rather than Enumeration. Avoid unnecessary casts. (addCurrencyFormatContent(Map)): Accept Map rather than Hashtable. (addStringContent(Map,String,String)): Likewise. (addOrderedListContent(Map,String,String,String[],int,int)): Likewise. (computeCalendar(Map)): Likewise. Remove unnecessary casts. (computeCollations(Map)): Likewise. (computeTimeZones(Map)): Likewise. (computeLocalNames(Map)): Likewise. (computeCurrencies(Map)): Likewise. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/cp-tools/ChangeLog?cvsroot=classpath&r1=1.71&r2=1.72 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/AliasElement.java?cvsroot=classpath&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/Analyzer.java?cvsroot=classpath&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/DataElement.java?cvsroot=classpath&r1=1.3&r2=1.4 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/DetailedListElement.java?cvsroot=classpath&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/Element.java?cvsroot=classpath&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/ListDataElement.java?cvsroot=classpath&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/ldml/Parser.java?cvsroot=classpath&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/localegen/JavaGenerator.java?cvsroot=classpath&r1=1.28&r2=1.29 http://cvs.savannah.gnu.org/viewcvs/cp-tools/src/gnu/localegen/PropertiesGenerator.java?cvsroot=classpath&r1=1.9&r2=1.10