Collection<File> () { switch (myType) { case TEXTMATE -> { return getFilesInBundle("Preferences", PREFERENCE_FILES_FILTER); } case SUBLIME -> { return getFilesInBundle("", PREFERENCE_FILES_FILTER); } } throw new IllegalArgumentException("Only textmate and sublime bundles are supported. Use TextMateBundleReader instead."); }