From 206180218acec863d08939925c7012243b95d55b Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 3 Nov 2005 14:26:16 +0000 Subject: [PATCH] possibly useful method being added ... investigating using it for 86903 --- .../src/org/aspectj/weaver/patterns/Bindings.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/patterns/Bindings.java b/weaver/src/org/aspectj/weaver/patterns/Bindings.java index 78b61a643..628dccb63 100644 --- a/weaver/src/org/aspectj/weaver/patterns/Bindings.java +++ b/weaver/src/org/aspectj/weaver/patterns/Bindings.java @@ -15,6 +15,7 @@ package org.aspectj.weaver.patterns; import org.aspectj.bridge.IMessage; import org.aspectj.weaver.BCException; +import org.aspectj.weaver.UnresolvedType; public class Bindings { public static final Bindings NONE = new Bindings(0); @@ -96,6 +97,20 @@ public class Bindings { //System.out.println("ret: " + index); return newRet; } + + public UnresolvedType[] getUsedFormalTypes() { + UnresolvedType[] ret = new UnresolvedType[bindings.length]; + int index = 0; + for (int i=0, len=bindings.length; i < len; i++) { + if (bindings[i] != null) { + ret[index++] = ((BindingTypePattern)bindings[i]).getExactType(); + } + } + UnresolvedType[] newRet = new UnresolvedType[index]; + System.arraycopy(ret, 0, newRet, 0, index); + //System.out.println("ret: " + index); + return newRet; + } public Bindings copy() { -- 2.39.5