use of org.jf.dexlib2.immutable.debug.ImmutableRestartLocal in project atlas by alibaba.
the class InsTructionsReIClassDef method reDebugItem.
@Override
protected Iterable<? extends DebugItem> reDebugItem(Iterable<? extends DebugItem> debugItems) {
if (debugItems == null) {
return null;
}
Iterator iterator = debugItems.iterator();
final List<DebugItem> immableDebugItems = new ArrayList<DebugItem>();
while (iterator.hasNext()) {
DebugItem debugItem = (DebugItem) iterator.next();
if (debugItem instanceof ImmutableStartLocal) {
String newType = null;
String type = ((ImmutableStartLocal) debugItem).getType();
if (!basicType.containsKey(type)) {
newType = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(type)).className, type.startsWith("["));
} else
newType = type;
immableDebugItems.add(new ImmutableStartLocal(debugItem.getCodeAddress(), ((ImmutableStartLocal) debugItem).getRegister(), ((ImmutableStartLocal) debugItem).getName(), newType, ((ImmutableStartLocal) debugItem).getSignature()));
} else if (debugItem instanceof ImmutableEndLocal) {
String newType = null;
String type = ((ImmutableEndLocal) debugItem).getType();
if (!basicType.containsKey(type)) {
newType = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(type)).className, type.startsWith("["));
} else
newType = type;
immableDebugItems.add(new ImmutableEndLocal(debugItem.getCodeAddress(), ((ImmutableEndLocal) debugItem).getRegister(), ((ImmutableEndLocal) debugItem).getName(), newType, ((ImmutableEndLocal) debugItem).getSignature()));
} else if (debugItem instanceof ImmutableRestartLocal) {
String newType = null;
String type = ((ImmutableRestartLocal) debugItem).getType();
if (!basicType.containsKey(type)) {
newType = DefineUtils.getDefineClassName(classProcessor.classProcess(DefineUtils.getDalvikClassName(type)).className, type.startsWith("["));
} else
newType = type;
immableDebugItems.add(new ImmutableRestartLocal(debugItem.getCodeAddress(), ((ImmutableRestartLocal) debugItem).getRegister(), ((ImmutableRestartLocal) debugItem).getName(), newType, ((ImmutableRestartLocal) debugItem).getSignature()));
} else
immableDebugItems.add(debugItem);
}
return new Iterable<DebugItem>() {
@Override
public Iterator<DebugItem> iterator() {
return immableDebugItems.iterator();
}
};
}
Aggregations