From: aclement Date: Thu, 3 Nov 2005 14:26:16 +0000 (+0000) Subject: possibly useful method being added ... investigating using it for 86903 X-Git-Tag: V1_5_0RC1~268 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=206180218acec863d08939925c7012243b95d55b;p=aspectj.git possibly useful method being added ... investigating using it for 86903 --- 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() {