From: aclement Date: Mon, 3 Nov 2008 23:53:57 +0000 (+0000) Subject: Make findElementForHandleOrCreate public X-Git-Tag: V1_6_3rc1~99 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f357106f919d38b45e4477fc8165cdeaf80c640e;p=aspectj.git Make findElementForHandleOrCreate public --- 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) {