private String[] buildInterfaces(ClassDef classDef) { List<String> interfaces = classDef.getInterfaces(); return interfaces.stream().map(this::stripName) .toArray(size -> new String[interfaces.size()]); }
for (String interfaceType: getClassDef().getInterfaces()) { if (!interfaces.containsKey(interfaceType)) { ClassProto interfaceProto = (ClassProto)classPath.getClass(interfaceType);
for (String interfaceType: getClassDef().getInterfaces()) { if (!interfaces.containsKey(interfaceType)) { ClassDef interfaceDef;
classDef.getAccessFlags(), classDef.getSuperclass(), classDef.getInterfaces(), classDef.getSourceFile(), classDef.getAnnotations(),
if (defItem.getInterfaces() != null) { for (String interfaceName : defItem.getInterfaces()) { String interfaceClassName = Util.dottedClassName(interfaceName); if (sc.implementsInterface(interfaceClassName)) {
PoolClassDef(@Nonnull ClassDef classDef) { this.classDef = classDef; interfaces = new TypeListPool.Key<List<String>>(ImmutableList.copyOf(classDef.getInterfaces())); staticFields = ImmutableSortedSet.copyOf(classDef.getStaticFields()); instanceFields = ImmutableSortedSet.copyOf(classDef.getInstanceFields()); directMethods = ImmutableSortedSet.copyOf( Iterables.transform(classDef.getDirectMethods(), PoolMethod.TRANSFORM)); virtualMethods = ImmutableSortedSet.copyOf( Iterables.transform(classDef.getVirtualMethods(), PoolMethod.TRANSFORM)); }
PoolClassDef(@Nonnull ClassDef classDef) { this.classDef = classDef; interfaces = new TypeListPool.Key<List<String>>(ImmutableList.copyOf(classDef.getInterfaces())); staticFields = ImmutableSortedSet.copyOf(classDef.getStaticFields()); instanceFields = ImmutableSortedSet.copyOf(classDef.getInstanceFields()); directMethods = ImmutableSortedSet.copyOf( Iterables.transform(classDef.getDirectMethods(), PoolMethod.TRANSFORM)); virtualMethods = ImmutableSortedSet.copyOf( Iterables.transform(classDef.getVirtualMethods(), PoolMethod.TRANSFORM)); }
PoolClassDef(@Nonnull ClassDef classDef) { this.classDef = classDef; interfaces = new TypeListPool.Key<SortedSet<String>>(ImmutableSortedSet.copyOf(classDef.getInterfaces())); staticFields = ImmutableSortedSet.copyOf(classDef.getStaticFields()); instanceFields = ImmutableSortedSet.copyOf(classDef.getInstanceFields()); directMethods = ImmutableSortedSet.copyOf( Iterables.transform(classDef.getDirectMethods(), PoolMethod.TRANSFORM)); virtualMethods = ImmutableSortedSet.copyOf( Iterables.transform(classDef.getVirtualMethods(), PoolMethod.TRANSFORM)); }
@Override @Nonnull public List<String> getInterfaces() { return RewriterUtils.rewriteList(rewriters.getTypeRewriter(), classDef.getInterfaces()); }
@Override @Nonnull public List<String> getInterfaces() { return RewriterUtils.rewriteList(rewriters.getTypeRewriter(), classDef.getInterfaces()); }
@Override @Nonnull public Set<String> getInterfaces() { return RewriterUtils.rewriteSet(rewriters.getTypeRewriter(), classDef.getInterfaces()); }
private void writeInterfaces(IndentingWriter writer) throws IOException { List<String> interfaces = Lists.newArrayList(classDef.getInterfaces()); Collections.sort(interfaces); if (interfaces.size() != 0) { writer.write('\n'); writer.write("# interfaces\n"); for (String interfaceName: interfaces) { writer.write(".implements "); writer.write(interfaceName); writer.write('\n'); } } }
private void writeInterfaces(IndentingWriter writer) throws IOException { List<String> interfaces = Lists.newArrayList(classDef.getInterfaces()); Collections.sort(interfaces); if (interfaces.size() != 0) { writer.write('\n'); writer.write("# interfaces\n"); for (String interfaceName : interfaces) { writer.write(".implements "); writer.write(interfaceName); writer.write('\n'); } } }
private void writeInterfaces(IndentingWriter writer) throws IOException { List<String> interfaces = classDef.getInterfaces(); if (interfaces.size() != 0) { writer.write('\n'); writer.write("# interfaces\n"); for (String interfaceName: interfaces) { writer.write(".implements "); writer.write(interfaceName); writer.write('\n'); } } }
private void writeInterfaces(IndentingWriter writer) throws IOException { List<String> interfaces = classDef.getInterfaces(); if (interfaces.size() != 0) { writer.write('\n'); writer.write("# interfaces\n"); for (String interfaceName: interfaces) { writer.write(".implements "); writer.write(interfaceName); writer.write('\n'); } } }
private static ClassDef reDexClass(@Nonnull ClassDef classDef) { return new ImmutableClassDef(classDef.getType(), classDef.getAccessFlags(), classDef.getSuperclass(), classDef.getInterfaces(), classDef.getSourceFile(), classDef.getAnnotations(), classDef.getFields(), reDexMethods(classDef)); }
LinkedHashSet<Field>newFields = new LinkedHashSet<Field>(); Set<? extends Annotation> annotations = classDef.getAnnotations(); Set<String>interfaces = classDef.getInterfaces(); Set<String>newInterfaces = new HashSet<String>(); Set<Annotation>immutableAnnotations = new HashSet<Annotation>();
public static ImmutableClassDef of(ClassDef classDef) { if (classDef instanceof ImmutableClassDef) { return (ImmutableClassDef)classDef; } return new ImmutableClassDef( classDef.getType(), classDef.getAccessFlags(), classDef.getSuperclass(), classDef.getInterfaces(), classDef.getSourceFile(), classDef.getAnnotations(), classDef.getStaticFields(), classDef.getInstanceFields(), classDef.getDirectMethods(), classDef.getVirtualMethods()); }
public static ImmutableClassDef of(ClassDef classDef) { if (classDef instanceof ImmutableClassDef) { return (ImmutableClassDef)classDef; } return new ImmutableClassDef( classDef.getType(), classDef.getAccessFlags(), classDef.getSuperclass(), classDef.getInterfaces(), classDef.getSourceFile(), classDef.getAnnotations(), classDef.getStaticFields(), classDef.getInstanceFields(), classDef.getDirectMethods(), classDef.getVirtualMethods()); }
public static ImmutableClassDef of(ClassDef classDef) { if (classDef instanceof ImmutableClassDef) { return (ImmutableClassDef)classDef; } return new ImmutableClassDef( classDef.getType(), classDef.getAccessFlags(), classDef.getSuperclass(), classDef.getInterfaces(), classDef.getSourceFile(), classDef.getAnnotations(), classDef.getStaticFields(), classDef.getInstanceFields(), classDef.getDirectMethods(), classDef.getVirtualMethods()); }