diff options
author | acolyer <acolyer> | 2005-08-21 19:44:28 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-21 19:44:28 +0000 |
commit | 78f6eed899449f59a5893d0190081244422067f7 (patch) | |
tree | b408389fc18c7a3d101d78c7909215ba5367b783 /org.aspectj.ajdt.core | |
parent | b0622ad2495f6bd3744751c9e52375f4b5601114 (diff) | |
download | aspectj-78f6eed899449f59a5893d0190081244422067f7.tar.gz aspectj-78f6eed899449f59a5893d0190081244422067f7.zip |
added new method, methods() which returns all methods of a type, including itd'd ones
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMemberFinder.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMemberFinder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMemberFinder.java index 377ef20d7..d7744e864 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMemberFinder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMemberFinder.java @@ -354,7 +354,19 @@ public class InterTypeMemberFinder implements IMemberFinder { // return m2.declaringClass; // } - + public MethodBinding[] methods(SourceTypeBinding sourceTypeBinding) { + MethodBinding[] orig = sourceTypeBinding.methods(); + if (interTypeMethods.isEmpty()) return orig; + + List ret = new ArrayList(Arrays.asList(orig)); + for (int i=0, len=interTypeMethods.size(); i < len; i++) { + MethodBinding method = (MethodBinding)interTypeMethods.get(i); + ret.add(method); + } + + if (ret.isEmpty()) return SourceTypeBinding.NoMethods; + return (MethodBinding[])ret.toArray(new MethodBinding[ret.size()]); + } //XXX conflicts public MethodBinding[] getMethods( |