summaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2009-04-06 15:34:48 +0000
committeraclement <aclement>2009-04-06 15:34:48 +0000
commit312bc4815dbd270e64b8edc44aeb74acc37f25fe (patch)
treec3e4813d517cef31cb09af9d2f488bea04357e3d /asm
parentd7766b83c0893dec422d99d58af23fb4a72a3a5b (diff)
downloadaspectj-312bc4815dbd270e64b8edc44aeb74acc37f25fe.tar.gz
aspectj-312bc4815dbd270e64b8edc44aeb74acc37f25fe.zip
pullup
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/IHierarchy.java9
-rw-r--r--asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java2
2 files changed, 10 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/IHierarchy.java b/asm/src/org/aspectj/asm/IHierarchy.java
index d4351d17b..50d4a5fc1 100644
--- a/asm/src/org/aspectj/asm/IHierarchy.java
+++ b/asm/src/org/aspectj/asm/IHierarchy.java
@@ -112,4 +112,13 @@ public interface IHierarchy extends Serializable {
* @return any closer match below 'node' or null if nothing is a more accurate match
*/
public IProgramElement findCloserMatchForLineNumber(IProgramElement node, int lineno);
+
+ /**
+ * Discover the node representing a particular source file.
+ *
+ * @param node where in the model to start looking (usually the root on the initial call)
+ * @param sourcefilePath the source file being searched for
+ * @return the node representing that source file or null if it cannot be found
+ */
+ public IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath);
} \ No newline at end of file
diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
index d7892b56d..cd07bb5d7 100644
--- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
+++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
@@ -363,7 +363,7 @@ public class AspectJElementHierarchy implements IHierarchy {
* @param sourcefilePath the source file being searched for
* @return the node representing that source file or null if it cannot be found
*/
- private IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath) {
+ public IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath) {
// 1. why is <root> a sourcefile node?
// 2. should isSourceFile() return true for a FILE that is a .class file...?
if ((node.getKind().isSourceFile() && !node.getName().equals("<root>")) || node.getKind().isFile()) {