本文整理汇总了Java中com.sun.squawk.builder.platform.Platform类的典型用法代码示例。如果您正苦于以下问题:Java Platform类的具体用法?Java Platform怎么用?Java Platform使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Platform类属于com.sun.squawk.builder.platform包,在下文中一共展示了Platform类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JDK
import com.sun.squawk.builder.platform.Platform; //导入依赖的package包/类
/**
* Creates an instance through which the tools of a JDK can be accessed.
*
* @param platform the host platform
*/
public JDK(Platform platform) {
File home = new File(System.getProperty("java.home"));
if (home.getPath().endsWith("jre")) {
home = home.getParentFile();
}
this.home = home;
this.executableExtension = platform.getExecutableExtension();
this.platform = platform;
}
示例2: Build
import com.sun.squawk.builder.platform.Platform; //导入依赖的package包/类
/**
* Creates an instance of the builder.
* @param buildDotOverrideFileName the name of any file that overrides builder properties
*/
public Build(String buildDotOverrideFileName) {
File defaultProperties = new File("build.properties");
if (defaultProperties.exists()) {
properties = loadProperties(defaultProperties, null);
if (buildDotOverrideFileName == null) {
buildDotOverrideFileName = "build.override";
} else {
specfifiedBuildDotOverrideFileName = buildDotOverrideFileName;
}
File overideProperties = new File(buildDotOverrideFileName);
if (overideProperties.exists()) {
// Make it very clear to the user which properties in the standard properties
// file are potentially being overridden
// System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Using build override file: " + overideProperties.getPath() + " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
properties = loadProperties(overideProperties, properties);
}
} else {
throw new BuildException("could not find build.properties");
}
dynamicProperties = new Properties();
platform = Platform.createPlatform(this);
// target ccompiler set later...
jdk = new JDK(platform);
preprocessor = new Preprocessor();
preprocessor.properties = properties;
macroizer = new Macroizer();
installBuiltinCommands();
javaCompiler = new JavaCompiler(this);
isJava5SyntaxSupported = false;
if (getProperty("JAVA5SYNTAX") != null) {
isJava5SyntaxSupported = getBooleanProperty("JAVA5SYNTAX");
}
}
示例3: Build
import com.sun.squawk.builder.platform.Platform; //导入依赖的package包/类
/**
* Creates an instance of the builder.
* @param buildDotOverrideFileName the name of any file that overrides builder properties
*/
public Build(String buildDotOverrideFileName) {
File defaultProperties = new File("build.properties");
if (defaultProperties.exists()) {
properties = loadProperties(defaultProperties, null);
if (buildDotOverrideFileName == null) {
buildDotOverrideFileName = "build.override";
} else {
specfifiedBuildDotOverrideFileName = buildDotOverrideFileName;
}
File overideProperties = new File(buildDotOverrideFileName);
if (overideProperties.exists()) {
// Make it very clear to the user which properties in the standard properties
// file are potentially being overridden
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Using build override file: " + overideProperties.getPath() + " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
properties = loadProperties(overideProperties, properties);
}
} else {
throw new BuildException("could not find build.properties");
}
dynamicProperties = new Properties();
platform = Platform.createPlatform(this);
// target ccompiler set later...
jdk = new JDK(platform);
preprocessor = new Preprocessor();
preprocessor.properties = properties;
macroizer = new Macroizer();
installBuiltinCommands();
javaCompiler = new JavaCompiler(this);
isJava5SyntaxSupported = false;
if (getProperty("JAVA5SYNTAX") != null) {
isJava5SyntaxSupported = getBooleanProperty("JAVA5SYNTAX");
}
}
示例4: getPlatform
import com.sun.squawk.builder.platform.Platform; //导入依赖的package包/类
/**
* Gets the object that represents the host platform.
*
* @return the object that represents this builder's host platform
*/
public Platform getPlatform() {
return platform;
}