File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
src/main/java/org/scijava/text Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 3434import java .io .File ;
3535
3636import org .scijava .plugin .AbstractHandlerPlugin ;
37- import org .scijava .util .FileUtils ;
3837
3938/**
4039 * Abstract superclass of {@link TextFormat} implementations.
4443public abstract class AbstractTextFormat extends AbstractHandlerPlugin <File >
4544 implements TextFormat
4645{
47-
48- // -- Typed methods --
49-
50- @ Override
51- public boolean supports (final File file ) {
52- for (final String ext : getExtensions ()) {
53- if (FileUtils .getExtension (file ).equalsIgnoreCase (ext )) return true ;
54- }
55- return false ;
56- }
57-
58- @ Override
59- public Class <File > getType () {
60- return File .class ;
61- }
62-
46+ // NB: No implementation needed.
6347}
Original file line number Diff line number Diff line change 3636
3737import org .scijava .plugin .HandlerPlugin ;
3838import org .scijava .plugin .Plugin ;
39+ import org .scijava .util .FileUtils ;
3940
4041/**
4142 * {@code TextFormat} is a plugin that provides handling for a text markup
@@ -60,4 +61,19 @@ public interface TextFormat extends HandlerPlugin<File> {
6061 /** Expresses the given text string in HTML format. */
6162 String asHTML (String text );
6263
64+ // -- Typed methods --
65+
66+ @ Override
67+ default boolean supports (final File file ) {
68+ for (final String ext : getExtensions ()) {
69+ if (FileUtils .getExtension (file ).equalsIgnoreCase (ext )) return true ;
70+ }
71+ return false ;
72+ }
73+
74+ @ Override
75+ default Class <File > getType () {
76+ return File .class ;
77+ }
78+
6379}
You can’t perform that action at this time.
0 commit comments