]> source.dussan.org Git - aspectj.git/commitdiff
possibly useful method being added ... investigating using it for 86903
authoraclement <aclement>
Thu, 3 Nov 2005 14:26:16 +0000 (14:26 +0000)
committeraclement <aclement>
Thu, 3 Nov 2005 14:26:16 +0000 (14:26 +0000)
weaver/src/org/aspectj/weaver/patterns/Bindings.java

index 78b61a643a36e855b9e850956540e5950b2839a9..628dccb63d16549c2e7ab879f6ae82a16b6e68af 100644 (file)
@@ -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() {