Lines Matching defs:flav

430      * Semantically equivalent to 'flavorToNative.get(flav)'. This method
431 * handles the case where 'flav' is not found in 'flavorToNative' depending
437 private LinkedHashSet<String> flavorToNativeLookup(final DataFlavor flav,
440 LinkedHashSet<String> natives = getFlavorToNative().get(flav);
442 if (flav != null && !disabledMappingGenerationKeys.contains(flav)) {
446 desktopService.getPlatformMappingsForFlavor(flav);
462 String encoded = encodeDataFlavor(flav);
464 getFlavorToNative().put(flav, natives);
472 flavors.add(flav);
474 nativesForFlavorCache.remove(flav);
497 * @param flav the {@code DataFlavor} whose corresponding natives should be
508 public synchronized List<String> getNativesForFlavor(DataFlavor flav) {
509 LinkedHashSet<String> retval = nativesForFlavorCache.check(flav);
514 if (flav == null) {
516 } else if (disabledMappingGenerationKeys.contains(flav)) {
519 retval = flavorToNativeLookup(flav, false);
520 } else if (DataFlavorUtil.isFlavorCharsetTextType(flav)) {
525 if ("text".equals(flav.getPrimaryType())) {
527 getTextTypeToNative().get(flav.mimeType.getBaseType());
541 retval = flavorToNativeLookup(flav, true);
544 // listed for flav's MIME type were added with
546 retval.addAll(flavorToNativeLookup(flav, false));
548 } else if (DataFlavorUtil.isFlavorNoncharsetTextType(flav)) {
549 retval = getTextTypeToNative().get(flav.mimeType.getBaseType());
552 retval = flavorToNativeLookup(flav, true);
555 // listed for flav's MIME type were added with
557 retval.addAll(flavorToNativeLookup(flav, false));
560 retval = flavorToNativeLookup(flav, true);
563 nativesForFlavorCache.put(flav, retval);
817 DataFlavor flav = (flavors.isEmpty())? null : flavors.get(0);
818 retval.put(aNative, flav);
834 * @param flav the {@code DataFlavor} key for the mapping
836 * @throws NullPointerException if flav or nat is {@code null}
840 public synchronized void addUnencodedNativeForFlavor(DataFlavor flav,
843 Objects.requireNonNull(flav, "Null flavor not permitted");
845 LinkedHashSet<String> natives = getFlavorToNative().get(flav);
848 getFlavorToNative().put(flav, natives);
851 nativesForFlavorCache.remove(flav);
872 * @param flav the {@code DataFlavor} key for the mappings
874 * @throws NullPointerException if flav or natives is {@code null} or if
879 public synchronized void setNativesForFlavor(DataFlavor flav,
882 Objects.requireNonNull(flav, "Null flavors not permitted");
884 getFlavorToNative().remove(flav);
886 addUnencodedNativeForFlavor(flav, aNative);
888 disabledMappingGenerationKeys.add(flav);
889 nativesForFlavorCache.remove(flav);
903 * @param flav the {@code DataFlavor} value for the mapping
904 * @throws NullPointerException if {@code nat} or {@code flav} is
910 DataFlavor flav) {
912 Objects.requireNonNull(flav, "Null flavor not permitted");
919 flavors.add(flav);
1003 * @param flav the {@code DataFlavor} to encode
1004 * @return the encoded {@code String}, or {@code null} if {@code flav} is
1007 public static String encodeDataFlavor(DataFlavor flav) {
1008 return (flav != null)
1009 ? SystemFlavorMap.encodeJavaMIMEType(flav.getMimeType())