Lines Matching defs:natives

49  * The SystemFlavorMap is a configurable map between "natives" (Strings), which
167 * SoftReferences which reference LinkedHashSet of String natives.
172 * Caches the result getFlavorsForNative(). Maps String natives to
179 * to the DataFlavors and String natives for which the mappings have been
251 // DataFlavor itself for any text natives (even
416 LinkedHashSet<String> natives = getFlavorToNative().get(flavor);
417 if (natives == null) {
418 natives = new LinkedHashSet<>(1);
419 getFlavorToNative().put(flavor, natives);
421 natives.add(nat);
440 LinkedHashSet<String> natives = getFlavorToNative().get(flav);
448 if (natives != null) {
450 // that the natives added with
453 platformNatives.addAll(natives);
455 natives = platformNatives;
460 if (natives == null) {
463 natives = new LinkedHashSet<>(1);
464 getFlavorToNative().put(flav, natives);
465 natives.add(encoded);
477 natives = new LinkedHashSet<>(0);
481 return new LinkedHashSet<>(natives);
485 * Returns a {@code List} of {@code String} natives to which the specified
497 * @param flav the {@code DataFlavor} whose corresponding natives should be
498 * returned. If {@code null} is specified, all natives currently
533 // Also include text/plain natives, but don't duplicate Strings
543 // In this branch it is guaranteed that natives explicitly
554 // In this branch it is guaranteed that natives explicitly
705 // Non-charset text natives should be treated as
754 * subsystem to their most preferred {@code String} natives will be
757 * natives
764 // Use getNativesForFlavor to generate extra natives for text flavors
775 List<String> natives = getNativesForFlavor(flavor);
776 String nat = (natives.isEmpty()) ? null : natives.get(0);
784 * Returns a {@code Map} of the specified {@code String} natives to their
795 * @param natives an array of {@code String}s which will be the key set of
797 * of all supported {@code String} natives to their most preferred
799 * @return a {@code java.util.Map} of {@code String} natives to
805 public synchronized Map<String,DataFlavor> getFlavorsForNatives(String[] natives)
807 // Use getFlavorsForNative to generate extra flavors for text natives
808 if (natives == null) {
810 natives = new String[nativesList.size()];
811 nativesList.toArray(natives);
814 Map<String, DataFlavor> retval = new HashMap<>(natives.length, 1.0f);
815 for (String aNative : natives) {
845 LinkedHashSet<String> natives = getFlavorToNative().get(flav);
846 if (natives == null) {
847 natives = new LinkedHashSet<>(1);
848 getFlavorToNative().put(flav, natives);
850 natives.add(nat);
857 * creates new mappings to the specified {@code String} natives. Unlike
859 * direction, and the natives will not be encoded. To establish two-way
861 * the array will represent the highest priority mapping. Subsequent natives
865 * {@code String} natives, this method will establish new mappings for the
873 * @param natives the {@code String} native values for the mappings
874 * @throws NullPointerException if flav or natives is {@code null} or if
875 * natives contains {@code null} elements
880 String[] natives) {
881 Objects.requireNonNull(natives, "Null natives not permitted");
885 for (String aNative : natives) {
927 * direction, and the natives need not be encoded. To establish two-way