Lines Matching refs:natives

53  * The SystemFlavorMap is a configurable map between "natives" (Strings), which
165 * SoftReferences which reference Lists of String natives.
170 * Caches the result getFlavorsForNative(). Maps String natives to
177 * to the DataFlavors and String natives for which the mappings have been
403 // DataFlavor itself for any text natives (even
579 List natives = (List)getFlavorToNative().get(flavor);
580 if (natives == null) {
581 natives = new ArrayList(1);
582 getFlavorToNative().put(flavor, natives);
584 natives.add(nat);
603 List natives = (List)getFlavorToNative().get(flav);
611 if (natives != null) {
612 platformNatives.removeAll(new HashSet(natives));
614 // that the natives added with
617 platformNatives.addAll(natives);
619 natives = platformNatives;
624 if (natives == null) {
627 natives = new ArrayList(1);
628 getFlavorToNative().put(flav, natives);
629 natives.add(encoded);
642 natives = new ArrayList(0);
646 return natives;
650 * Returns a <code>List</code> of <code>String</code> natives to which the
663 * @param flav the <code>DataFlavor</code> whose corresponding natives
665 * natives currently known to the data transfer subsystem are
706 // Also include text/plain natives, but don't duplicate Strings
725 // In this branch it is guaranteed that natives explicitly
748 // In this branch it is guaranteed that natives explicitly
820 List natives = getNativesForFlavor(null);
821 HashSet dups = new HashSet(natives.size());
823 for (Iterator natives_iter = natives.iterator();
923 // Non-charset text natives should be treated as
968 * <code>String</code> natives will be returned.
970 * <code>String</code> natives
978 // Use getNativesForFlavor to generate extra natives for text flavors
989 List natives = getNativesForFlavor(flavors[i]);
990 String nat = (natives.isEmpty()) ? null : (String)natives.get(0);
998 * Returns a <code>Map</code> of the specified <code>String</code> natives
1010 * @param natives an array of <code>String</code>s which will be the
1012 * specified, a mapping of all supported <code>String</code> natives
1015 * @return a <code>java.util.Map</code> of <code>String</code> natives to
1022 getFlavorsForNatives(String[] natives)
1024 // Use getFlavorsForNative to generate extra flavors for text natives
1026 if (natives == null) {
1028 natives = new String[native_list.size()];
1029 native_list.toArray(natives);
1032 HashMap retval = new HashMap(natives.length, 1.0f);
1033 for (int i = 0; i < natives.length; i++) {
1034 List flavors = getFlavorsForNative(natives[i]);
1037 retval.put(natives[i], flav);
1069 List natives = (List)getFlavorToNative().get(flav);
1070 if (natives == null) {
1071 natives = new ArrayList(1);
1072 getFlavorToNative().put(flav, natives);
1073 } else if (natives.contains(nat)) {
1076 natives.add(nat);
1085 * specified <code>String</code> natives.
1087 * established in one direction, and the natives will not be encoded. To
1090 * priority mapping. Subsequent natives will represent mappings of
1094 * <code>String</code> natives, this method will establish new mappings
1102 * @param natives the <code>String</code> native values for the mappings
1103 * @throws NullPointerException if flav or natives is <code>null</code>
1104 * or if natives contains <code>null</code> elements
1110 String[] natives) {
1111 if (flav == null || natives == null) {
1116 for (int i = 0; i < natives.length; i++) {
1117 addUnencodedNativeForFlavor(flav, natives[i]);
1120 // Clear the cache to handle the case of empty natives.
1165 * mappings will only be established in one direction, and the natives need