diff options
author | aclement <aclement> | 2008-11-03 23:53:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-11-03 23:53:57 +0000 |
commit | f357106f919d38b45e4477fc8165cdeaf80c640e (patch) | |
tree | f6eeac55e160854744f972893f1c510ae7cb39a1 /asm | |
parent | a6ab11f0bbbd8810d05bbbf055ef2699116f7846 (diff) | |
download | aspectj-f357106f919d38b45e4477fc8165cdeaf80c640e.tar.gz aspectj-f357106f919d38b45e4477fc8165cdeaf80c640e.zip |
Make findElementForHandleOrCreate public
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/IHierarchy.java | 5 | ||||
-rw-r--r-- | asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/asm/src/org/aspectj/asm/IHierarchy.java b/asm/src/org/aspectj/asm/IHierarchy.java index 740c8f772..e1f3dded9 100644 --- a/asm/src/org/aspectj/asm/IHierarchy.java +++ b/asm/src/org/aspectj/asm/IHierarchy.java @@ -43,11 +43,10 @@ public interface IHierarchy extends Serializable { public boolean isValid(); - /** - * @return null if not found - */ public IProgramElement findElementForHandle(String handle); + public IProgramElement findElementForHandleOrCreate(String handle, boolean create); + /** * Returns the first match * diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index 089938674..5443e759f 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -422,7 +422,7 @@ public class AspectJElementHierarchy implements IHierarchy { // TODO: optimize this lookup // only want to create a file node if can't find the IPE if called through // findElementForHandle() to mirror behaviour before pr141730 - private IProgramElement findElementForHandleOrCreate(String handle, boolean create) { + public IProgramElement findElementForHandleOrCreate(String handle, boolean create) { // try the cache first... IProgramElement ipe = (IProgramElement) handleMap.get(handle); if (ipe != null) { |