aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/bytecode/package-info.java30
-rw-r--r--src/core/lombok/core/debug/DebugSnapshot.java22
-rw-r--r--src/core/lombok/core/debug/DebugSnapshotStore.java22
-rw-r--r--src/core/lombok/core/debug/package-info.java31
-rw-r--r--src/core/lombok/core/handlers/package-info.java30
-rw-r--r--src/core/lombok/core/package-info.java3
-rw-r--r--src/core/lombok/core/runtimeDependencies/package-info.java34
-rw-r--r--src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java8
-rw-r--r--src/core/lombok/eclipse/handlers/HandleBuilder.java14
-rw-r--r--src/core/lombok/eclipse/handlers/HandleCleanup.java6
-rw-r--r--src/core/lombok/eclipse/handlers/HandleConstructor.java10
-rw-r--r--src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java26
-rw-r--r--src/core/lombok/eclipse/handlers/HandleGetter.java16
-rw-r--r--src/core/lombok/eclipse/handlers/HandleLog.java8
-rw-r--r--src/core/lombok/eclipse/handlers/HandleNonNull.java6
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSetter.java6
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSneakyThrows.java6
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSynchronized.java4
-rw-r--r--src/core/lombok/eclipse/handlers/HandleToString.java12
-rw-r--r--src/core/lombok/eclipse/handlers/HandleWither.java6
-rw-r--r--src/core/lombok/eclipse/handlers/SetGeneratedByVisitor.java21
-rw-r--r--src/core/lombok/eclipse/handlers/package-info.java5
-rw-r--r--src/core/lombok/eclipse/package-info.java5
-rw-r--r--src/core/lombok/experimental/package-info.java33
-rw-r--r--src/core/lombok/javac/apt/package-info.java3
-rw-r--r--src/core/lombok/javac/handlers/HandleBuilder.java14
-rw-r--r--src/core/lombok/javac/handlers/HandleCleanup.java8
-rw-r--r--src/core/lombok/javac/handlers/HandleConstructor.java16
-rw-r--r--src/core/lombok/javac/handlers/HandleDelegate.java22
-rw-r--r--src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java20
-rw-r--r--src/core/lombok/javac/handlers/HandleExtensionMethod.java8
-rw-r--r--src/core/lombok/javac/handlers/HandleGetter.java20
-rw-r--r--src/core/lombok/javac/handlers/HandleLog.java6
-rw-r--r--src/core/lombok/javac/handlers/HandleNonNull.java6
-rw-r--r--src/core/lombok/javac/handlers/HandleSetter.java10
-rw-r--r--src/core/lombok/javac/handlers/HandleSneakyThrows.java10
-rw-r--r--src/core/lombok/javac/handlers/HandleToString.java6
-rw-r--r--src/core/lombok/javac/handlers/HandleWither.java8
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java12
-rw-r--r--src/core/lombok/javac/handlers/package-info.java5
-rw-r--r--src/core/lombok/javac/package-info.java7
-rw-r--r--src/core/lombok/package-info.java11
42 files changed, 402 insertions, 154 deletions
diff --git a/src/core/lombok/bytecode/package-info.java b/src/core/lombok/bytecode/package-info.java
new file mode 100644
index 00000000..9187c940
--- /dev/null
+++ b/src/core/lombok/bytecode/package-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009-2014 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * This package contains utilities and handlers for the 'post-process class files' aspect of
+ * lombok. Lombok's class file post processing capabilities are based on Objectweb's ASM library.
+ *
+ * <strong>NB: This package is not public API in the sense that contents of this package,
+ * even public classes / methods / etc, may change in point releases.</strong>
+ */
+package lombok.bytecode;
diff --git a/src/core/lombok/core/debug/DebugSnapshot.java b/src/core/lombok/core/debug/DebugSnapshot.java
index 42bb62fe..3f554335 100644
--- a/src/core/lombok/core/debug/DebugSnapshot.java
+++ b/src/core/lombok/core/debug/DebugSnapshot.java
@@ -1,3 +1,25 @@
+/*
+ * Copyright (C) 2012-2014 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
package lombok.core.debug;
import java.lang.ref.WeakReference;
diff --git a/src/core/lombok/core/debug/DebugSnapshotStore.java b/src/core/lombok/core/debug/DebugSnapshotStore.java
index 11192bd3..19f4d5b1 100644
--- a/src/core/lombok/core/debug/DebugSnapshotStore.java
+++ b/src/core/lombok/core/debug/DebugSnapshotStore.java
@@ -1,3 +1,25 @@
+/*
+ * Copyright (C) 2012-2014 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
package lombok.core.debug;
import java.io.File;
diff --git a/src/core/lombok/core/debug/package-info.java b/src/core/lombok/core/debug/package-info.java
new file mode 100644
index 00000000..10d09c0d
--- /dev/null
+++ b/src/core/lombok/core/debug/package-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012-2014 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * This package contains tooling used only to debug issues that cannot be found with research but
+ * which require releasing a production or edge release with extra introspective facilities in
+ * an attempt to add clarity to the exceptions or other messages that result when the bug occurs.
+ *
+ * <strong>NB: This package is not public API in the sense that contents of this package,
+ * even public classes / methods / etc, may change in point releases.</strong>
+ */
+package lombok.core.debug; \ No newline at end of file
diff --git a/src/core/lombok/core/handlers/package-info.java b/src/core/lombok/core/handlers/package-info.java
new file mode 100644
index 00000000..6496bdb4
--- /dev/null
+++ b/src/core/lombok/core/handlers/package-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009-2014 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * This package contains utility methods and classes shared between javac-specific feature implementations
+ * and eclipse-specific feature implementations.
+ *
+ * <strong>NB: This package is not public API in the sense that contents of this package,
+ * even public classes / methods / etc, may change in point releases.</strong>
+ */
+package lombok.core.handlers;
diff --git a/src/core/lombok/core/package-info.java b/src/core/lombok/core/package-info.java
index 153d5ff3..97b5156e 100644
--- a/src/core/lombok/core/package-info.java
+++ b/src/core/lombok/core/package-info.java
@@ -26,5 +26,8 @@
* an implementation of SPI service loader (to avoid being dependent on a v1.6 JVM),
* lombok's version, and annotations and support classes for your normal java code
* that's primarily useful for developing and debugging lombok.
+ *
+ * <strong>NB: This package is not public API in the sense that contents of this package,
+ * even public classes / methods / etc, may change in point releases.</strong>
*/
package lombok.core;
diff --git a/src/core/lombok/core/runtimeDependencies/package-info.java b/src/core/lombok/core/runtimeDependencies/package-info.java
new file mode 100644
index 00000000..daceeb11
--- /dev/null
+++ b/src/core/lombok/core/runtimeDependencies/package-info.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2009-2014 The Project Lombok Authors.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * This package is the basis for lombok's (the jar, run as an application) ability to spin off
+ * a clone of itself that only contains files required as a runtime dependency.
+ *
+ * This feature was used for a short while to support {@code @SneakyThrows}, but this is no longer
+ * necessary. Currently no lombok features have any such dependencies though at some point we may
+ * reintroduce the concept, for example to support properties.
+ *
+ * It is possible we'll use a different mechanism at that point; use the infrastructure in this package
+ * with knowledge that it may be eliminated at any time.
+ */
+package lombok.core.runtimeDependencies;
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
index 467ae0c3..a40cb0c8 100644
--- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
+++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2013 The Project Lombok Authors.
+ * Copyright (C) 2009-2014 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -1320,7 +1320,7 @@ public class EclipseHandlerUtil {
return type.add(field, Kind.FIELD);
}
- private static boolean isEnumConstant(final FieldDeclaration field) {
+ public static boolean isEnumConstant(final FieldDeclaration field) {
return ((field.initialization instanceof AllocationExpression) && (((AllocationExpression) field.initialization).enumConstant == field));
}
@@ -1612,7 +1612,7 @@ public class EclipseHandlerUtil {
return true;
}
- static List<Annotation> unboxAndRemoveAnnotationParameter(Annotation annotation, String annotationName, String errorName, EclipseNode errorNode) {
+ public static List<Annotation> unboxAndRemoveAnnotationParameter(Annotation annotation, String annotationName, String errorName, EclipseNode errorNode) {
if ("value".equals(annotationName)) {
// We can't unbox this, because SingleMemberAnnotation REQUIRES a value, and this method
// is supposed to remove the value. That means we need to replace the SMA with either
@@ -1704,7 +1704,7 @@ public class EclipseHandlerUtil {
return Collections.emptyList();
}
- static NameReference createNameReference(String name, Annotation source) {
+ public static NameReference createNameReference(String name, Annotation source) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java
index 981d77dc..ea282b3b 100644
--- a/src/core/lombok/eclipse/handlers/HandleBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 The Project Lombok Authors.
+ * Copyright (C) 2013-2014 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -228,7 +228,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
}
}
- private MethodDeclaration generateBuilderMethod(String builderMethodName, String builderClassName, EclipseNode type, TypeParameter[] typeParams, ASTNode source) {
+ public MethodDeclaration generateBuilderMethod(String builderMethodName, String builderClassName, EclipseNode type, TypeParameter[] typeParams, ASTNode source) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long) pS << 32 | pE;
@@ -247,7 +247,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
return out;
}
- private MethodDeclaration generateBuildMethod(String name, char[] staticName, TypeReference returnType, List<char[]> fieldNames, EclipseNode type, ASTNode source, TypeReference[] thrownExceptions) {
+ public MethodDeclaration generateBuildMethod(String name, char[] staticName, TypeReference returnType, List<char[]> fieldNames, EclipseNode type, ASTNode source, TypeReference[] thrownExceptions) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long) pS << 32 | pE;
@@ -300,7 +300,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
return out;
}
- private List<EclipseNode> addFieldsToBuilder(EclipseNode builderType, List<char[]> namesOfParameters, List<TypeReference> typesOfParameters, ASTNode source) {
+ public List<EclipseNode> addFieldsToBuilder(EclipseNode builderType, List<char[]> namesOfParameters, List<TypeReference> typesOfParameters, ASTNode source) {
int len = namesOfParameters.size();
TypeDeclaration td = (TypeDeclaration) builderType.get();
FieldDeclaration[] existing = td.fields;
@@ -332,7 +332,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
private static final AbstractMethodDeclaration[] EMPTY = {};
- private MethodDeclaration makeSetterMethodForBuilder(EclipseNode builderType, EclipseNode fieldNode, ASTNode source, boolean fluent, boolean chain) {
+ public MethodDeclaration makeSetterMethodForBuilder(EclipseNode builderType, EclipseNode fieldNode, ASTNode source, boolean fluent, boolean chain) {
TypeDeclaration td = (TypeDeclaration) builderType.get();
AbstractMethodDeclaration[] existing = td.methods;
if (existing == null) existing = EMPTY;
@@ -353,7 +353,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
source, Collections.<Annotation>emptyList(), Collections.<Annotation>emptyList());
}
- private EclipseNode findInnerClass(EclipseNode parent, String name) {
+ public EclipseNode findInnerClass(EclipseNode parent, String name) {
char[] c = name.toCharArray();
for (EclipseNode child : parent.down()) {
if (child.getKind() != Kind.TYPE) continue;
@@ -363,7 +363,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
return null;
}
- private EclipseNode makeBuilderClass(EclipseNode tdParent, String builderClassName, TypeParameter[] typeParams, ASTNode source) {
+ public EclipseNode makeBuilderClass(EclipseNode tdParent, String builderClassName, TypeParameter[] typeParams, ASTNode source) {
TypeDeclaration parent = (TypeDeclaration) tdParent.get();
TypeDeclaration builder = new TypeDeclaration(parent.compilationResult);
builder.bits |= Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG;
diff --git a/src/core/lombok/eclipse/handlers/HandleCleanup.java b/src/core/lombok/eclipse/handlers/HandleCleanup.java
index cbf84e8b..b8ea1669 100644
--- a/src/core/lombok/eclipse/handlers/HandleCleanup.java
+++ b/src/core/lombok/eclipse/handlers/HandleCleanup.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2011 The Project Lombok Authors.
+ * Copyright (C) 2009-2014 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -225,7 +225,7 @@ public class HandleCleanup extends EclipseAnnotationHandler<Cleanup> {
ancestor.rebuild();
}
- private MessageSend preventNullAnalysis(Annotation ast, Expression expr) {
+ public MessageSend preventNullAnalysis(Annotation ast, Expression expr) {
MessageSend singletonList = new MessageSend();
setGeneratedBy(singletonList, ast);
@@ -254,7 +254,7 @@ public class HandleCleanup extends EclipseAnnotationHandler<Cleanup> {
return preventNullAnalysis;
}
- private void doAssignmentCheck(EclipseNode node, Statement[] tryBlock, char[] varName) {
+ public void doAssignmentCheck(EclipseNode node, Statement[] tryBlock, char[] varName) {
for (Statement statement : tryBlock) doAssignmentCheck0(node, statement, varName);
}
diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java
index 22285b2d..d86aadee 100644
--- a/src/core/lombok/eclipse/handlers/HandleConstructor.java
+++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2013 The Project Lombok Authors.
+ * Copyright (C) 2010-2014 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -211,7 +211,7 @@ public class HandleConstructor {
}
private static final char[][] JAVA_BEANS_CONSTRUCTORPROPERTIES = new char[][] { "java".toCharArray(), "beans".toCharArray(), "ConstructorProperties".toCharArray() };
- private static Annotation[] createConstructorProperties(ASTNode source, Collection<EclipseNode> fields) {
+ public static Annotation[] createConstructorProperties(ASTNode source, Collection<EclipseNode> fields) {
if (fields.isEmpty()) return null;
int pS = source.sourceStart, pE = source.sourceEnd;
@@ -242,7 +242,7 @@ public class HandleConstructor {
return new Annotation[] { ann };
}
- static ConstructorDeclaration createConstructor(
+ public static ConstructorDeclaration createConstructor(
AccessLevel level, EclipseNode type, Collection<EclipseNode> fields,
boolean suppressConstructorProperties, ASTNode source, List<Annotation> onConstructor) {
@@ -316,14 +316,14 @@ public class HandleConstructor {
return constructor;
}
- private static boolean isLocalType(EclipseNode type) {
+ public static boolean isLocalType(EclipseNode type) {
Kind kind = type.up().getKind();
if (kind == Kind.COMPILATION_UNIT) return false;
if (kind == Kind.TYPE) return isLocalType(type.up());
return true;
}
- private MethodDeclaration createStaticConstructor(AccessLevel level, String name, EclipseNode type, Collection<EclipseNode> fields, ASTNode source) {
+ public MethodDeclaration createStaticConstructor(AccessLevel level, String name, EclipseNode type, Collection<EclipseNode> fields, ASTNode source) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
index 0b054159..8d95ca64 100644
--- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
+++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2013 The Project Lombok Authors.
+ * Copyright (C) 2009-2014 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -92,10 +92,10 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
private final char[] PRIME = "PRIME".toCharArray();
private final char[] RESULT = "result".toCharArray();
- private static final Set<String> BUILT_IN_TYPES = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
+ public static final Set<String> BUILT_IN_TYPES = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
"byte", "short", "int", "long", "char", "boolean", "double", "float")));
- private void checkForBogusFieldNames(EclipseNode type, AnnotationValues<EqualsAndHashCode> annotation) {
+ public void checkForBogusFieldNames(EclipseNode type, AnnotationValues<EqualsAndHashCode> annotation) {
if (annotation.isExplicit("exclude")) {
for (int i : createListOfNonExistentFields(Arrays.asList(annotation.getInstance().exclude()), type, true, true)) {
annotation.setWarning("exclude", "This field does not exist, or would have been excluded anyway.", i);
@@ -248,7 +248,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
injectMethod(typeNode, hashCodeMethod);
}
- private MethodDeclaration createHashCode(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, FieldAccess fieldAccess) {
+ public MethodDeclaration createHashCode(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, FieldAccess fieldAccess) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
@@ -403,7 +403,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return method;
}
- private LocalDeclaration createLocalDeclaration(ASTNode source, char[] dollarFieldName, TypeReference type, Expression initializer) {
+ public LocalDeclaration createLocalDeclaration(ASTNode source, char[] dollarFieldName, TypeReference type, Expression initializer) {
int pS = source.sourceStart, pE = source.sourceEnd;
LocalDeclaration tempVar = new LocalDeclaration(dollarFieldName, pS, pE);
setGeneratedBy(tempVar, source);
@@ -415,7 +415,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return tempVar;
}
- private Expression createResultCalculation(ASTNode source, Expression ex) {
+ public Expression createResultCalculation(ASTNode source, Expression ex) {
/* result = result * PRIME + (ex); */
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
@@ -437,7 +437,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return assignment;
}
- private TypeReference createTypeReference(EclipseNode type, long p) {
+ public TypeReference createTypeReference(EclipseNode type, long p) {
List<String> list = new ArrayList<String>();
list.add(type.getName());
EclipseNode tNode = type.up();
@@ -458,7 +458,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return new QualifiedTypeReference(tokens, ps);
}
- private MethodDeclaration createEquals(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, FieldAccess fieldAccess, boolean needsCanEqual) {
+ public MethodDeclaration createEquals(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, FieldAccess fieldAccess, boolean needsCanEqual) {
int pS = source.sourceStart; int pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
TypeDeclaration typeDecl = (TypeDeclaration)type.get();
@@ -718,7 +718,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
}
- private MethodDeclaration createCanEqual(EclipseNode type, ASTNode source) {
+ public MethodDeclaration createCanEqual(EclipseNode type, ASTNode source) {
/* public boolean canEqual(final java.lang.Object other) {
* return other instanceof Outer.Inner.MyType;
* }
@@ -765,7 +765,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
}
- private IfStatement generateCompareFloatOrDouble(Expression thisRef, Expression otherRef, char[] floatOrDouble, ASTNode source) {
+ public IfStatement generateCompareFloatOrDouble(Expression thisRef, Expression otherRef, char[] floatOrDouble, ASTNode source) {
int pS = source.sourceStart, pE = source.sourceEnd;
/* if (Float.compare(fieldName, other.fieldName) != 0) return false */
MessageSend floatCompare = new MessageSend();
@@ -788,7 +788,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
}
/** Give 2 clones! */
- private Expression longToIntForHashCode(Expression ref1, Expression ref2, ASTNode source) {
+ public Expression longToIntForHashCode(Expression ref1, Expression ref2, ASTNode source) {
int pS = source.sourceStart, pE = source.sourceEnd;
/* (int)(ref >>> 32 ^ ref) */
IntLiteral int32 = makeIntLiteral("32".toCharArray(), source);
@@ -804,7 +804,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return expr;
}
- private NameReference generateQualifiedNameRef(ASTNode source, char[]... varNames) {
+ public NameReference generateQualifiedNameRef(ASTNode source, char[]... varNames) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
@@ -816,7 +816,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return ref;
}
- private TypeReference generateQualifiedTypeRef(ASTNode source, char[]... varNames) {
+ public TypeReference generateQualifiedTypeRef(ASTNode source, char[]... varNames) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java
index 787f6f6c..188dfce2 100644
--- a/src/core/lombok/eclipse/handlers/HandleGetter.java
+++ b/src/core/lombok/ec