aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/JavacAST.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac/JavacAST.java')
-rw-r--r--src/core/lombok/javac/JavacAST.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/lombok/javac/JavacAST.java b/src/core/lombok/javac/JavacAST.java
index 31bdc3a6..5064f852 100644
--- a/src/core/lombok/javac/JavacAST.java
+++ b/src/core/lombok/javac/JavacAST.java
@@ -22,6 +22,7 @@
package lombok.javac;
import java.lang.reflect.Field;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -88,7 +89,16 @@ public class JavacAST extends AST<JavacAST, JavacNode, JCTree> {
this.javacTypes = JavacTypes.instance(context);
clearChanged();
}
-
+
+ @Override public URI getAbsoluteFileLocation() {
+ try {
+ JCCompilationUnit cu = (JCCompilationUnit) top().get();
+ return cu.sourcefile.toUri();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
private static String sourceName(JCCompilationUnit cu) {
return cu.sourcefile == null ? null : cu.sourcefile.toString();
}