case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; writer.writeStartLocal(startLocal.getCodeAddress(), startLocal.getRegister(), startLocal.getName(), startLocal.getType(), startLocal.getSignature()); break;
case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal) debugItem; return new BuilderStartLocal(startLocal.getRegister(), (StringReference) convertReference(startLocal.getNameReference()), (TypeReference) convertReference(startLocal.getTypeReference()), (StringReference) convertReference(startLocal.getSignatureReference()));
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; } } } }
@Override public int getRegister() { return debugItem.getRegister(); }
@Override @Nullable public TypeReference getTypeReference() { TypeReference typeReference = debugItem.getTypeReference(); if (typeReference == null) { return null; } return RewriterUtils.rewriteTypeReference(rewriters.getTypeRewriter(), typeReference); }
@Override @Nullable public StringReference getSignatureReference() { return debugItem.getSignatureReference(); } }
@Override @Nullable public StringReference getNameReference() { return debugItem.getNameReference(); }
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; } } } }
@Override public int getRegister() { return debugItem.getRegister(); }
@Override @Nullable public TypeReference getTypeReference() { TypeReference typeReference = debugItem.getTypeReference(); if (typeReference == null) { return null; } return RewriterUtils.rewriteTypeReference(rewriters.getTypeRewriter(), typeReference); }
@Override @Nullable public StringReference getSignatureReference() { return debugItem.getSignatureReference(); } }
@Override @Nullable public StringReference getNameReference() { return debugItem.getNameReference(); }
@Nonnull public static ImmutableStartLocal of(@Nonnull StartLocal startLocal) { if (startLocal instanceof ImmutableStartLocal) { return (ImmutableStartLocal)startLocal; } return new ImmutableStartLocal( startLocal.getCodeAddress(), startLocal.getRegister(), startLocal.getName(), startLocal.getType(), startLocal.getSignature()); }
case DebugItemType.START_LOCAL: { StartLocal startLocal = (StartLocal)debugItem; return new BuilderStartLocal(startLocal.getRegister(), startLocal.getNameReference(), startLocal.getTypeReference(), startLocal.getSignatureReference());
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; } } } }
@Override public int getRegister() { return debugItem.getRegister(); }
@Override @Nullable public TypeReference getTypeReference() { TypeReference typeReference = debugItem.getTypeReference(); if (typeReference == null) { return null; } return RewriterUtils.rewriteTypeReference(rewriters.getTypeRewriter(), typeReference); }
@Override @Nullable public StringReference getSignatureReference() { return debugItem.getSignatureReference(); } }
@Override @Nullable public StringReference getNameReference() { return debugItem.getNameReference(); }
@Nonnull public static ImmutableStartLocal of(@Nonnull StartLocal startLocal) { if (startLocal instanceof ImmutableStartLocal) { return (ImmutableStartLocal)startLocal; } return new ImmutableStartLocal( startLocal.getCodeAddress(), startLocal.getRegister(), startLocal.getName(), startLocal.getType(), startLocal.getSignature()); }