144
145 while (s.hasNextLine()) {
146 String line = s.nextLine();
147 int i = line.indexOf("$");
148 if (i == -1) {
149 out.println(line);
150 continue;
151 }
152 if (line.indexOf("$PACKAGE$", i) != -1) {
153 line = line.replace("$PACKAGE$", pkgName);
154 }
155 if (line.indexOf("$NAME_CLZ$", i) != -1) {
156 line = line.replace("$NAME_CLZ$", clzName);
157 }
158 if (line.indexOf("$NAME_CS$", i) != -1) {
159 line = line.replace("$NAME_CS$", csName);
160 }
161 if (line.indexOf("$NAME_ALIASES$", i) != -1) {
162 if ("sun.nio.cs".equals(pkgName))
163 line = line.replace("$NAME_ALIASES$",
164 "StandardCharsets.aliases_" + clzName);
165 else
166 line = line.replace("$NAME_ALIASES$",
167 "ExtendedCharsets.aliasesFor(\"" + csName + "\")");
168 }
169 if (line.indexOf("$NAME_HIS$", i) != -1) {
170 line = line.replace("$NAME_HIS$", hisName);
171 }
172 if (line.indexOf("$CONTAINS$", i) != -1) {
173 if (isASCII)
174 line = " return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof " + clzName + "));";
175 else
176 line = " return (cs instanceof " + clzName + ");";
177 }
178 if (line.indexOf("$ASCIICOMPATIBLE$") != -1) {
179 line = line.replace("$ASCIICOMPATIBLE$", isASCII ? "true" : "false");
180 }
181 if (line.indexOf("$B2CTABLE$") != -1) {
182 line = line.replace("$B2CTABLE$", b2c);
183 }
184 if (line.indexOf("$C2BLENGTH$") != -1) {
|
144
145 while (s.hasNextLine()) {
146 String line = s.nextLine();
147 int i = line.indexOf("$");
148 if (i == -1) {
149 out.println(line);
150 continue;
151 }
152 if (line.indexOf("$PACKAGE$", i) != -1) {
153 line = line.replace("$PACKAGE$", pkgName);
154 }
155 if (line.indexOf("$NAME_CLZ$", i) != -1) {
156 line = line.replace("$NAME_CLZ$", clzName);
157 }
158 if (line.indexOf("$NAME_CS$", i) != -1) {
159 line = line.replace("$NAME_CS$", csName);
160 }
161 if (line.indexOf("$NAME_ALIASES$", i) != -1) {
162 if ("sun.nio.cs".equals(pkgName))
163 line = line.replace("$NAME_ALIASES$",
164 "StandardCharsets.aliases_" + clzName + "()");
165 else
166 line = line.replace("$NAME_ALIASES$",
167 "ExtendedCharsets.aliasesFor(\"" + csName + "\")");
168 }
169 if (line.indexOf("$NAME_HIS$", i) != -1) {
170 line = line.replace("$NAME_HIS$", hisName);
171 }
172 if (line.indexOf("$CONTAINS$", i) != -1) {
173 if (isASCII)
174 line = " return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof " + clzName + "));";
175 else
176 line = " return (cs instanceof " + clzName + ");";
177 }
178 if (line.indexOf("$ASCIICOMPATIBLE$") != -1) {
179 line = line.replace("$ASCIICOMPATIBLE$", isASCII ? "true" : "false");
180 }
181 if (line.indexOf("$B2CTABLE$") != -1) {
182 line = line.replace("$B2CTABLE$", b2c);
183 }
184 if (line.indexOf("$C2BLENGTH$") != -1) {
|