Home
last modified time | relevance | path

Searched refs:classDef (Results 1 – 25 of 33) 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<SortedSet<String>>(ImmutableSortedSet.copyOf(classDef.getInterfa… 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.java88 for (ClassDef classDef: input.getClasses()) { in writeTo()
89 ((ClassPool)dexPool.classSection).intern(classDef); in writeTo()
96 for (ClassDef classDef: input.getClasses()) { in writeTo()
97 ((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 = Lists.newArrayList(classDef.getInterfaces()); in writeInterfaces()
[all …]
DMethodDefinition.java64 @Nonnull public final ClassDefinition classDef; field in MethodDefinition
77 public MethodDefinition(@Nonnull ClassDefinition classDef, @Nonnull Method method, in MethodDefinition() argument
79 this.classDef = classDef; in MethodDefinition()
186 if (classDef.options.useLocalsDirective) { in writeTo()
194 writeParameters(writer, method, methodParameters, classDef.options); in writeTo()
197 … registerFormatter = new RegisterFormatter(classDef.options, methodImpl.getRegisterCount(), in writeTo()
202 if (classDef.options.useImplicitReferences) { in writeTo()
311 if ((classDef.options.registerInfo != 0) || (classDef.options.deodex && needsAnalyzed())) { in getMethodItems()
318 if (classDef.options.outputDebugInfo) { in getMethodItems()
322 if (classDef.options.useSequentialLabels) { in getMethodItems()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/rewriter/
DClassDefRewriter.java53 @Nonnull @Override public ClassDef rewrite(@Nonnull ClassDef classDef) { in rewrite() argument
54 return new RewrittenClassDef(classDef); in rewrite()
58 @Nonnull protected ClassDef classDef; field in ClassDefRewriter.RewrittenClassDef
61 this.classDef = classdef; in RewrittenClassDef()
65 return rewriters.getTypeRewriter().rewrite(classDef.getType()); in getType()
69 return classDef.getAccessFlags(); in getAccessFlags()
73 … return RewriterUtils.rewriteNullable(rewriters.getTypeRewriter(), classDef.getSuperclass()); in getSuperclass()
77 return RewriterUtils.rewriteSet(rewriters.getTypeRewriter(), classDef.getInterfaces()); in getInterfaces()
81 return classDef.getSourceFile(); in getSourceFile()
85 … return RewriterUtils.rewriteSet(rewriters.getAnnotationRewriter(), classDef.getAnnotations()); in getAnnotations()
[all …]
/external/smali/baksmali/src/test/java/org/jf/baksmali/
DImplicitReferenceTest.java49 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testImplicitMethodReferences() local
77 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in testImplicitMethodReferences()
87 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testExplicitMethodReferences() local
115 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in testExplicitMethodReferences()
125 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testImplicitMethodLiterals() local
147 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in testImplicitMethodLiterals()
157 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testExplicitMethodLiterals() local
179 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in testExplicitMethodLiterals()
189 ClassDef classDef = SmaliTestUtils.compileSmali("" + in testImplicitFieldReferences() local
217 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in testImplicitFieldReferences()
[all …]
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/smali/src/test/java/
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.java134 public static ImmutableClassDef of(ClassDef classDef) { in of() argument
135 if (classDef instanceof ImmutableClassDef) { in of()
136 return (ImmutableClassDef)classDef; in of()
139 classDef.getType(), in of()
140 classDef.getAccessFlags(), in of()
141 classDef.getSuperclass(), in of()
142 classDef.getInterfaces(), in of()
143 classDef.getSourceFile(), in of()
144 classDef.getAnnotations(), in of()
145 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.java77 for (ClassDef classDef: classDefs) { in SyntheticAccessorResolver()
78 builder.put(classDef.getType(), classDef); in SyntheticAccessorResolver() local
98 ClassDef classDef = classDefMap.get(type); in getAccessedMember() local
99 if (classDef == null) { in getAccessedMember()
105 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/test/java/org/jf/dexlib2/analysis/
DCustomMethodInlineTableTest.java66 …ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Obj… in testCustomMethodInlineTable_Virtual() local
69 DexFile dexFile = new ImmutableDexFile(ImmutableList.of(classDef)); in testCustomMethodInlineTable_Virtual()
93 …ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Obj… in testCustomMethodInlineTable_Static() local
96 DexFile dexFile = new ImmutableDexFile(ImmutableList.of(classDef)); in testCustomMethodInlineTable_Static()
120 …ClassDef classDef = new ImmutableClassDef("Lblah;", AccessFlags.PUBLIC.getValue(), "Ljava/lang/Obj… in testCustomMethodInlineTable_Direct() local
123 DexFile dexFile = new ImmutableDexFile(ImmutableList.of(classDef)); in testCustomMethodInlineTable_Direct()
/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.java67 ImmutableClassDef classDef = new ImmutableClassDef("Lorg/test/blah;", in testAnnotationElementOrder() local
73 DexPool.writeTo(dataStore, new ImmutableDexFile(ImmutableSet.of(classDef))); in testAnnotationElementOrder()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/analysis/
DDumpVtables.java113 for (ClassDef classDef: dexFile.getClasses()) { in main()
114 ClassProto classProto = (ClassProto) classPath.getClass(classDef); in main()
116 …String className = "Class " + classDef.getType() + " extends " + classDef.getSuperclass() + " : "… in main()
DClassPath.java106 for (ClassDef classDef: dexFile.getClasses()) { in ClassPath()
107 ClassDef prev = availableClasses.get(classDef.getType()); in ClassPath()
109 availableClasses.put(classDef.getType(), classDef); in ClassPath() local
DDumpFields.java115 for (ClassDef classDef: dexFile.getClasses()) { in main()
116 ClassProto classProto = (ClassProto) classPath.getClass(classDef); in main()
118 … String className = "Class " + classDef.getType() + " : " + fields.size() + " instance fields\n"; in main()
DCustomInlineMethodResolver.java122 ClassDef classDef = ((ClassProto)typeProto).getClassDef(); in parseAndResolveInlineMethod() local
123 for (Method method: classDef.getMethods()) { in parseAndResolveInlineMethod()
DClassProto.java101 ClassDef classDef = getClassDef(); in isInterface() local
102 return (classDef.getAccessFlags() & AccessFlags.INTERFACE.getValue()) != 0; in isInterface()
516 private ArrayList<Field> getSortedInstanceFields(@Nonnull ClassDef classDef) {
517 ArrayList<Field> fields = Lists.newArrayList(classDef.getInstanceFields());
/external/smali/baksmali/src/main/java/org/jf/baksmali/
Dbaksmali.java147 for (final ClassDef classDef: classDefs) { in disassembleDexFile()
150 return disassembleClass(classDef, fileNameHandler, options); in disassembleDexFile()
177 private static boolean disassembleClass(ClassDef classDef, ClassFileNameHandler fileNameHandler, in disassembleClass() argument
186 String classDescriptor = classDef.getType(); in disassembleClass()
198 ClassDefinition classDefinition = new ClassDefinition(options, classDef); in disassembleClass()
/external/smali/dexlib2/src/accessorTest/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()
/external/smali/baksmali/src/main/java/org/jf/baksmali/Adaptors/Format/
DInstructionMethodItem.java72 baksmaliOptions options = methodDef.classDef.options; in isAllowedOdex()
77 if (methodDef.classDef.options.apiLevel >= 14) { in isAllowedOdex()
110 if (methodDef.classDef.options.useImplicitReferences) { in writeTo()
501 Map<Integer,String> resourceIds = methodDef.classDef.options.resourceIds; in writeCommentIfResourceId()

12