+ public boolean extendsOrImplements(Type.Class c, Context cx) {
+ if (this==c) return true;
+ if (this==OBJECT) return false;
+ ClassFile cf = cx.resolve(getName());
+ if (cf==null) {
+ System.err.println("warning: could not resolve class " + getName());
+ return false;
+ }
+ if (cf.superType == c) return true;
+ for(int i=0; i<cf.interfaces.length; i++) if (cf.interfaces[i].extendsOrImplements(c,cx)) return true;
+ if (cf.superType == null) return false;
+ return cf.superType.extendsOrImplements(c, cx);
+ }