public Resource apply(ResourceContext context) {
Resource resource = createNode(context, Resource.class);
setModifiers(context, resource);
ClassOrInterfaceTypeContext classOrInterfaceTypeContext =
getChild(context, ClassOrInterfaceTypeContext.class);
if (classOrInterfaceTypeContext != null) {
resource.setType(
getAdapter(ClassOrInterfaceTypeAdapter.class).adapt(
classOrInterfaceTypeContext));