Home
last modified time | relevance | path

Searched refs:classDef (Results 1 – 25 of 41) sorted by relevance

12

/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/pool/
DClassPool.java87 public void intern(@Nonnull ClassDef classDef) { in intern() argument
88 PoolClassDef poolClassDef = new PoolClassDef(classDef); in intern()
221 final PoolClassDef classDef = internedItems.get(name.toString()); in getClassEntryByType() local
222 if (classDef == null) { in getClassEntryByType()
228 return classDef; in getClassEntryByType()
232 return classDef.classDefIndex; in getClassEntryByType()
236 return classDef.classDefIndex = value; in getClassEntryByType()
241 @Nonnull @Override public CharSequence getType(@Nonnull PoolClassDef classDef) {
242 return classDef.getType();
245 @Override public int getAccessFlags(@Nonnull PoolClassDef classDef) {
[all …]
DPoolClassDef.java45 @Nonnull final ClassDef classDef; field in PoolClassDef
56 PoolClassDef(@Nonnull ClassDef classDef) { in PoolClassDef() argument
57 this.classDef = classDef; in PoolClassDef()
59 … interfaces = new TypeListPool.Key<List<String>>(ImmutableList.copyOf(classDef.getInterfaces())); in PoolClassDef()
60 staticFields = ImmutableSortedSet.copyOf(classDef.getStaticFields()); in PoolClassDef()
61 instanceFields = ImmutableSortedSet.copyOf(classDef.getInstanceFields()); in PoolClassDef()
63 Iterables.transform(classDef.getDirectMethods(), PoolMethod.TRANSFORM)); in PoolClassDef()
65 Iterables.transform(classDef.getVirtualMethods(), PoolMethod.TRANSFORM)); in PoolClassDef()
69 return classDef.getType(); in getType()
73 return classDef.getAccessFlags(); in getAccessFlags()
[all …]
DDexPool.java96 for (ClassDef classDef: input.getClasses()) { in writeTo()
97 ((ClassPool)dexPool.classSection).intern(classDef); in writeTo()
104 for (ClassDef classDef: input.getClasses()) { in writeTo()
105 ((ClassPool)dexPool.classSection).intern(classDef); in writeTo()
/external/smali/baksmali/src/main/java/org/jf/baksmali/Adaptors/
DClassDefinition.java50 @Nonnull public final ClassDef classDef; field in ClassDefinition
55 public ClassDefinition(@Nonnull baksmaliOptions options, @Nonnull ClassDef classDef) { in ClassDefinition() argument
57 this.classDef = classDef; in ClassDefinition()
69 for (Method method: classDef.getDirectMethods()) { in findFieldsSetInStaticConstructor()
91 fieldRef.getDefiningClass().equals((classDef.getType()))) { in findFieldsSetInStaticConstructor()
119 writer.write(classDef.getType()); in writeClass()
124 … for (AccessFlags accessFlag: AccessFlags.getAccessFlagsForClass(classDef.getAccessFlags())) { in writeAccessFlags()
131 String superClass = classDef.getSuperclass(); in writeSuper()
140 String sourceFile = classDef.getSourceFile(); in writeSourceFile()
149 List<String> interfaces = classDef.getInterfaces(); in writeInterfaces()
[all …]
DMethodDefinition.java68 @Nonnull public final ClassDefinition classDef; field in MethodDefinition
83 public MethodDefinition(@Nonnull ClassDefinition classDef, @Nonnull Method method, in MethodDefinition() argument
85 this.classDef = classDef; in MethodDefinition()
215 if (classDef.options.useLocalsDirective) { in writeTo()
223 writeParameters(writer, method, methodParameters, classDef.options); in writeTo()
226 … registerFormatter = new RegisterFormatter(classDef.options, methodImpl.getRegisterCount(), in writeTo()
231 if (classDef.options.useImplicitReferences) { in writeTo()
369 if ((classDef.options.registerInfo != 0) || (classDef.options.normalizeVirtualMethods) || in getMethodItems()
370 (classDef.options.deodex && needsAnalyzed())) { in getMethodItems()
377 if (classDef.options.outputDebugInfo) { in getMethodItems()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/rewriter/
DClassDefRewriter.java54 @Nonnull @Override public ClassDef rewrite(@Nonnull ClassDef classDef) { in rewrite() argument
55 return new RewrittenClassDef(classDef); in rewrite()
59 @Nonnull protected ClassDef classDef; field in ClassDefRewriter.RewrittenClassDef
62 this.classDef = classdef; in RewrittenClassDef()
66 return rewriters.getTypeRewriter().rewrite(classDef.getType()); in getType()
70 return classDef.getAccessFlags(); in getAccessFlags()
74 … return RewriterUtils.rewriteNullable(rewriters.getTypeRewriter(), classDef.getSuperclass()); in getSuperclass()
78 return RewriterUtils.rewriteList(rewriters.getTypeRewriter(), classDef.getInterfaces()); in getInterfaces()
82 return classDef.getSourceFile(); in getSourceFile()
86 … return RewriterUtils.rewriteSet(rewriters.getAnnotationRewriter(), classDef.getAnnotations()); in getAnnotations()
[all …]
/external/smali/smali/src/test/java/org/jf/smali/
DImplicitReferenceTest.java63 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testImplicitMethodReference() local
75 for (Method method: classDef.getMethods()) { in testImplicitMethodReference()
91 Assert.assertEquals(classDef.getType(), method.getDefiningClass()); in testImplicitMethodReference()
98 Assert.assertEquals(classDef.getType(), method.getDefiningClass()); in testImplicitMethodReference()
105 Assert.assertEquals(classDef.getType(), method.getDefiningClass()); in testImplicitMethodReference()
111 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testImplicitMethodLiteral() local
120 for (Field field: classDef.getFields()) { in testImplicitMethodLiteral()
129 Assert.assertEquals(classDef.getType(), methodEncodedValue.getValue().getDefiningClass()); in testImplicitMethodLiteral()
137 Assert.assertEquals(classDef.getType(), methodEncodedValue.getValue().getDefiningClass()); in testImplicitMethodLiteral()
145 Assert.assertEquals(classDef.getType(), methodEncodedValue.getValue().getDefiningClass()); in testImplicitMethodLiteral()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/immutable/
DImmutableClassDef.java135 public static ImmutableClassDef of(ClassDef classDef) { in of() argument
136 if (classDef instanceof ImmutableClassDef) { in of()
137 return (ImmutableClassDef)classDef; in of()
140 classDef.getType(), in of()
141 classDef.getAccessFlags(), in of()
142 classDef.getSuperclass(), in of()
143 classDef.getInterfaces(), in of()
144 classDef.getSourceFile(), in of()
145 classDef.getAnnotations(), in of()
146 classDef.getStaticFields(), in of()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/
DDexBackedField.java48 @Nonnull public final ClassDef classDef; field in DexBackedField
59 @Nonnull DexBackedClassDef classDef, in DexBackedField() argument
64 this.classDef = classDef; in DexBackedField()
77 @Nonnull DexBackedClassDef classDef, in DexBackedField() argument
81 this.classDef = classDef; in DexBackedField()
105 @Nonnull @Override public String getDefiningClass() { return classDef.getType(); } in getDefiningClass()
DDexBackedMethod.java56 @Nonnull public final DexBackedClassDef classDef; field in DexBackedMethod
71 @Nonnull DexBackedClassDef classDef, in DexBackedMethod() argument
74 this.classDef = classDef; in DexBackedMethod()
88 @Nonnull DexBackedClassDef classDef, in DexBackedMethod() argument
93 this.classDef = classDef; in DexBackedMethod()
107 @Nonnull @Override public String getDefiningClass() { return classDef.getType(); } in getDefiningClass()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/util/
DSyntheticAccessorResolver.java80 for (ClassDef classDef: classDefs) { in SyntheticAccessorResolver()
81 builder.put(classDef.getType(), classDef); in SyntheticAccessorResolver() local
101 ClassDef classDef = classDefMap.get(type); in getAccessedMember() local
102 if (classDef == null) { in getAccessedMember()
108 for (Method method: classDef.getMethods()) { in getAccessedMember()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/builder/
DBuilderClassPool.java71 @Nonnull BuilderClassDef internClass(@Nonnull BuilderClassDef classDef) { in internClass() argument
72 BuilderClassDef prev = internedItems.put(classDef.getType(), classDef); in internClass()
74 … throw new ExceptionWithContext("Class %s has already been interned", classDef.getType()); in internClass()
76 return classDef; in internClass()
93 final BuilderClassDef classDef = internedItems.get(type.getType()); in getClassEntryByType() local
94 if (classDef == null) { in getClassEntryByType()
100 return classDef; in getClassEntryByType()
104 return classDef.classDefIndex; in getClassEntryByType()
108 return classDef.classDefIndex = value; in getClassEntryByType()
154 …ollection<? extends BuilderEncodedValue> getStaticInitializers(@Nonnull BuilderClassDef classDef) {
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/analysis/
DDexClassProvider.java48 for (ClassDef classDef: dexFile.getClasses()) { in DexClassProvider()
49 classMap.put(classDef.getType(), classDef); in DexClassProvider() local
DDumpVtables.java117 for (ClassDef classDef: dexFile.getClasses()) { in main()
118 ClassProto classProto = (ClassProto) classPath.getClass(classDef); in main()
120 …String className = "Class " + classDef.getType() + " extends " + classDef.getSuperclass() + " : "… in main()
DDumpFields.java119 for (ClassDef classDef: dexFile.getClasses()) { in main()
120 ClassProto classProto = (ClassProto) classPath.getClass(classDef); in main()
122 … String className = "Class " + classDef.getType() + " : " + fields.size() + " instance fields\n"; in main()
DClassProto.java105 ClassDef classDef = getClassDef(); in isInterface() local
106 return (classDef.getAccessFlags() & AccessFlags.INTERFACE.getValue()) != 0; in isInterface()
553 private ArrayList<Field> getSortedInstanceFields(@Nonnull ClassDef classDef) {
554 ArrayList<Field> fields = Lists.newArrayList(classDef.getInstanceFields());
680 private ArrayList<Field> getSortedInstanceFields(@Nonnull ClassDef classDef) {
681 ArrayList<Field> fields = Lists.newArrayList(classDef.getInstanceFields());
DCustomInlineMethodResolver.java122 ClassDef classDef = ((ClassProto)typeProto).getClassDef(); in parseAndResolveInlineMethod() local
123 for (Method method: classDef.getMethods()) { in parseAndResolveInlineMethod()
DClassPath.java150 ClassDef classDef = provider.getClassDef(type); in getClassDef() local
151 if (classDef != null) { in getClassDef()
152 return classDef; in getClassDef()
/external/smali/dexlib2/src/test/java/org/jf/dexlib2/analysis/
DCustomMethodInlineTableTest.java67 …ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Obj… in testCustomMethodInlineTable_Virtual() local
70 DexFile dexFile = new ImmutableDexFile(Opcodes.forApi(19), ImmutableList.of(classDef)); in testCustomMethodInlineTable_Virtual()
94 …ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Obj… in testCustomMethodInlineTable_Static() local
97 DexFile dexFile = new ImmutableDexFile(Opcodes.forApi(19), ImmutableList.of(classDef)); in testCustomMethodInlineTable_Static()
121 …ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Obj… in testCustomMethodInlineTable_Direct() local
124 DexFile dexFile = new ImmutableDexFile(Opcodes.forApi(19), ImmutableList.of(classDef)); in testCustomMethodInlineTable_Direct()
/external/smali/baksmali/src/test/java/org/jf/baksmali/
DBaksmaliTestUtils.java53 ClassDef classDef = SmaliTestUtils.compileSmali(source, options.apiLevel, in assertSmaliCompiledEquals() local
57 String normalizedActual = getNormalizedSmali(classDef, options, stripComments); in assertSmaliCompiledEquals()
84 …public static String getNormalizedSmali(@Nonnull ClassDef classDef, @Nonnull baksmaliOptions optio… in getNormalizedSmali() argument
89 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in getNormalizedSmali()
DAnalysisTest.java97 for (ClassDef classDef: dexFile.getClasses()) { in runTest()
100 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in runTest()
104 String className = classDef.getType(); in runTest()
/external/smali/dexlib2/src/test/java/org/jf/dexlib2/writer/
DJumboStringConversionTest.java97 ClassDef classDef = Iterables.getFirst(dexFile.getClasses(), null); in testJumboStringConversion() local
98 Assert.assertNotNull(classDef); in testJumboStringConversion()
100 Method method = Iterables.getFirst(classDef.getMethods(), null); in testJumboStringConversion()
194 ClassDef classDef = Iterables.getFirst(dexFile.getClasses(), null); in testJumboStringConversion_NonMethodBuilder() local
195 Assert.assertNotNull(classDef); in testJumboStringConversion_NonMethodBuilder()
197 Method method = Iterables.getFirst(classDef.getMethods(), null); in testJumboStringConversion_NonMethodBuilder()
DDexWriterTest.java69 ImmutableClassDef classDef = new ImmutableClassDef("Lorg/test/blah;", in testAnnotationElementOrder() local
75 … DexPool.writeTo(dataStore, new ImmutableDexFile(Opcodes.forApi(19), ImmutableSet.of(classDef))); in testAnnotationElementOrder()
109 ImmutableClassDef classDef = new ImmutableClassDef("Lorg/test/blah;", in testEncodedAnnotationElementOrder() local
115 … DexPool.writeTo(dataStore, new ImmutableDexFile(Opcodes.forApi(19), ImmutableSet.of(classDef))); in testEncodedAnnotationElementOrder()
/external/smali/baksmali/src/main/java/org/jf/baksmali/
Dbaksmali.java146 for (final ClassDef classDef: classDefs) { in disassembleDexFile()
149 return disassembleClass(classDef, fileNameHandler, options); in disassembleDexFile()
176 private static boolean disassembleClass(ClassDef classDef, ClassFileNameHandler fileNameHandler, in disassembleClass() argument
185 String classDescriptor = classDef.getType(); in disassembleClass()
197 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in disassembleClass()
/external/smali/dexlib2/src/test/java/org/jf/dexlib2/
DAccessorTest.java89 for (ClassDef classDef: f.getClasses()) { in testAccessors()
90 String className = classDef.getType(); in testAccessors()
93 accessorTypesClass = classDef; in testAccessors()
95 accessorsClass = classDef; in testAccessors()

12