preprocessorconfiguration.java

来自「plugin for eclipse」· Java 代码 · 共 165 行

JAVA
165
字号
package isis.anp.preprocessor;

import isis.commons.fs.SearchPath;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;


public class PreprocessorConfiguration {
	List nesCIncludes = new ArrayList();
	List nesCIncludesCanonicalPaths = null;
	boolean warnings = true;
	String cppExecutable = null;
	List cppOptions = new ArrayList();
	boolean debug = true;
	String tempDir = "";
	boolean verbose = true;
	SearchPath searchPath = new SearchPath();
	Map defines = new HashMap();
	
	/**
	 * Get the list containing the canonical paths of the nesc includes
	 * @return list of canonical paths of nesc includes
	 * @throws IOException thrown if any of the files not find on the search path.
	 */
	public List getNesCIncludesCanonicalPaths() throws IOException {
		if(nesCIncludesCanonicalPaths==null) {
			nesCIncludesCanonicalPaths = updateNesCIncludesCanonicalPaths();
		}
		
		return nesCIncludesCanonicalPaths;
	}
	
	/**
	 * Update the list containing the canonical paths of the nesc includes
	 * @return list of canonical paths of nesc includes
	 * @throws IOException thrown if any of the files not find on the search path.
	 */
	public List updateNesCIncludesCanonicalPaths() throws IOException {
		if(searchPath==null) return null;
		
		List rval = new ArrayList();
		Iterator i = nesCIncludes.iterator();
		while (i.hasNext()) {
			String s = (String) i.next();
			rval.add(getSearchPath().getCanonicalPath(s));
		}
		
		return rval;
	}
	
	/**
	 * @return Returns the cppExecutable.
	 */
	public String getCppExecutable() {
		return cppExecutable;
	}
	/**
	 * @param cppExecutable The cppExecutable to set.
	 */
	public void setCppExecutable(String cppExecutable) {
		this.cppExecutable = cppExecutable;
	}
	/**
	 * @return Returns the cppOptions.
	 */
	public List getCppOptions() {
		return cppOptions;
	}
	/**
	 * @param cppOptions The cppOptions to set.
	 */
	public void setCppOptions(List cppOptions) {
		this.cppOptions = cppOptions;
	}
	/**
	 * @return Returns the debug.
	 */
	public boolean isDebug() {
		return debug;
	}
	/**
	 * @param debug The debug to set.
	 */
	public void setDebug(boolean debug) {
		this.debug = debug;
	}
	/**
	 * @return Returns the defines.
	 */
	public Map getDefines() {
		return defines;
	}
	/**
	 * @param defines The defines to set.
	 */
	public void setDefines(Map defines) {
		this.defines = defines;
	}
	/**
	 * @return Returns the nesCIncludes.
	 */
	public List getNesCIncludes() {
		return nesCIncludes;
	}
	/**
	 * @param nesCIncludes The nesCIncludes to set.
	 */
	public void setNesCIncludes(List nesCIncludes) {
		this.nesCIncludes = nesCIncludes;
	}
	/**
	 * @return Returns the searchPath.
	 */
	public SearchPath getSearchPath() {
		return searchPath;
	}
	/**
	 * @param searchPath The searchPath to set.
	 */
	public void setSearchPath(SearchPath searchPath) {
		this.searchPath = searchPath;
	}
	/**
	 * @return Returns the tempDir.
	 */
	public String getTempDir() {
		return tempDir;
	}
	/**
	 * @param tempDir The tempDir to set.
	 */
	public void setTempDir(String tempDir) {
		this.tempDir = tempDir;
	}
	/**
	 * @return Returns the verbose.
	 */
	public boolean isVerbose() {
		return verbose;
	}
	/**
	 * @param verbose The verbose to set.
	 */
	public void setVerbose(boolean verbose) {
		this.verbose = verbose;
	}
	/**
	 * @return Returns the warnings.
	 */
	public boolean isWarnings() {
		return warnings;
	}
	/**
	 * @param warnings The warnings to set.
	 */
	public void setWarnings(boolean warnings) {
		this.warnings = warnings;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?