code: private void createEnhancingMethods(final Class<?> resourceClass, final Object resourceInstance,
                                          final List<ModelProcessorUtil.Method> newMethods) {
          final Template template = resourceClass.getAnnotation(Template.class);
  
          if (template != null) {
              final Class<?> annotatedResourceClass = ModelHelper.getAnnotatedResourceClass(resourceClass);
  
              final List<MediaType> produces = MediaTypes
                      .createQualitySourceMediaTypes(annotatedResourceClass.getAnnotation(Produces.class));
              final List<MediaType> consumes = MediaTypes.createFrom(annotatedResourceClass.getAnnotation(Consumes.class));
  
              final TemplateInflectorImpl inflector = new TemplateInflectorImpl(template.name(),
                      resourceClass, resourceInstance);
  
              newMethods.add(new ModelProcessorUtil.Method(HttpMethod.GET, consumes, produces, inflector));
              newMethods.add(new ModelProcessorUtil.Method(IMPLICIT_VIEW_PATH_PARAMETER_TEMPLATE, HttpMethod.GET,
                      consumes, produces, inflector));
          }
      }
docs: Creates enhancing methods for given resource.
  
  @param resourceClass    resource class for which enhancing methods should be created.
  @param resourceInstance resource instance for which enhancing methods should be created. May be {@code null}.
  @param newMethods       list to store new methods into.