diff options
author | Roel Spilker <r.spilker@gmail.com> | 2020-06-19 00:47:00 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-06-19 00:48:56 +0200 |
commit | ed8ea0d8043cb8df6ae3fb962ab3a2087f4adeb6 (patch) | |
tree | 64f716ceb6de12c77a9d48494feac48f8759934f /src/core/lombok/javac | |
parent | 39d2c280fbaced63f5697481af6b37ab81891798 (diff) | |
download | lombok-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.java | 13 |
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(); |