code: private ResourceModel processModel(final ResourceModel resourceModel, final boolean subResourceModel) {
          ResourceModel.Builder newModelBuilder = processTemplateAnnotatedInvocables(resourceModel, subResourceModel);
  
          for (RuntimeResource resource : resourceModel.getRuntimeResourceModel().getRuntimeResources()) {
              ModelProcessorUtil.enhanceResource(resource, newModelBuilder, getEnhancingMethods(resource), false);
          }
  
          return newModelBuilder.build();
      }
docs: Enhance {@link org.glassfish.jersey.server.model.RuntimeResource runtime resources} of given
  {@link org.glassfish.jersey.server.model.ResourceModel resource model} with methods obtained with
  {@link #getEnhancingMethods(org.glassfish.jersey.server.model.RuntimeResource)}.
  
  @param resourceModel    resource model to enhance runtime resources of.
  @param subResourceModel determines whether the resource model represents sub-resource.
  @return enhanced resource model.