/** Returns the target for the given SpecialInvokeExpr. */ public SootMethod resolveSpecialDispatch(SpecialInvokeExpr ie, SootMethod container) { container.getDeclaringClass().checkLevel(SootClass.HIERARCHY); SootMethod target = ie.getMethod(); target.getDeclaringClass().checkLevel(SootClass.HIERARCHY); /* * This is a bizarre condition! Hopefully the implementation is correct. See VM Spec, 2nd Edition, Chapter 6, in the * definition of invokespecial. */ if ("<init>".equals(target.getName()) || target.isPrivate()) { return target; } else if (isClassSubclassOf(target.getDeclaringClass(), container.getDeclaringClass())) { return resolveConcreteDispatch(container.getDeclaringClass(), target); } else { return target; } } }
if (!possibleExceptions.contains(t.getException())) { possibleExceptions.add(t.getException()); if (hierarchy.isClassSubclassOf(thrownException, t.getException())) { catchesThrownException = true;
@Override public int compare(final SootClass a, final SootClass b) { if (a == b) return 0; if (hierarchy.isClassSubclassOf(a, b)) return 1; if (hierarchy.isClassSuperclassOf(a, b)) return -1; return 0; } });
hierarchy.isClassSubclassOf(sootClass1, sootClass2) || hierarchy.isClassSuperclassOf(sootClass1, sootClass2); if (logger.isDebugEnabled()) {
@Override public int compare(final SootMethod a, final SootMethod b) { if (a == b || a.getDeclaringClass() == b.getDeclaringClass()) return 0; if (hierarchy.isClassSubclassOf(a.getDeclaringClass(), b.getDeclaringClass())) return -1; if (hierarchy.isClassSuperclassOf(a.getDeclaringClass(), b.getDeclaringClass())) return 1; return 0; } });
/** Returns the target for the given SpecialInvokeExpr. */ public SootMethod resolveSpecialDispatch(SpecialInvokeExpr ie, SootMethod container) { container.getDeclaringClass().checkLevel(SootClass.HIERARCHY); SootMethod target = ie.getMethod(); target.getDeclaringClass().checkLevel(SootClass.HIERARCHY); /* This is a bizarre condition! Hopefully the implementation is correct. See VM Spec, 2nd Edition, Chapter 6, in the definition of invokespecial. */ if (target.getName().equals("<init>") || target.isPrivate()) return target; else if (isClassSubclassOf(target.getDeclaringClass(), container.getDeclaringClass())) return resolveConcreteDispatch(container.getDeclaringClass(), target); else return target; } }
/** Returns the target for the given SpecialInvokeExpr. */ public SootMethod resolveSpecialDispatch(SpecialInvokeExpr ie, SootMethod container) { container.getDeclaringClass().checkLevel(SootClass.HIERARCHY); SootMethod target = ie.getMethod(); target.getDeclaringClass().checkLevel(SootClass.HIERARCHY); /* This is a bizarre condition! Hopefully the implementation is correct. See VM Spec, 2nd Edition, Chapter 6, in the definition of invokespecial. */ if (target.getName().equals("<init>") || target.isPrivate()) return target; else if (isClassSubclassOf(target.getDeclaringClass(), container.getDeclaringClass())) return resolveConcreteDispatch(container.getDeclaringClass(), target); else return target; } }