/** * Returns an instance which is the result of merging the two * given instances, where one instance should have only type * descriptors and the other only type signatures. The merged * result is identical to the one with descriptors, except that * any element whose {name, index, start, length} matches an * element in the signature list gets augmented with the * corresponding signature. The result is immutable. * * @param descriptorList {@code non-null;} list with descriptors * @param signatureList {@code non-null;} list with signatures * @return {@code non-null;} the merged result */ public static LocalVariableList mergeDescriptorsAndSignatures( LocalVariableList descriptorList, LocalVariableList signatureList) { int descriptorSize = descriptorList.size(); LocalVariableList result = new LocalVariableList(descriptorSize); for (int i = 0; i < descriptorSize; i++) { Item item = descriptorList.get(i); Item signatureItem = signatureList.itemToLocal(item); if (signatureItem != null) { CstString signature = signatureItem.getSignature(); item = item.withSignature(signature); } result.set(i, item); } result.setImmutable(); return result; }
/** * Returns an instance which is the result of merging the two * given instances, where one instance should have only type * descriptors and the other only type signatures. The merged * result is identical to the one with descriptors, except that * any element whose {name, index, start, length} matches an * element in the signature list gets augmented with the * corresponding signature. The result is immutable. * * @param descriptorList {@code non-null;} list with descriptors * @param signatureList {@code non-null;} list with signatures * @return {@code non-null;} the merged result */ public static LocalVariableList mergeDescriptorsAndSignatures( LocalVariableList descriptorList, LocalVariableList signatureList) { int descriptorSize = descriptorList.size(); LocalVariableList result = new LocalVariableList(descriptorSize); for (int i = 0; i < descriptorSize; i++) { Item item = descriptorList.get(i); Item signatureItem = signatureList.itemToLocal(item); if (signatureItem != null) { CstString signature = signatureItem.getSignature(); item = item.withSignature(signature); } result.set(i, item); } result.setImmutable(); return result; }
/** * Returns an instance which is the result of merging the two * given instances, where one instance should have only type * descriptors and the other only type signatures. The merged * result is identical to the one with descriptors, except that * any element whose {name, index, start, length} matches an * element in the signature list gets augmented with the * corresponding signature. The result is immutable. * * @param descriptorList {@code non-null;} list with descriptors * @param signatureList {@code non-null;} list with signatures * @return {@code non-null;} the merged result */ public static LocalVariableList mergeDescriptorsAndSignatures( LocalVariableList descriptorList, LocalVariableList signatureList) { int descriptorSize = descriptorList.size(); LocalVariableList result = new LocalVariableList(descriptorSize); for (int i = 0; i < descriptorSize; i++) { Item item = descriptorList.get(i); Item signatureItem = signatureList.itemToLocal(item); if (signatureItem != null) { CstString signature = signatureItem.getSignature(); item = item.withSignature(signature); } result.set(i, item); } result.setImmutable(); return result; }
/** * Returns an instance which is the result of merging the two * given instances, where one instance should have only type * descriptors and the other only type signatures. The merged * result is identical to the one with descriptors, except that * any element whose {name, index, start, length} matches an * element in the signature list gets augmented with the * corresponding signature. The result is immutable. * * @param descriptorList {@code non-null;} list with descriptors * @param signatureList {@code non-null;} list with signatures * @return {@code non-null;} the merged result */ public static LocalVariableList mergeDescriptorsAndSignatures( LocalVariableList descriptorList, LocalVariableList signatureList) { int descriptorSize = descriptorList.size(); LocalVariableList result = new LocalVariableList(descriptorSize); for (int i = 0; i < descriptorSize; i++) { Item item = descriptorList.get(i); Item signatureItem = signatureList.itemToLocal(item); if (signatureItem != null) { CstString signature = signatureItem.getSignature(); item = item.withSignature(signature); } result.set(i, item); } result.setImmutable(); return result; }
/** * Returns an instance which is the result of merging the two * given instances, where one instance should have only type * descriptors and the other only type signatures. The merged * result is identical to the one with descriptors, except that * any element whose {name, index, start, length} matches an * element in the signature list gets augmented with the * corresponding signature. The result is immutable. * * @param descriptorList {@code non-null;} list with descriptors * @param signatureList {@code non-null;} list with signatures * @return {@code non-null;} the merged result */ public static LocalVariableList mergeDescriptorsAndSignatures( LocalVariableList descriptorList, LocalVariableList signatureList) { int descriptorSize = descriptorList.size(); LocalVariableList result = new LocalVariableList(descriptorSize); for (int i = 0; i < descriptorSize; i++) { Item item = descriptorList.get(i); Item signatureItem = signatureList.itemToLocal(item); if (signatureItem != null) { CstString signature = signatureItem.getSignature(); item = item.withSignature(signature); } result.set(i, item); } result.setImmutable(); return result; }
/** * Returns an instance which is the result of merging the two * given instances, where one instance should have only type * descriptors and the other only type signatures. The merged * result is identical to the one with descriptors, except that * any element whose {name, index, start, length} matches an * element in the signature list gets augmented with the * corresponding signature. The result is immutable. * * @param descriptorList {@code non-null;} list with descriptors * @param signatureList {@code non-null;} list with signatures * @return {@code non-null;} the merged result */ public static LocalVariableList mergeDescriptorsAndSignatures( LocalVariableList descriptorList, LocalVariableList signatureList) { int descriptorSize = descriptorList.size(); LocalVariableList result = new LocalVariableList(descriptorSize); for (int i = 0; i < descriptorSize; i++) { Item item = descriptorList.get(i); Item signatureItem = signatureList.itemToLocal(item); if (signatureItem != null) { CstUtf8 signature = signatureItem.getSignature(); item = item.withSignature(signature); } result.set(i, item); } result.setImmutable(); return result; }