@Override public ClassDef get() { return classPath.getClassDef(type); } });
ClassDef interfaceDef = classPath.getClassDef(interfaceType); interfaces.put(interfaceType, interfaceDef); } catch (UnresolvedClassException ex) {
ClassDef interfaceDef; try { interfaceDef = classPath.getClassDef(interfaceType); interfaces.put(interfaceType, interfaceDef); } catch (UnresolvedClassException ex) {
ClassDef interfaceDef = classPath.getClassDef(interfaceType);
ClassDef thisClass = classPath.getClassDef(method.getDefiningClass()); if (!TypeUtils.canAccessClass(thisClass.getType(), classPath.getClassDef(resolvedField.getDefiningClass()))) { ClassDef fieldClass = classPath.getClassDef(objectRegisterTypeProto.getType()); while (!TypeUtils.canAccessClass(thisClass.getType(), fieldClass)) { String superclass = fieldClass.getSuperclass(); fieldClass = classPath.getClassDef(superclass);
ClassDef thisClass = classPath.getClassDef(method.getDefiningClass()); thisClass.getType(), classPath.getClassDef(resolvedMethod.getDefiningClass()))) { ClassDef methodClass = classPath.getClassDef(objectRegisterTypeProto.getType()); while (!TypeUtils.canAccessClass(thisClass.getType(), methodClass)) { String superclass = methodClass.getSuperclass(); methodClass = classPath.getClassDef(superclass);
@Override public ClassDef get() { return classPath.getClassDef(type); } });
@Override public ClassDef get() { return classPath.getClassDef(type); } });
ClassDef interfaceDef = classPath.getClassDef(interfaceType); interfaces.put(interfaceType, interfaceDef); } catch (UnresolvedClassException ex) {
public static void writeSmaliContent(@Nonnull String type, @Nonnull ClassPath classPath, @Nonnull java.io.Writer outWriter) { final org.jf.baksmali.BaksmaliOptions options = new org.jf.baksmali.BaksmaliOptions(); final org.jf.dexlib2.iface.ClassDef classDef = classPath.getClassDef(type); options.apiLevel = VersionMap.mapArtVersionToApi(classPath.oatVersion); options.allowOdex = true; options.classPath = classPath; final ClassDefinition cd = new ClassDefinition(options, classDef); try { org.jf.util.IndentingWriter writer = new org.jf.util.IndentingWriter(outWriter); cd.writeTo(writer); } catch (IOException ex) { LLog.ex(ex); } }
ClassDef interfaceDef; try { interfaceDef = classPath.getClassDef(interfaceType); interfaces.put(interfaceType, interfaceDef); } catch (UnresolvedClassException ex) {
ClassDef interfaceDef; try { interfaceDef = classPath.getClassDef(interfaceType); interfaces.put(interfaceType, interfaceDef); } catch (UnresolvedClassException ex) {
ClassDef interfaceDef = classPath.getClassDef(interfaceType);
public static boolean canAccess(@Nonnull TypeProto type, @Nonnull Method virtualMethod, boolean checkPackagePrivate, boolean checkProtected, boolean checkClass) { if (checkPackagePrivate && MethodUtil.isPackagePrivate(virtualMethod)) { String otherPackage = TypeUtils.getPackage(virtualMethod.getDefiningClass()); String thisPackage = TypeUtils.getPackage(type.getType()); if (!otherPackage.equals(thisPackage)) { return false; } } if (checkProtected && (virtualMethod.getAccessFlags() & AccessFlags.PROTECTED.getValue()) != 0) { if (!TypeProtoUtils.extendsFrom(type, virtualMethod.getDefiningClass())) { return false; } } if (checkClass) { ClassPath classPath = type.getClassPath(); ClassDef methodClassDef = classPath.getClassDef(virtualMethod.getDefiningClass()); if (!TypeUtils.canAccessClass(type.getType(), methodClassDef)) { return false; } } return true; } }
public static boolean canAccess(@Nonnull TypeProto type, @Nonnull Method virtualMethod, boolean checkPackagePrivate, boolean checkProtected, boolean checkClass) { if (checkPackagePrivate && MethodUtil.isPackagePrivate(virtualMethod)) { String otherPackage = TypeUtils.getPackage(virtualMethod.getDefiningClass()); String thisPackage = TypeUtils.getPackage(type.getType()); if (!otherPackage.equals(thisPackage)) { return false; } } if (checkProtected && (virtualMethod.getAccessFlags() & AccessFlags.PROTECTED.getValue()) != 0) { if (!TypeProtoUtils.extendsFrom(type, virtualMethod.getDefiningClass())) { return false; } } if (checkClass) { ClassPath classPath = type.getClassPath(); ClassDef methodClassDef = classPath.getClassDef(virtualMethod.getDefiningClass()); if (!TypeUtils.canAccessClass(type.getType(), methodClassDef)) { return false; } } return true; } }
ClassDef thisClass = classPath.getClassDef(method.getDefiningClass()); if (!canAccessClass(thisClass, classPath.getClassDef(resolvedField.getDefiningClass()))) { ClassDef fieldClass = classPath.getClassDef(objectRegisterTypeProto.getType()); while (!canAccessClass(thisClass, fieldClass)) { String superclass = fieldClass.getSuperclass(); fieldClass = classPath.getClassDef(superclass);
ClassDef thisClass = classPath.getClassDef(method.getDefiningClass()); if (!TypeUtils.canAccessClass(thisClass.getType(), classPath.getClassDef(resolvedField.getDefiningClass()))) { ClassDef fieldClass = classPath.getClassDef(objectRegisterTypeProto.getType()); while (!TypeUtils.canAccessClass(thisClass.getType(), fieldClass)) { String superclass = fieldClass.getSuperclass(); fieldClass = classPath.getClassDef(superclass);
ClassDef thisClass = classPath.getClassDef(method.getDefiningClass()); if (!isSuper && !canAccessClass(thisClass, classPath.getClassDef(resolvedMethod.getDefiningClass()))) { ClassDef methodClass = classPath.getClassDef(objectRegisterTypeProto.getType()); while (!canAccessClass(thisClass, methodClass)) { String superclass = methodClass.getSuperclass(); methodClass = classPath.getClassDef(superclass);
ClassDef thisClass = classPath.getClassDef(method.getDefiningClass()); thisClass.getType(), classPath.getClassDef(resolvedMethod.getDefiningClass()))) { ClassDef methodClass = classPath.getClassDef(objectRegisterTypeProto.getType()); while (!TypeUtils.canAccessClass(thisClass.getType(), methodClass)) { String superclass = methodClass.getSuperclass(); methodClass = classPath.getClassDef(superclass);