• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / jmockit1 / 496

15 Nov 2025 05:33PM UTC coverage: 72.192% (-0.008%) from 72.2%
496

push

github

web-flow
Merge pull request #412 from hazendaz/renovate/major-spring-core

Update spring core to v7 (major)

5677 of 8360 branches covered (67.91%)

Branch coverage included in aggregate %.

11922 of 16018 relevant lines covered (74.43%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

68.0
/main/src/main/java/mockit/asm/util/MethodHandle.java
1
/*
2
 * MIT License
3
 * Copyright (c) 2006-2025 JMockit developers
4
 * See LICENSE file for full license text.
5
 */
6
package mockit.asm.util;
7

8
import edu.umd.cs.findbugs.annotations.NonNull;
9

10
import org.checkerframework.checker.index.qual.NonNegative;
11

12
/**
13
 * A reference to a method.
14
 */
15
public final class MethodHandle {
16
    public interface Tag {
17
        int TAG_GETFIELD = 1;
18
        int TAG_GETSTATIC = 2;
19
        int TAG_PUTFIELD = 3;
20
        int TAG_PUTSTATIC = 4;
21
        int TAG_INVOKEVIRTUAL = 5;
22
        int TAG_INVOKESTATIC = 6;
23
        int TAG_INVOKESPECIAL = 7;
24
        int TAG_NEWINVOKESPECIAL = 8;
25
        int TAG_INVOKEINTERFACE = 9;
26
    }
27

28
    /**
29
     * The kind of method designated by this handle. Should be one of the {@link Tag Tag} constants.
30
     */
31
    @NonNegative
32
    public final int tag;
33

34
    /**
35
     * The internal name of the class that owns the method designated by this handle.
36
     */
37
    @NonNull
38
    public final String owner;
39

40
    /**
41
     * The name of the method designated by this handle.
42
     */
43
    @NonNull
44
    public final String name;
45

46
    /**
47
     * The descriptor of the method designated by this handle.
48
     */
49
    @NonNull
50
    public final String desc;
51

52
    /**
53
     * Initializes a new method handle.
54
     *
55
     * @param tag
56
     *            the kind of method designated by this handle. Must be one of the {@link Tag} constants.
57
     * @param owner
58
     *            the internal name of the class that owns the method designated by this handle.
59
     * @param name
60
     *            the name of the method designated by this handle.
61
     * @param desc
62
     *            the descriptor of the method designated by this handle.
63
     */
64
    public MethodHandle(@NonNegative int tag, @NonNull String owner, @NonNull String name, @NonNull String desc) {
1✔
65
        this.tag = tag;
1✔
66
        this.owner = owner;
1✔
67
        this.name = name;
1✔
68
        this.desc = desc;
1✔
69
    }
1✔
70

71
    @Override
72
    public boolean equals(Object obj) {
73
        if (obj == this) {
1!
74
            return true;
×
75
        }
76

77
        if (!(obj instanceof MethodHandle)) {
1!
78
            return false;
×
79
        }
80

81
        MethodHandle h = (MethodHandle) obj;
1✔
82
        return tag == h.tag && owner.equals(h.owner) && name.equals(h.name) && desc.equals(h.desc);
1!
83
    }
84

85
    @Override
86
    public int hashCode() {
87
        return tag + owner.hashCode() * name.hashCode() * desc.hashCode();
1✔
88
    }
89
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc