/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } 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) { 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; }
list.set(i, startPc, length, name, descriptor, signature, index);
list.set(i, startPc, length, name, descriptor, signature, index);
list.set(i, startPc, length, name, descriptor, signature, index);
list.set(i, startPc, length, name, descriptor, signature, index);
list.set(i, startPc, length, name, descriptor, signature, index);
list.set(i, startPc, length, name, descriptor, signature, index);