diff options
Diffstat (limited to 'src/core/lombok/eclipse/EclipseNode.java')
-rw-r--r-- | src/core/lombok/eclipse/EclipseNode.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/EclipseNode.java b/src/core/lombok/eclipse/EclipseNode.java index 9db491f5..5aa29466 100644 --- a/src/core/lombok/eclipse/EclipseNode.java +++ b/src/core/lombok/eclipse/EclipseNode.java @@ -23,10 +23,6 @@ package lombok.eclipse; import java.util.List; -import lombok.core.AnnotationValues; -import lombok.core.AST.Kind; -import lombok.eclipse.handlers.EclipseHandlerUtil; - import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.Annotation; @@ -36,11 +32,16 @@ import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.eclipse.jdt.internal.compiler.ast.Initializer; import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration; +import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.Statement; import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.eclipse.jdt.internal.compiler.ast.TypeReference; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; +import lombok.core.AST.Kind; +import lombok.core.AnnotationValues; +import lombok.eclipse.handlers.EclipseHandlerUtil; + /** * Eclipse specific version of the LombokNode class. */ @@ -264,6 +265,16 @@ public class EclipseNode extends lombok.core.LombokNode<EclipseAST, EclipseNode, return (ClassFileConstants.AccFinal & f) != 0; } + @Override public boolean isPrimitive() { + if (node instanceof FieldDeclaration && !isEnumMember()) { + return Eclipse.isPrimitive(((FieldDeclaration) node).type); + } + if (node instanceof MethodDeclaration) { + return Eclipse.isPrimitive(((MethodDeclaration) node).returnType); + } + return false; + } + @Override public boolean isTransient() { if (getKind() != Kind.FIELD) return false; Integer i = getModifiers(); |