Adds an interface to the list of interfaces implemented by this ClassNode. If the interface is already implemented, this method has no effect. The interface is appended to the end of the current interfaces array. @param node the ClassNode representing the interface to add @see #getI
(ClassNode node)
| 684 | * @see #setInterfaces(ClassNode[]) |
| 685 | */ |
| 686 | public void addInterface(ClassNode node) { |
| 687 | ClassNode[] interfaces = getInterfaces(); |
| 688 | for (ClassNode face : interfaces) { |
| 689 | if (face.equals(node)) return; |
| 690 | } |
| 691 | final int n = interfaces.length; |
| 692 | |
| 693 | System.arraycopy(interfaces, 0, interfaces = new ClassNode[n + 1], 0, n); |
| 694 | interfaces[n] = node; // append interface |
| 695 | setInterfaces(interfaces); |
| 696 | } |
| 697 | |
| 698 | public void addMixin(MixinNode node) { |
| 699 | // let's check if it already uses a mixin |
no test coverage detected