switch (instruction.getOpcode().referenceType) { case ReferenceType.STRING: dexPool.stringSection.intern((StringReference)reference); break; case ReferenceType.TYPE:
private void internDebug(@Nonnull Method method) { for (MethodParameter param: method.getParameters()) { String paramName = param.getName(); if (paramName != null) { dexPool.stringSection.intern(paramName); } } MethodImplementation methodImpl = method.getImplementation(); if (methodImpl != null) { for (DebugItem debugItem: methodImpl.getDebugItems()) { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: StartLocal startLocal = (StartLocal)debugItem; dexPool.stringSection.internNullable(startLocal.getName()); dexPool.typeSection.internNullable(startLocal.getType()); dexPool.stringSection.internNullable(startLocal.getSignature()); break; case DebugItemType.SET_SOURCE_FILE: dexPool.stringSection.internNullable(((SetSourceFile) debugItem).getSourceFile()); break; } } } }
dexPool.typeSection.internNullable(poolClassDef.getSuperclass()); dexPool.typeListSection.intern(poolClassDef.getInterfaces()); dexPool.stringSection.internNullable(poolClassDef.getSourceFile());
@Nonnull @Override public StringPool getStringSection() { return new StringPool(DexPool.this); }
typePool.internNullable(poolClassDef.getSuperclass()); typeListPool.intern(poolClassDef.getInterfaces()); stringPool.internNullable(poolClassDef.getSourceFile());
@Nonnull @Override public StringPool getStringSection() { return new StringPool(DexPool.this); }
public void internNullable(@Nullable CharSequence string) { if (string != null) { intern(string); } }
private void internDebug(@Nonnull Method method) { for (MethodParameter param: method.getParameters()) { String paramName = param.getName(); if (paramName != null) { stringPool.intern(paramName); } } MethodImplementation methodImpl = method.getImplementation(); if (methodImpl != null) { for (DebugItem debugItem: methodImpl.getDebugItems()) { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: StartLocal startLocal = (StartLocal)debugItem; stringPool.internNullable(startLocal.getName()); typePool.internNullable(startLocal.getType()); stringPool.internNullable(startLocal.getSignature()); break; case DebugItemType.SET_SOURCE_FILE: stringPool.internNullable(((SetSourceFile) debugItem).getSourceFile()); break; } } } }
dexPool.typeSection.internNullable(poolClassDef.getSuperclass()); dexPool.typeListSection.intern(poolClassDef.getInterfaces()); dexPool.stringSection.internNullable(poolClassDef.getSourceFile());
public static DexPool makeDexPool(int api) { StringPool stringPool = new StringPool(); TypePool typePool = new TypePool(stringPool); FieldPool fieldPool = new FieldPool(stringPool, typePool); TypeListPool typeListPool = new TypeListPool(typePool); ProtoPool protoPool = new ProtoPool(stringPool, typePool, typeListPool); MethodPool methodPool = new MethodPool(stringPool, typePool, protoPool); AnnotationPool annotationPool = new AnnotationPool(stringPool, typePool, fieldPool, methodPool); AnnotationSetPool annotationSetPool = new AnnotationSetPool(annotationPool); ClassPool classPool = new ClassPool(stringPool, typePool, fieldPool, methodPool, annotationSetPool, typeListPool); return new DexPool(api, stringPool, typePool, protoPool, fieldPool, methodPool, classPool, typeListPool, annotationPool, annotationSetPool); }
public void internNullable(@Nullable CharSequence string) { if (string != null) { intern(string); } }
private void internDebug(@Nonnull Method method) { for (MethodParameter param: method.getParameters()) { String paramName = param.getName(); if (paramName != null) { dexPool.stringSection.intern(paramName); } } MethodImplementation methodImpl = method.getImplementation(); if (methodImpl != null) { for (DebugItem debugItem: methodImpl.getDebugItems()) { switch (debugItem.getDebugItemType()) { case DebugItemType.START_LOCAL: StartLocal startLocal = (StartLocal)debugItem; dexPool.stringSection.internNullable(startLocal.getName()); dexPool.typeSection.internNullable(startLocal.getType()); dexPool.stringSection.internNullable(startLocal.getSignature()); break; case DebugItemType.SET_SOURCE_FILE: dexPool.stringSection.internNullable(((SetSourceFile) debugItem).getSourceFile()); break; } } } }
public void internNullable(@Nullable CharSequence string) { if (string != null) { intern(string); } }
public void intern(@Nonnull CharSequence type) { String typeString = type.toString(); Integer prev = internedItems.put(typeString, 0); if (prev == null) { dexPool.stringSection.intern(typeString); } }
public void intern(@Nonnull CharSequence type) { String typeString = type.toString(); Integer prev = internedItems.put(typeString, 0); if (prev == null) { dexPool.stringSection.intern(typeString); } }
public void intern(@Nonnull CharSequence type) { String typeString = type.toString(); Integer prev = internedItems.put(typeString, 0); if (prev == null) { stringPool.intern(typeString); } }
public void intern(@Nonnull MethodReference method) { Integer prev = internedItems.put(method, 0); if (prev == null) { typePool.intern(method.getDefiningClass()); protoPool.intern(method); stringPool.intern(method.getName()); } }
public void intern(@Nonnull FieldReference field) { Integer prev = internedItems.put(field, 0); if (prev == null) { dexPool.typeSection.intern(field.getDefiningClass()); dexPool.stringSection.intern(field.getName()); dexPool.typeSection.intern(field.getType()); } }
public void intern(@Nonnull FieldReference field) { Integer prev = internedItems.put(field, 0); if (prev == null) { typePool.intern(field.getDefiningClass()); stringPool.intern(field.getName()); typePool.intern(field.getType()); } }
public void intern(@Nonnull MethodProtoReference reference) { Integer prev = internedItems.put(reference, 0); if (prev == null) { dexPool.stringSection.intern(getShorty(reference)); dexPool.typeSection.intern(reference.getReturnType()); dexPool.typeListSection.intern(reference.getParameterTypes()); } }