super(adapters);
}
@Override
public FieldDeclaration adapt(FieldDeclarationContext context) {
FieldDeclaration fieldDeclaration = createNode(context);
TypeContext typeContext = getChild(context, TypeContext.class);
if (typeContext != null) {
fieldDeclaration.setType(getAdapter(TypeAdapter.class).adapt(typeContext));
}
VariableDeclaratorsContext variableDeclaratorsContext =
getChild(context, VariableDeclaratorsContext.class);
if (variableDeclaratorsContext != null) {
fieldDeclaration.setVariableDeclarations(
getAdapter(VariableDeclaratorsAdapter.class).adapt(variableDeclaratorsContext,
fieldDeclaration.getType(), typeContext));
}
return fieldDeclaration;
}