super(adapters);
}
@Override
public AnnotationMethodDeclaration adapt(AnnotationMethodRestContext context) {
AnnotationMethodDeclaration annotationMethodDeclaration = createNode(context);
TerminalNode identifierNode = getTerminalNode(context, JavaParser.Identifier);
if (identifierNode != null) {
annotationMethodDeclaration.setName(
getAdapter(IdentifierAdapter.class).adapt(identifierNode));
}
DefaultValueContext defaultValueContext = getChild(context, DefaultValueContext.class);
if (defaultValueContext != null) {
ElementValueContext elementValueContext =
getChild(defaultValueContext, ElementValueContext.class);
if (elementValueContext != null) {
annotationMethodDeclaration.setDefaultValue(
getAdapter(ElementValueAdapter.class).adapt(elementValueContext));
}
}
return annotationMethodDeclaration;