summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/CodeGenUtils.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-12-01 23:24:30 +0100
committerMichael Bien <[email protected]>2009-12-01 23:24:30 +0100
commitb0758ce498793c5e130493d9a03d7632de152855 (patch)
tree2597fa7f1e10dea4ffebff383ec830988460361d /src/java/com/sun/gluegen/CodeGenUtils.java
parent0a5bc7f5a379b52cf5fe6bb9ea22f59fdec1fff0 (diff)
Code cleanup. Ported package com.sun.gluegen to java 5 language level.
Diffstat (limited to 'src/java/com/sun/gluegen/CodeGenUtils.java')
-rw-r--r--src/java/com/sun/gluegen/CodeGenUtils.java31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/java/com/sun/gluegen/CodeGenUtils.java b/src/java/com/sun/gluegen/CodeGenUtils.java
index ab81bec..a558c66 100644
--- a/src/java/com/sun/gluegen/CodeGenUtils.java
+++ b/src/java/com/sun/gluegen/CodeGenUtils.java
@@ -42,8 +42,7 @@ package com.sun.gluegen;
import java.io.*;
import java.util.*;
-public class CodeGenUtils
-{
+public class CodeGenUtils {
/**
* Given a java package name (e.g., "java.lang"), return the package as a
* directory path (i.e., "java/lang").
@@ -60,8 +59,7 @@ public class CodeGenUtils
*/
public static void emitAutogeneratedWarning(PrintWriter w, Object generator) {
w.print("/* !---- DO NOT EDIT: This file autogenerated ");
- if (generator != null)
- {
+ if (generator != null) {
w.print("by ");
w.print(packageAsPath(generator.getClass().getName()));
w.print(".java ");
@@ -75,18 +73,16 @@ public class CodeGenUtils
/**
* Emit the opening headers for one java class/interface file.
*/
- public static void emitJavaHeaders(
- PrintWriter w,
- String packageName,
- String className,
- String gluegenRuntimePackage,
- boolean isClassNotInterface,
- String[] imports,
- String[] accessModifiers,
- String[] interfaces,
- String classExtended,
- EmissionCallback classDocComment) throws IOException
- {
+ public static void emitJavaHeaders( PrintWriter w,
+ String packageName,
+ String className,
+ String gluegenRuntimePackage,
+ boolean isClassNotInterface,
+ String[] imports,
+ String[] accessModifiers,
+ String[] interfaces,
+ String classExtended,
+ EmissionCallback classDocComment) throws IOException {
w.println("package " + packageName + ";");
w.println();
@@ -142,8 +138,7 @@ public class CodeGenUtils
//-----------------------------------------
/** A class that emits source code of some time when activated. */
- public interface EmissionCallback
- {
+ public interface EmissionCallback {
/** Emit appropriate source code through the given writer. */
public void emit(PrintWriter output);
}