diff options
Diffstat (limited to 'src/utils/lombok')
-rw-r--r-- | src/utils/lombok/javac/Javac.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/lombok/javac/Javac.java b/src/utils/lombok/javac/Javac.java index 554c778d..bdf5e7a0 100644 --- a/src/utils/lombok/javac/Javac.java +++ b/src/utils/lombok/javac/Javac.java @@ -103,6 +103,20 @@ public class Javac { return 6; } + private static final Class<?> DOCCOMMENTTABLE_CLASS; + + static { + Class<?> c = null; + try { + c = Class.forName("com.sun.tools.javac.tree.DocCommentTable"); + } catch (Throwable ignore) {} + DOCCOMMENTTABLE_CLASS = c; + } + + public static boolean instanceOfDocCommentTable(Object o) { + return DOCCOMMENTTABLE_CLASS != null && DOCCOMMENTTABLE_CLASS.isInstance(o); + } + /** * Checks if the given expression (that really ought to refer to a type * expression) represents a primitive type. |