diff options
author | Roel Spilker <r.spilker@gmail.com> | 2018-11-06 00:27:02 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2018-11-06 00:37:07 +0100 |
commit | 7e79316a1f28d1eb1ef8569119b97a70387fd6c6 (patch) | |
tree | a4251e266a99984b569f70bbb2e8baee6b55b177 /src/core/lombok/eclipse/EclipseNode.java | |
parent | dc641cc3696e63c46c9693ccdfd296f173afec53 (diff) | |
download | lombok-7e79316a1f28d1eb1ef8569119b97a70387fd6c6.tar.gz lombok-7e79316a1f28d1eb1ef8569119b97a70387fd6c6.tar.bz2 lombok-7e79316a1f28d1eb1ef8569119b97a70387fd6c6.zip |
Improve toString generation for enums. Fixes #1916
Diffstat (limited to 'src/core/lombok/eclipse/EclipseNode.java')
-rw-r--r-- | src/core/lombok/eclipse/EclipseNode.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/EclipseNode.java b/src/core/lombok/eclipse/EclipseNode.java index 1738c770..a0580c51 100644 --- a/src/core/lombok/eclipse/EclipseNode.java +++ b/src/core/lombok/eclipse/EclipseNode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2012 The Project Lombok Authors. + * Copyright (C) 2009-2018 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 @@ -250,6 +250,11 @@ public class EclipseNode extends lombok.core.LombokNode<EclipseAST, EclipseNode, return ((FieldDeclaration) node).getKind() == 3; } + @Override public boolean isEnumType() { + if (getKind() != Kind.TYPE) return false; + return (((TypeDeclaration) node).modifiers & ClassFileConstants.AccEnum) != 0; + } + @Override public int countMethodParameters() { if (getKind() != Kind.METHOD) return 0; |