/** * Convenience method returning true if this class is abstract. */ public boolean isAbstract() { return Modifier.isAbstract(this.getModifiers()); }
/** * Convenience method returning true if this method is abstract. */ public boolean isAbstract() { return Modifier.isAbstract(this.getModifiers()); }
if (isAbstract(m)) { buffer.append("abstract ");
/** * Given an abstract dispatch to an object of type c and a method m, gives a list of possible receiver methods. */ public List<SootMethod> resolveAbstractDispatch(SootClass c, SootMethod m) { c.checkLevel(SootClass.HIERARCHY); m.getDeclaringClass().checkLevel(SootClass.HIERARCHY); checkState(); Set<SootMethod> s = new ArraySet<SootMethod>(); Collection<SootClass> classesIt; if (c.isInterface()) { Set<SootClass> classes = new HashSet<SootClass>(); for (SootClass sootClass : getImplementersOf(c)) { classes.addAll(getSubclassesOfIncluding(sootClass)); } classesIt = classes; } else { classesIt = getSubclassesOfIncluding(c); } for (SootClass cl : classesIt) { if (!Modifier.isAbstract(cl.getModifiers())) { s.add(resolveConcreteDispatch(cl, m)); } } return Collections.unmodifiableList(new ArrayList<SootMethod>(s)); }
if (!Modifier.isAbstract(method.getModifiers()) && !Modifier.isNative(method.getModifiers())) { if (!method.hasActiveBody()) {
if (!Modifier.isAbstract(method.getModifiers()) && !Modifier.isNative(method.getModifiers())) { if (!method.hasActiveBody()) { throw new RuntimeException("method " + method.getName() + " has no active body!");
if (!Modifier.isNative(method.getModifiers()) && !Modifier.isAbstract(method.getModifiers())) { emit(" .limit stack ?"); stackLimitIndex = code.size() - 1; if (!Modifier.isNative(method.getModifiers()) && !Modifier.isAbstract(method.getModifiers())) { code.set(stackLimitIndex, " .limit stack " + maxStackHeight);
if (!Modifier.isAbstract(method.getModifiers()) && !Modifier.isNative(method.getModifiers())) { if (!method.hasActiveBody()) { throw new RuntimeException("method " + method.getName() + " has no active body!");
if (!Modifier.isNative(method.getModifiers()) && !Modifier.isAbstract(method.getModifiers())) { emit(" .limit stack ?"); stackLimitIndex = code.size() - 1; if (!Modifier.isNative(method.getModifiers()) && !Modifier.isAbstract(method.getModifiers())) { code.set(stackLimitIndex, " .limit stack " + maxStackHeight);
/** * Retrieve the SootMethod equivalent of this method * * @return the SootMethod of this method */ public SootMethod makeSootMethod(final Method method) { int accessFlags = method.getAccessFlags(); // get the name of the method String name = method.getName(); List<SootClass> thrownExceptions = getThrownExceptions(method); List<Type> parameterTypes = getParameterTypes(method); // retrieve the return type of this method Type returnType = DexType.toSoot(method.getReturnType()); // Build soot method by all available parameters SootMethod sm = declaringClass.getMethodUnsafe(name, parameterTypes, returnType); if (sm == null) { sm = Scene.v().makeSootMethod(name, parameterTypes, returnType, accessFlags, thrownExceptions); } // if the method is abstract or native, no code needs to be transformed int flags = method.getAccessFlags(); if (Modifier.isAbstract(flags) || Modifier.isNative(flags)) { return sm; } if (Options.v().oaat() && declaringClass.resolvingLevel() <= SootClass.SIGNATURES) { return sm; } // sets the method source by adding its body as the active body sm.setSource(createMethodSource(method)); return sm; }
if (Modifier.isAbstract(modVal) && !(host instanceof SootField)) { modifier |= Opcodes.ACC_ABSTRACT;
/** * Convenience method returning true if this class is abstract. */ public boolean isAbstract() { return Modifier.isAbstract(this.getModifiers()); }
/** * Convenience method returning true if this method is abstract. */ public boolean isAbstract() { return Modifier.isAbstract(this.getModifiers()); }
/** * Convenience method returning true if this class is abstract. */ public boolean isAbstract() { return Modifier.isAbstract(this.getModifiers()); }
/** * Convenience method returning true if this method is abstract. */ public boolean isAbstract() { return Modifier.isAbstract(this.getModifiers()); }
/** Given an abstract dispatch to an object of type c and a method m, gives * a list of possible receiver methods. */ public List resolveAbstractDispatch(SootClass c, SootMethod m) { c.checkLevel(SootClass.HIERARCHY); m.getDeclaringClass().checkLevel(SootClass.HIERARCHY); checkState(); Iterator<SootClass> classesIt = null; if (c.isInterface()) { classesIt = getImplementersOf(c).iterator(); HashSet<SootClass> classes = new HashSet<SootClass>(); while (classesIt.hasNext()) classes.addAll(getSubclassesOfIncluding(classesIt.next())); classesIt = classes.iterator(); } else classesIt = getSubclassesOfIncluding(c).iterator(); ArraySet s = new ArraySet(); while (classesIt.hasNext()) { SootClass cl = classesIt.next(); if( Modifier.isAbstract( cl.getModifiers() ) ) continue; s.add(resolveConcreteDispatch(cl, m)); } List l = new ArrayList(); l.addAll(s); return Collections.unmodifiableList(l); }
buffer.append("protected "); if(isAbstract(m)) buffer.append("abstract ");
/** Given an abstract dispatch to an object of type c and a method m, gives * a list of possible receiver methods. */ public List resolveAbstractDispatch(SootClass c, SootMethod m) { c.checkLevel(SootClass.HIERARCHY); m.getDeclaringClass().checkLevel(SootClass.HIERARCHY); checkState(); Iterator<SootClass> classesIt = null; if (c.isInterface()) { classesIt = getImplementersOf(c).iterator(); HashSet<SootClass> classes = new HashSet<SootClass>(); while (classesIt.hasNext()) classes.addAll(getSubclassesOfIncluding(classesIt.next())); classesIt = classes.iterator(); } else classesIt = getSubclassesOfIncluding(c).iterator(); ArraySet s = new ArraySet(); while (classesIt.hasNext()) { SootClass cl = classesIt.next(); if( Modifier.isAbstract( cl.getModifiers() ) ) continue; s.add(resolveConcreteDispatch(cl, m)); } List l = new ArrayList(); l.addAll(s); return Collections.unmodifiableList(l); }
buffer.append("protected "); if(isAbstract(m)) buffer.append("abstract ");
continue; if (!Modifier.isAbstract(method.getModifiers()) && !Modifier.isNative(method.getModifiers())) { if (!method.hasActiveBody())