Java Code Examples for org.jf.dexlib2.iface.ClassDef#getAnnotations()
The following examples show how to use
org.jf.dexlib2.iface.ClassDef#getAnnotations() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImmutableClassDef.java From ZjDroid with Apache License 2.0 | 6 votes |
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()); }
Example 2
Source File: ImmutableClassDef.java From zjdroid with Apache License 2.0 | 6 votes |
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()); }
Example 3
Source File: ImmutableClassDef.java From HeyGirl with Apache License 2.0 | 6 votes |
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()); }
Example 4
Source File: ImmutableClassDef.java From ZjDroid with Apache License 2.0 | 6 votes |
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()); }
Example 5
Source File: AbIClassDef.java From atlas with Apache License 2.0 | 4 votes |
@Override public ClassDef reClassDef(ClassDef classDef) { Iterable<? extends Method> methods = classDef.getMethods(); LinkedHashSet<Method> newMethods = new LinkedHashSet<Method>(); Iterable<? extends Field> fields = classDef.getFields(); LinkedHashSet<Field>newFields = new LinkedHashSet<Field>(); Set<? extends Annotation> annotations = classDef.getAnnotations(); List<String>interfaces = classDef.getInterfaces(); Set<String>newInterfaces = new HashSet<String>(); Set<Annotation>immutableAnnotations = new HashSet<Annotation>(); String type = classDef.getType(); reType = reType(type); String superClass = classDef.getSuperclass(); for (String inter:interfaces){ newInterfaces.add(reInterface(inter)); } String reSuperClass = reSuperClass(superClass); for (Annotation annotation:annotations){ immutableAnnotations.add(reAnnotation(annotation)); } for (Field field:fields){ newFields.add(reField(field)); } for (Method method:methods){ if (method.getName().equals("<cinit>")||method.getName().equals("<init>")){ newMethods.add(reMethod(method)); continue; } // if (method.getName().equals("getArchiveFile")) { newMethods.add(reMethod(method)); // } } return new ImmutableClassDef( reType, classDef.getAccessFlags(), reSuperClass, newInterfaces, classDef.getSourceFile(), immutableAnnotations, newFields, newMethods); }