Helper method to build suitable fileNames.

@param names different names to be combined
@return a String for a suitable file name
19516
private String buildFileName(final String... names) {
        final StringBuilder builder = new StringBuilder();
        for (int i = 0; i < names.length; i++) {
            builder.append(names[i]);
            if (i < names.length - 1) {
                builder.append(SEPARATOR);
            }
        }
        builder.append(".").append("csv");
        return builder.toString();
    }
506966
public void processSource(String[] filenames)
    {
        for (int i = 0; i != filenames.length; ++i) {
            String filename = filenames[i];
            if (!filename.endsWith(".js")) {
                addError("msg.extension.not.js", filename);
                return;
            }
            File f = new File(filename);
            String source = readSource(f);
            if (source == null) return;

            String mainClassName = targetName;
            if (mainClassName == null) {
                String name = f.getName();
                String nojs = name.substring(0, name.length() - 3);
                mainClassName = getClassName(nojs);
            }
            if (targetPackage.length() != 0) {
                mainClassName = targetPackage+"."+mainClassName;
            }

            Object[] compiled
                = compiler.compileToClassFiles(source, filename, 1,
                                               mainClassName);
            if (compiled == null || compiled.length == 0) {
                return;
            }

            File targetTopDir = null;
            if (destinationDir != null) {
                targetTopDir = new File(destinationDir);
            } else {
                String parent = f.getParent();
                if (parent != null) {
                    targetTopDir = new File(parent);
                }
            }
            for (int j = 0; j != compiled.length; j += 2) {
                String className = (String)compiled[j];
                byte[] bytes = (byte[])compiled[j + 1];
                File outfile = getOutputFile(targetTopDir, className);
                try {
                    FileOutputStream os = new FileOutputStream(outfile);
                    try {
                        os.write(bytes);
                    } finally {
                        os.close();
                    }
                } catch (IOException ioe) {
                    addFormatedError(ioe.toString());
                }
            }
        }
    }
149216
public JsonModelBuilder<T> rm(String... names) {
		for (String name : names) {
			rmSub(name);
		}
		return this;
	}
1289279
public ListDomainNamesResult withDomainNames(java.util.Map<String, String> domainNames) {
        setDomainNames(domainNames);
        return this;
    }
1312905
public boolean add(String fileName) {
      writeLock.lock();
      try {
         return filenames.add(fileName);
      } finally {
         writeLock.unlock();
      }
   }
948443
protected String toFilename(QualifiedName name, String separator) {
		final List<String> segments = name.getSegments();
		if (segments.isEmpty()) {
			return ""; //$NON-NLS-1$
		}
		final StringBuilder builder = new StringBuilder();
		builder.append(name.toString(separator));
		builder.append(getFilenameExtension());
		return builder.toString();
	}
998512
private String getFileName(String name) {
        //check if the environment is linux or windows
        if (name.contains(Constants.FORWARD_SLASH)) {
            name = name.substring(name.lastIndexOf(Constants.FORWARD_SLASH) + 1, name.length());
        } else if (name.contains(Constants.BACK_SLASH)) {
            name = name.substring(name.lastIndexOf(Constants.BACK_SLASH) + 1, name.length());
        }
        return name;
    }
651029
public void setNames(java.util.Collection<String> names) {
        if (names == null) {
            this.names = null;
            return;
        }

        this.names = new com.amazonaws.internal.SdkInternalList<String>(names);
    }
371862
public TemplateFilter nameContains(String... names) {
        allItemsNotNull(names, "Name substrings");

        predicate = predicate.and(combine(
            TemplateMetadata::getName, in(asList(names), Predicates::containsIgnoreCase)
            ));

        return this;
    }
52666
public Map<String,InputStream> loadLinkedWorkbooks(String[] fileNames) throws IOException {
	HashMap<String,InputStream> result = new HashMap<>();
	if (fileNames==null) {
		return result;
	}
	for (String currentFile: fileNames) {
		Path currentPath=new Path(currentFile);
		InputStream currentInputStream = openFile(currentPath);
		result.put(currentPath.getName(), currentInputStream); 
	}
	return result;
}
1362723
public static String name(String name, String... names) {
        final StringBuilder builder = new StringBuilder();
        append(builder, name);
        if (names != null) {
            for (String s : names) {
                append(builder, s);
            }
        }
        return builder.toString();
    }
924608
public String generateName(String name) {
    checkName(name);
    names.add(name);
    int count = names.count(name);
    if (count == 1) {
      return name;
    }
    return name + collisionSeparator + (count - 1);
  }
1327700
public LoadBalancerFilter names(String... names) {
        allItemsNotNull(names, "Load balancer names");

        predicate = predicate.and(combine(
            LoadBalancerMetadata::getName, in(names)
        ));

        return this;
    }
785210
public com.google.protobuf.ByteString
      getFilenameBytes() {
    java.lang.Object ref = filename_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      filename_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
1180378
public static FileBatch forFiles(List<File> files) throws IOException {
        List<String> origPaths = new ArrayList<>(files.size());
        List<byte[]> bytes = new ArrayList<>(files.size());
        for (File f : files) {
            bytes.add(FileUtils.readFileToByteArray(f));
            origPaths.add(f.toURI().toString());
        }
        return new FileBatch(bytes, origPaths);
    }
980851
public GroupFilter names(String... names) {
        checkNotNull(names, "Name match criteria must be not a null");

        predicate = predicate.and(combine(
            GroupMetadata::getName, in(asList(names), Predicates::containsIgnoreCase)
        ));

        return this;
    }
727959
public static String toFileName(String name) {
		char[] charArray = name.toCharArray();
		StringBuilder builder = new StringBuilder();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i]) && i > 0 && !Character.isUpperCase(charArray[i - 1])) {
				builder.append('.');
			}
			builder.append(Character.toLowerCase(charArray[i]));
		}
		return builder.toString();
	}