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 ) ) ; } }
Creates enhancing methods for given resource .