1
2
3
4
5
6 package mockit.asm.constantPool;
7
8 import edu.umd.cs.findbugs.annotations.NonNull;
9
10 import mockit.asm.jvmConstants.ConstantPoolTypes;
11
12 import org.checkerframework.checker.index.qual.NonNegative;
13
14 public final class DynamicItem extends TypeOrMemberItem {
15 @NonNegative
16 int bsmIndex;
17
18 public DynamicItem(@NonNegative int index) {
19 super(index);
20 }
21
22 DynamicItem(@NonNegative int index, @NonNull DynamicItem item) {
23 super(index, item);
24 bsmIndex = item.bsmIndex;
25 }
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 public void set(int type, @NonNull String name, @NonNull String desc, @NonNegative int index) {
41 super.type = type;
42 bsmIndex = index;
43 setValuesAndHashcode(name, desc, index);
44 }
45
46 @Override
47 boolean isEqualTo(@NonNull Item item) {
48 DynamicItem other = (DynamicItem) item;
49 return other.bsmIndex == bsmIndex && isEqualTo(other);
50 }
51 }