diff options
author | aclement <aclement> | 2006-08-18 12:38:01 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-08-18 12:38:01 +0000 |
commit | 9b03811333687b7a41baa1b9c9ff84344df86bbc (patch) | |
tree | 8b742fbcf63943597376024650a56174853b6f48 /bridge/src | |
parent | 1619a751e2a4a8a38676d5c96697022bdc798710 (diff) | |
download | aspectj-9b03811333687b7a41baa1b9c9ff84344df86bbc.tar.gz aspectj-9b03811333687b7a41baa1b9c9ff84344df86bbc.zip |
145963: binary entries in the model: various parts to the fix.
Diffstat (limited to 'bridge/src')
-rw-r--r-- | bridge/src/org/aspectj/bridge/ISourceLocation.java | 9 | ||||
-rw-r--r-- | bridge/src/org/aspectj/bridge/SourceLocation.java | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/bridge/src/org/aspectj/bridge/ISourceLocation.java b/bridge/src/org/aspectj/bridge/ISourceLocation.java index e5c745797..502db15a7 100644 --- a/bridge/src/org/aspectj/bridge/ISourceLocation.java +++ b/bridge/src/org/aspectj/bridge/ISourceLocation.java @@ -64,4 +64,13 @@ public interface ISourceLocation { /** @return String application-specific context for source */ String getContext(); + /** + * In the cases where getSourceFile().getName() returns a class file + * (for example when we have a binary aspect) this should return the + * name of the source file (for example BinaryAspect.aj) + * + * @return the name of the source file + */ + String getSourceFileName(); + } diff --git a/bridge/src/org/aspectj/bridge/SourceLocation.java b/bridge/src/org/aspectj/bridge/SourceLocation.java index bc0c47171..e68a45f89 100644 --- a/bridge/src/org/aspectj/bridge/SourceLocation.java +++ b/bridge/src/org/aspectj/bridge/SourceLocation.java @@ -60,6 +60,7 @@ public class SourceLocation implements ISourceLocation, java.io.Serializable { private int offset; private final String context; private boolean noColumn; + private String sourceFileName; /** * Same as SourceLocation(file, line, line, 0), @@ -103,6 +104,11 @@ public class SourceLocation implements ISourceLocation, java.io.Serializable { this.context = context; } + public SourceLocation(File file, int line, int endLine, int column, String context, String sourceFileName) { + this(file,line,endLine,column,context); + this.sourceFileName = sourceFileName; + } + public File getSourceFile() { return sourceFile; } @@ -156,6 +162,10 @@ public class SourceLocation implements ISourceLocation, java.io.Serializable { public int getOffset() { return offset;} public void setOffset(int i) { offset=i;} + public String getSourceFileName() { + return sourceFileName; + } + } |