Sets the interfaces implemented by this ClassNode. If this ClassNode has a redirect, the interfaces are set on the redirect instead. Updates the generics usage indicator if any interface uses generics and this is a primary ClassNode. @param interfaces an array of ClassNode represent
(final ClassNode[] interfaces)
| 598 | * @see #isUsingGenerics() |
| 599 | */ |
| 600 | public void setInterfaces(final ClassNode[] interfaces) { |
| 601 | if (redirect != null) { |
| 602 | redirect.setInterfaces(interfaces); |
| 603 | } else { |
| 604 | this.interfaces = interfaces; |
| 605 | // GROOVY-10763: update generics indicator |
| 606 | if (interfaces != null && !usesGenerics && isPrimaryNode) { |
| 607 | for (ClassNode anInterface : interfaces) { |
| 608 | usesGenerics |= anInterface.isUsingGenerics(); |
| 609 | } |
| 610 | } |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | /** |
| 615 | * @return the mixins associated with this {@code ClassNode} |