@Test public void testSupportTypes() throws Exception { Set<MediaType> supportedTypes = sourceCodeParser.getSupportedTypes(new ParseContext()); assertTrue(supportedTypes.contains(new MediaType("text", "x-java-source"))); assertTrue(supportedTypes.contains(new MediaType("text", "x-groovy"))); assertTrue(supportedTypes.contains(new MediaType("text", "x-c++src"))); assertFalse(sourceCodeParser.getSupportedTypes(new ParseContext()).contains(new MediaType("text", "html"))); }
@Override public Set<MediaType> getSupportedTypes(ParseContext context) { return TYPES_TO_RENDERER.keySet(); }
SourceCodeParser extends AbstractEncodingDetectorParser { @Override public Set<MediaType> getSupportedTypes(ParseContext context) { return TYPES_TO_RENDERER.keySet(); } }
SourceCodeParser extends AbstractEncodingDetectorParser { @Override public Set<MediaType> getSupportedTypes(ParseContext context) { return TYPES_TO_RENDERER.keySet(); } SourceCodeParser();  SourceCodeParser(EncodingDetector encodingDetector); }
SourceCodeParser extends AbstractEncodingDetectorParser { @Override public Set<MediaType> getSupportedTypes(ParseContext context) { return TYPES_TO_RENDERER.keySet(); } SourceCodeParser();  SourceCodeParser(EncodingDetector encodingDetector); @Override Set<MediaType> getSupportedTypes(ParseContext context); @Override void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context); }
SourceCodeParser extends AbstractEncodingDetectorParser { @Override public Set<MediaType> getSupportedTypes(ParseContext context) { return TYPES_TO_RENDERER.keySet(); } SourceCodeParser();  SourceCodeParser(EncodingDetector encodingDetector); @Override Set<MediaType> getSupportedTypes(ParseContext context); @Override void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context);  }