diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-09-30 21:42:41 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2010-09-30 21:42:41 +0200 |
commit | c10b91309ecb6fe4b38e0097cd93cc124c78436c (patch) | |
tree | ebd6a85149f7224a27a7a5117a9a94c9e05e868b | |
parent | bcdd5226cec974df0518415d1ca4d21aef79a239 (diff) | |
download | lombok-c10b91309ecb6fe4b38e0097cd93cc124c78436c.tar.gz lombok-c10b91309ecb6fe4b38e0097cd93cc124c78436c.tar.bz2 lombok-c10b91309ecb6fe4b38e0097cd93cc124c78436c.zip |
trivial: javadoc fixes, renamed 'className' to 'fileName'for postprocessor
-rw-r--r-- | src/core/lombok/Lombok.java | 2 | ||||
-rw-r--r-- | src/core/lombok/core/PostCompiler.java | 12 | ||||
-rw-r--r-- | src/core/lombok/core/PostCompilerTransformation.java | 2 | ||||
-rw-r--r-- | src/core/lombok/core/handlers/TransformationsUtil.java | 2 | ||||
-rw-r--r-- | src/core/lombok/javac/apt/InterceptingJavaFileObject.java | 8 | ||||
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/core/lombok/Lombok.java b/src/core/lombok/Lombok.java index 71684f4f..db94f05c 100644 --- a/src/core/lombok/Lombok.java +++ b/src/core/lombok/Lombok.java @@ -39,7 +39,7 @@ public class Lombok { * about the concept of a 'checked exception'. All this method does is hide the act of throwing a checked exception * from the java compiler. * <p> - * Note that this method has a return type of {@code RuntimeException} it is advised you always call this + * Note that this method has a return type of {@code RuntimeException}; it is advised you always call this * method as argument to the {@code throw} statement to avoid compiler errors regarding no return * statement and similar problems. This method won't of course return an actual {@code RuntimeException} - * it never returns, it always throws the provided exception. diff --git a/src/core/lombok/core/PostCompiler.java b/src/core/lombok/core/PostCompiler.java index 52568286..0bf92010 100644 --- a/src/core/lombok/core/PostCompiler.java +++ b/src/core/lombok/core/PostCompiler.java @@ -32,17 +32,17 @@ public final class PostCompiler { private static List<PostCompilerTransformation> transformations; - public static byte[] applyTransformations(byte[] original, String className, DiagnosticsReceiver diagnostics) { + public static byte[] applyTransformations(byte[] original, String fileName, DiagnosticsReceiver diagnostics) { init(diagnostics); byte[] previous = original; for (PostCompilerTransformation transformation : transformations) { try { - byte[] next = transformation.applyTransformations(previous, className, diagnostics); + byte[] next = transformation.applyTransformations(previous, fileName, diagnostics); if (next != null) { previous = next; } } catch (Exception e) { - diagnostics.addWarning(String.format("Error during the transformation of '%s'; post-compiler '%s' caused an exception: %s", className, transformation.getClass().getName(), e.getMessage())); + diagnostics.addWarning(String.format("Error during the transformation of '%s'; post-compiler '%s' caused an exception: %s", fileName, transformation.getClass().getName(), e.getMessage())); } } return previous; @@ -58,16 +58,16 @@ public final class PostCompiler { } } - public static OutputStream wrapOutputStream(final OutputStream originalStream, final String className, final DiagnosticsReceiver diagnostics) throws IOException { + public static OutputStream wrapOutputStream(final OutputStream originalStream, final String fileName, final DiagnosticsReceiver diagnostics) throws IOException { return new ByteArrayOutputStream() { @Override public void close() throws IOException { // no need to call super byte[] original = toByteArray(); byte[] copy = null; try { - copy = applyTransformations(original, className, diagnostics); + copy = applyTransformations(original, fileName, diagnostics); } catch (Exception e) { - diagnostics.addWarning(String.format("Error during the transformation of '%s'; no post-compilation has been applied", className)); + diagnostics.addWarning(String.format("Error during the transformation of '%s'; no post-compilation has been applied", fileName)); } if (copy == null) { diff --git a/src/core/lombok/core/PostCompilerTransformation.java b/src/core/lombok/core/PostCompilerTransformation.java index e0770f53..ccb0c0c7 100644 --- a/src/core/lombok/core/PostCompilerTransformation.java +++ b/src/core/lombok/core/PostCompilerTransformation.java @@ -22,5 +22,5 @@ package lombok.core; public interface PostCompilerTransformation { - byte[] applyTransformations(byte[] original, String className, DiagnosticsReceiver diagnostics); + byte[] applyTransformations(byte[] original, String fileName, DiagnosticsReceiver diagnostics); } diff --git a/src/core/lombok/core/handlers/TransformationsUtil.java b/src/core/lombok/core/handlers/TransformationsUtil.java index 140dfd2a..7f6faf99 100644 --- a/src/core/lombok/core/handlers/TransformationsUtil.java +++ b/src/core/lombok/core/handlers/TransformationsUtil.java @@ -129,7 +129,7 @@ public class TransformationsUtil { //could also be 'foo'. baseNames.add(fieldName.toString().substring(knownBooleanPrefix.length())); //prefix with 'is' but instead just use the field name as is. The isLowerCase check is so we don't turn - //hashCodeGenerated, which so happens to start with 'has', into hasHCodeGenerated instead of isHashCodeGenerated. + //hashCodeGenerated, which so happens to start with 'has', into hashCodeGenerated instead of isHashCodeGenerated. } } diff --git a/src/core/lombok/javac/apt/InterceptingJavaFileObject.java b/src/core/lombok/javac/apt/InterceptingJavaFileObject.java index c0d3565c..f59315cc 100644 --- a/src/core/lombok/javac/apt/InterceptingJavaFileObject.java +++ b/src/core/lombok/javac/apt/InterceptingJavaFileObject.java @@ -37,17 +37,17 @@ import lombok.core.PostCompiler; final class InterceptingJavaFileObject implements JavaFileObject { private final JavaFileObject delegate; - private final String className; + private final String fileName; private final DiagnosticsReceiver diagnostics; - public InterceptingJavaFileObject(JavaFileObject original, String className, DiagnosticsReceiver diagnostics) { + public InterceptingJavaFileObject(JavaFileObject original, String fileName, DiagnosticsReceiver diagnostics) { this.delegate = original; - this.className = className; + this.fileName = fileName; this.diagnostics = diagnostics; } public OutputStream openOutputStream() throws IOException { - return PostCompiler.wrapOutputStream(delegate.openOutputStream(), className, diagnostics); + return PostCompiler.wrapOutputStream(delegate.openOutputStream(), fileName, diagnostics); } public Writer openWriter() throws IOException { diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index b9bfe22b..daf1cbf2 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -114,8 +114,8 @@ public class PatchFixes { return newSimpleNames; } - public static byte[] runPostCompiler(byte[] bytes, String className) { - byte[] transformed = PostCompiler.applyTransformations(bytes, className, DiagnosticsReceiver.CONSOLE); + public static byte[] runPostCompiler(byte[] bytes, String fileName) { + byte[] transformed = PostCompiler.applyTransformations(bytes, fileName, DiagnosticsReceiver.CONSOLE); return transformed == null ? bytes : transformed; } |