use of org.apache.groovy.contracts.annotations.meta.ContractElement in project groovy by apache.
the class AnnotationProcessorVisitor method visitInterfaces.
private void visitInterfaces(final ClassNode classNode, final ClassNode[] interfaces) {
for (ClassNode interfaceClassNode : interfaces) {
List<MethodNode> methodNodes = new ArrayList<MethodNode>(interfaceClassNode.getMethods());
// @ContractElement annotations are by now only supported on method interfaces
for (MethodNode interfaceMethodNode : methodNodes) {
MethodNode implementingMethodNode = classNode.getMethod(interfaceMethodNode.getName(), interfaceMethodNode.getParameters());
if (implementingMethodNode == null)
continue;
final List<AnnotationNode> annotationNodes = AnnotationUtils.hasMetaAnnotations(interfaceMethodNode, ContractElement.class.getName());
handleInterfaceMethodNode(classNode, implementingMethodNode, annotationNodes);
}
visitInterfaces(classNode, interfaceClassNode.getInterfaces());
}
}
Aggregations