protected void validateProduces ( Collection < String > fathomContentTypes ) { Set < String > ignoreProduces = new TreeSet <> ( ) ; ignoreProduces . add ( Produces . TEXT ) ; ignoreProduces . add ( Produces . HTML ) ; ignoreProduces . add ( Produces . XHTML ) ; for ( String produces : declaredProduces ) { if ( ignoreProduces . contains ( produces ) ) { continue ; } if ( ! fathomContentTypes . contains ( produces ) ) { throw new FatalException ( "{} declares @{}(\"{}\") but there is no registered ContentTypeEngine for that type!" , Util . toString ( method ) , Produces . class . getSimpleName ( ) , produces ) ; } } }
Validates that the declared content - types can actually be generated by Fathom .