super(adapters);
}
@Override
public InterfaceMethodDeclaration adapt(InterfaceMethodDeclarationContext context) {
InterfaceMethodDeclaration interfaceDeclaration = createNode(context);
TypeContext typeContext = getChild(context, TypeContext.class);
if (typeContext != null) {
interfaceDeclaration.setReturnType(getAdapter(TypeAdapter.class).adapt(typeContext));
} else {
TerminalNode voidNode = getTerminalNode(context, JavaParser.VOID);
if (voidNode != null) {
interfaceDeclaration.setReturnType(createNode(voidNode, VoidType.class));
}
}
TerminalNode identifierNode = getTerminalNode(context, JavaParser.Identifier);
if (identifierNode != null) {
interfaceDeclaration.setName(getAdapter(IdentifierAdapter.class).adapt(identifierNode));
}
FormalParametersContext formalParametersContext =
getChild(context, FormalParametersContext.class);
if (formalParametersContext != null) {
interfaceDeclaration.setFormalParameters(
getAdapter(FormalParametersAdapter.class).adapt(formalParametersContext));
}
interfaceDeclaration.setDimensions(getAdapter(ArrayDimensionsAdapter.class).adapt(context));
QualifiedNameListContext qualifiedNameListContext =
getChild(context, QualifiedNameListContext.class);
if (qualifiedNameListContext != null) {
interfaceDeclaration.setThrowsExceptions(
getAdapter(QualifiedNamesAdapter.class).adapt(qualifiedNameListContext));
}
return interfaceDeclaration;
}