aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2020-06-19 00:47:00 +0200
committerRoel Spilker <r.spilker@gmail.com>2020-06-19 00:48:56 +0200
commited8ea0d8043cb8df6ae3fb962ab3a2087f4adeb6 (patch)
tree64f716ceb6de12c77a9d48494feac48f8759934f /src/core/lombok/javac
parent39d2c280fbaced63f5697481af6b37ab81891798 (diff)
downloadlombok-ed8ea0d8043cb8df6ae3fb962ab3a2087f4adeb6.tar.gz
lombok-ed8ea0d8043cb8df6ae3fb962ab3a2087f4adeb6.tar.bz2
lombok-ed8ea0d8043cb8df6ae3fb962ab3a2087f4adeb6.zip
#1543: First primitives, then primitive wrappers, then other references
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/JavacNode.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/lombok/javac/JavacNode.java b/src/core/lombok/javac/JavacNode.java
index 08d22d98..3de3f38b 100644
--- a/src/core/lombok/javac/JavacNode.java
+++ b/src/core/lombok/javac/JavacNode.java
@@ -355,6 +355,19 @@ public class JavacNode extends lombok.core.LombokNode<JavacAST, JavacNode, JCTre
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override public String fieldOrMethodBaseType() {
+ if (node instanceof JCVariableDecl && !isEnumMember()) {
+ return (((JCVariableDecl) node).vartype).toString();
+ }
+ if (node instanceof JCMethodDecl) {
+ return (((JCMethodDecl) node).restype).toString();
+ }
+ return null;
+ }
+
@Override public boolean isTransient() {
if (getKind() != Kind.FIELD) return false;
JCModifiers mods = getModifiers();