From f357106f919d38b45e4477fc8165cdeaf80c640e Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 3 Nov 2008 23:53:57 +0000 Subject: [PATCH] Make findElementForHandleOrCreate public --- asm/src/org/aspectj/asm/IHierarchy.java | 5 ++--- .../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) { -- 2.39.5