Lines Matching refs:pw

100     IndentingPrintWriter pw = new IndentingPrintWriter(file);
102 writeClassHeader(inFile, groupName, pw);
103 pw.printMsg("package @ ;", packageName);
104 pw.println();
105 pw.println("import java.util.logging.Logger ;");
106 pw.println("import java.util.logging.Level ;");
107 pw.println();
108 pw.println("import org.omg.CORBA.OMGVMCID ;");
109 pw.println( "import com.sun.corba.se.impl.util.SUNVMCID ;");
110 pw.println( "import org.omg.CORBA.CompletionStatus ;");
111 pw.println( "import org.omg.CORBA.SystemException ;");
112 pw.println();
113 pw.println( "import com.sun.corba.se.spi.orb.ORB ;");
114 pw.println();
115 pw.println( "import com.sun.corba.se.spi.logging.LogWrapperFactory;");
116 pw.println();
117 pw.println( "import com.sun.corba.se.spi.logging.LogWrapperBase;");
118 pw.println();
119 writeImports(exceptions, pw);
120 pw.println();
121 pw.indent();
122 pw.printMsg("public class @ extends LogWrapperBase {", className);
123 pw.println();
124 pw.printMsg("public @( Logger logger )", className);
125 pw.indent();
126 pw.println( "{");
127 pw.undent();
128 pw.println( "super( logger ) ;");
129 pw.println( "}");
130 pw.println();
131 pw.flush();
132 writeFactoryMethod(className, groupName, pw);
133 writeExceptions(groupName, exceptions, className, pw);
134 pw.undent();
135 pw.println( );
136 pw.println( "}");
137 pw.flush();
138 pw.close();
146 * @param pw the print writer used to write the output.
149 IndentingPrintWriter pw) {
151 pw.println("// Log wrapper class for standard exceptions");
153 pw.printMsg("// Log wrapper class for Sun private system exceptions in group @",
155 pw.println("//");
156 pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
157 pw.printMsg("// Generated from input file @ on @", inFile, new Date());
158 pw.println();
165 * @param pw the {@link IndentingPrintWriter} for writing to the file.
168 IndentingPrintWriter pw) {
172 pw.println("import org.omg.CORBA." + e.getName() + " ;");
180 * @param pw the {@link IndentingPrintWriter} for writing to the file.
183 IndentingPrintWriter pw) {
184 pw.indent();
185 pw.println( "private static LogWrapperFactory factory = new LogWrapperFactory() {");
186 pw.println( "public LogWrapperBase create( Logger logger )" );
187 pw.indent();
188 pw.println( "{");
189 pw.undent();
190 pw.printMsg("return new @( logger ) ;", className);
191 pw.undent();
192 pw.println( "}" );
193 pw.println( "} ;" );
194 pw.println();
195 pw.printMsg("public static @ get( ORB orb, String logDomain )", className);
196 pw.indent();
197 pw.println( "{");
198 pw.indent();
199 pw.printMsg( "@ wrapper = ", className);
200 pw.indent();
201 pw.printMsg( "(@) orb.getLogWrapper( logDomain, ", className);
202 pw.undent();
203 pw.undent();
204 pw.printMsg( "\"@\", factory ) ;", groupName);
205 pw.undent();
206 pw.println( "return wrapper ;" );
207 pw.println( "} " );
208 pw.println();
209 pw.printMsg( "public static @ get( String logDomain )", className);
210 pw.indent();
211 pw.println( "{");
212 pw.indent();
213 pw.printMsg( "@ wrapper = ", className);
214 pw.indent();
215 pw.printMsg( "(@) ORB.staticGetLogWrapper( logDomain, ", className);
216 pw.undent();
217 pw.undent();
218 pw.printMsg( "\"@\", factory ) ;", groupName);
219 pw.undent();
220 pw.println( "return wrapper ;" );
221 pw.println( "} " );
222 pw.println();
231 * @param pw the {@link IndentingPrintWriter} for writing to the file.
234 String className, IndentingPrintWriter pw) {
236 pw.println("///////////////////////////////////////////////////////////");
237 pw.printMsg("// @", e.getName());
238 pw.println("///////////////////////////////////////////////////////////");
239 pw.println();
242 c.getLogLevel(), className, StringUtil.countArgs(c.getMessage()), pw);
243 pw.flush();
258 * @param pw the print writer for writing to the file.
262 IndentingPrintWriter pw) {
264 pw.printMsg("public static final int @ = @ ;", errorName, getBase(groupName, code));
265 pw.println();
266 pw.flush();
268 numParams, className, pw);
269 pw.println();
270 pw.flush();
271 writeMethodStatus(exceptionName, ident, numParams, pw);
272 pw.println();
273 pw.flush();
274 writeMethodCause(exceptionName, ident, numParams, pw);
275 pw.println();
276 pw.flush();
277 writeMethodNoArgs(exceptionName, ident, numParams, pw);
278 pw.println();
279 pw.flush();
293 * @param pw the print writer for writing to the file.
298 String className, IndentingPrintWriter pw) {
299 pw.indent();
300 pw.printMsg( "public @ @( CompletionStatus cs, Throwable t@) {", exceptionName,
302 pw.printMsg( "@ exc = new @( @, cs ) ;", exceptionName, exceptionName, errorName);
303 pw.indent();
304 pw.println( "if (t != null)" );
305 pw.undent();
306 pw.println( "exc.initCause( t ) ;" );
307 pw.println();
308 pw.indent();
309 pw.printMsg( "if (logger.isLoggable( Level.@ )) {", logLevel);
311 pw.printMsg( "Object[] parameters = new Object[@] ;", numParams);
313 pw.printMsg("parameters[@] = arg@ ;", a, a);
315 pw.println( "Object[] parameters = null ;");
316 pw.indent();
317 pw.printMsg( "doLog( Level.@, \"@.@\",", logLevel, groupName, ident);
318 pw.undent();
319 pw.undent();
320 pw.printMsg( "parameters, @.class, exc ) ;", className);
321 pw.println( "}");
322 pw.println();
324 pw.undent();
325 pw.println( "return exc ;");
326 pw.println( "}");
336 * @param pw the print writer for writing to the file.
339 int numParams, IndentingPrintWriter pw) {
340 pw.indent();
341 pw.printMsg("public @ @( CompletionStatus cs@) {", exceptionName,
343 pw.undent();
344 pw.printMsg("return @( cs, null@ ) ;", ident, makeCallArgs(true, numParams));
345 pw.println("}");
354 * @param pw the print writer for writing to the file.
357 int numParams, IndentingPrintWriter pw) {
358 pw.indent();
359 pw.printMsg("public @ @( Throwable t@) {", exceptionName, ident,
361 pw.undent();
362 pw.printMsg("return @( CompletionStatus.COMPLETED_NO, t@ ) ;", ident,
364 pw.println("}");
373 * @param pw the print writer for writing to the file.
376 int numParams, IndentingPrintWriter pw) {
378 pw.indent();
379 pw.printMsg("public @ @( @) {", exceptionName, ident,
381 pw.undent();
382 pw.printMsg("return @( CompletionStatus.COMPLETED_NO, null@ ) ;",
384 pw.println("}");
467 IndentingPrintWriter pw = new IndentingPrintWriter(file);
473 pw.printMsg("@.@=\"@: (@) @\"", groupName, ident,
476 pw.flush();
478 pw.close();