aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleGetter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleGetter.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleGetter.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java
index 24121021..6b055193 100644
--- a/src/core/lombok/javac/handlers/HandleGetter.java
+++ b/src/core/lombok/javac/handlers/HandleGetter.java
@@ -159,13 +159,13 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
}
}
- private void createGetterForFields(AccessLevel level, Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists, boolean lazy, List<JCAnnotation> onMethod) {
+ public void createGetterForFields(AccessLevel level, Collection<JavacNode> fieldNodes, JavacNode errorNode, boolean whineIfExists, boolean lazy, List<JCAnnotation> onMethod) {
for (JavacNode fieldNode : fieldNodes) {
createGetterForField(level, fieldNode, errorNode, whineIfExists, lazy, onMethod);
}
}
- private void createGetterForField(AccessLevel level,
+ public void createGetterForField(AccessLevel level,
JavacNode fieldNode, JavacNode source, boolean whineIfExists, boolean lazy, List<JCAnnotation> onMethod) {
if (fieldNode.getKind() != Kind.FIELD) {
source.addError("@Getter is only supported on a class or a field.");
@@ -215,7 +215,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
injectMethod(fieldNode.up(), createGetter(access, fieldNode, fieldNode.getTreeMaker(), source.get(), lazy, onMethod));
}
- private JCMethodDecl createGetter(long access, JavacNode field, JavacTreeMaker treeMaker, JCTree source, boolean lazy, List<JCAnnotation> onMethod) {
+ public JCMethodDecl createGetter(long access, JavacNode field, JavacTreeMaker treeMaker, JCTree source, boolean lazy, List<JCAnnotation> onMethod) {
JCVariableDecl fieldNode = (JCVariableDecl) field.get();
// Remember the type; lazy will change it
@@ -259,7 +259,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
return decl;
}
- private static List<JCAnnotation> findDelegatesAndRemoveFromField(JavacNode field) {
+ public static List<JCAnnotation> findDelegatesAndRemoveFromField(JavacNode field) {
JCVariableDecl fieldNode = (JCVariableDecl) field.get();
List<JCAnnotation> delegates = List.nil();
@@ -282,14 +282,14 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
return delegates;
}
- private List<JCStatement> createSimpleGetterBody(JavacTreeMaker treeMaker, JavacNode field) {
+ public List<JCStatement> createSimpleGetterBody(JavacTreeMaker treeMaker, JavacNode field) {
return List.<JCStatement>of(treeMaker.Return(createFieldAccessor(treeMaker, field, FieldAccess.ALWAYS_FIELD)));
}
private static final String AR = "java.util.concurrent.atomic.AtomicReference";
private static final List<JCExpression> NIL_EXPRESSION = List.nil();
- private static final java.util.Map<TypeTag, String> TYPE_MAP;
+ public static final java.util.Map<TypeTag, String> TYPE_MAP;
static {
Map<TypeTag, String> m = new HashMap<TypeTag, String>();
m.put(CTC_INT, "Integer");
@@ -303,7 +303,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
TYPE_MAP = Collections.unmodifiableMap(m);
}
- private List<JCStatement> createLazyGetterBody(JavacTreeMaker maker, JavacNode fieldNode, JCTree source) {
+ public List<JCStatement> createLazyGetterBody(JavacTreeMaker maker, JavacNode fieldNode, JCTree source) {
/*
java.lang.Object value = this.fieldName.get();
if (value == null) {
@@ -423,17 +423,17 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
return statements.toList();
}
- private JCMethodInvocation callGet(JavacNode source, JCExpression receiver) {
+ public JCMethodInvocation callGet(JavacNode source, JCExpression receiver) {
JavacTreeMaker maker = source.getTreeMaker();
return maker.Apply(NIL_EXPRESSION, maker.Select(receiver, source.toName("get")), NIL_EXPRESSION);
}
- private JCStatement callSet(JavacNode source, JCExpression receiver, JCExpression value) {
+ public JCStatement callSet(JavacNode source, JCExpression receiver, JCExpression value) {
JavacTreeMaker maker = source.getTreeMaker();
return maker.Exec(maker.Apply(NIL_EXPRESSION, maker.Select(receiver, source.toName("set")), List.<JCExpression>of(value)));
}
- private JCExpression copyType(JavacTreeMaker treeMaker, JCVariableDecl fieldNode) {
+ public JCExpression copyType(JavacTreeMaker treeMaker, JCVariableDecl fieldNode) {
return fieldNode.type != null ? treeMaker.Type(fieldNode.type) : fieldNode.vartype;
}
}