本文整理汇总了Java中org.netbeans.api.java.classpath.ClassPath.EXECUTE属性的典型用法代码示例。如果您正苦于以下问题:Java ClassPath.EXECUTE属性的具体用法?Java ClassPath.EXECUTE怎么用?Java ClassPath.EXECUTE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.netbeans.api.java.classpath.ClassPath
的用法示例。
在下文中一共展示了ClassPath.EXECUTE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findClassPath
public ClassPath findClassPath(FileObject file, String type) {
try {
if (ClassPath.BOOT == type || JavaClassPathConstants.MODULE_BOOT_PATH.equals(type)) {
return ClassPathSupport.createClassPath(getBootClassPath().toArray(new URL[0]));
}
if (ClassPath.SOURCE == type) {
return ClassPathSupport.createClassPath(new FileObject[] {
sourceRoot
});
}
if (ClassPath.COMPILE == type) {
return ClassPathSupport.createClassPath(classPathElements);
}
if (ClassPath.EXECUTE == type) {
return ClassPathSupport.createClassPath(new FileObject[] {
buildRoot
});
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
示例2: findSource
@CheckForNull
private static FileObject findSource(
@NonNull final FileObject file,
@NonNull final ElementHandle<?> elementHandle) {
FileObject owner = null;
for (String id : new String[] {
ClassPath.EXECUTE,
ClassPath.COMPILE,
ClassPath.BOOT}) {
final ClassPath cp = ClassPath.getClassPath(file, id);
if (cp != null) {
owner = cp.findOwnerRoot(file);
if (owner != null) {
break;
}
}
}
return owner == null ?
owner :
SourceUtils.getFile(
elementHandle,
ClasspathInfo.create(
ClassPathSupport.createClassPath(owner),
ClassPath.EMPTY,
ClassPath.EMPTY));
}
示例3: findClassPath
public ClassPath findClassPath(FileObject file, String type) {
try {
if (ClassPath.BOOT == type) {
// XXX simpler to use JavaPlatformManager.getDefault().getDefaultPlatform().getBootstrapLibraries()
return ClassPathSupport.createClassPath(getBootClassPath().toArray(new URL[0]));
}
if (ClassPath.SOURCE == type) {
return sourcePath;
}
if (ClassPath.COMPILE == type) {
return compileClassPath;
}
if (ClassPath.EXECUTE == type) {
return ClassPathSupport.createClassPath(new FileObject[] {
buildRoot
});
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
示例4: getExtensibleClassPathTypes
@Override
public String[] getExtensibleClassPathTypes(SourceGroup arg0) {
return new String[] {
ClassPath.COMPILE,
ClassPath.EXECUTE,
JavaClassPathConstants.COMPILE_ONLY,
JavaClassPathConstants.MODULE_COMPILE_PATH,
JavaClassPathConstants.MODULE_EXECUTE_PATH,
JavaClassPathConstants.PROCESSOR_PATH
};
}
示例5: getExtensibleClassPathTypes
@Override
public String[] getExtensibleClassPathTypes (SourceGroup sg) {
return new String[] {
ClassPath.COMPILE,
ClassPath.EXECUTE,
ClassPathSupport.ENDORSED,
JavaClassPathConstants.PROCESSOR_PATH,
JavaClassPathConstants.MODULE_COMPILE_PATH,
JavaClassPathConstants.MODULE_EXECUTE_PATH,
};
}
示例6: findClassPath
public ClassPath findClassPath(FileObject file, String type) {
try {
FileObject root = findRoot(file);
if (root == null) {
return null;
}
if (ClassPath.BOOT == type) {
return ClassPathSupport.createClassPath(SourceUtilsTestUtil.getBootClassPath().toArray(new URL[0]));
}
if (ClassPath.SOURCE == type) {
return ClassPathSupport.createClassPath(new FileObject[] {
root
});
}
if (ClassPath.COMPILE == type) {
return root2ClassPath.get(root);
}
if (ClassPath.EXECUTE == type) {
return ClassPathSupport.createProxyClassPath(
root2ClassPath.get(root),
ClassPathSupport.createClassPath(new FileObject[] {
root2BuildRoot.get(root)
})
);
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
示例7: getPropertyName
@Override
public String[] getPropertyName (SourceGroup sg, String type) {
FileObject root = sg.getRootFolder();
final Owner fOwner = getOwner(root);
if (fOwner == null) {
return null;
} else if (fOwner.isTest()) {
switch (type) {
case ClassPath.COMPILE:
return testJavacClassPath;
case ClassPath.EXECUTE:
return testExecuteClassPath;
case JavaClassPathConstants.PROCESSOR_PATH:
return testProcessorClassPath;
case JavaClassPathConstants.MODULE_COMPILE_PATH:
return testModulePath;
case JavaClassPathConstants.MODULE_PROCESSOR_PATH:
return testProcessorModulePath;
case JavaClassPathConstants.MODULE_EXECUTE_PATH:
return testExecuteModulePath;
default:
return null;
}
} else {
switch (type) {
case ClassPath.COMPILE:
return javacClassPath;
case ClassPath.EXECUTE:
return executeClassPath;
case JavaClassPathConstants.PROCESSOR_PATH:
return processorClassPath;
case JavaClassPathConstants.MODULE_COMPILE_PATH:
return modulePath;
case JavaClassPathConstants.MODULE_PROCESSOR_PATH:
return processorModulePath;
case JavaClassPathConstants.MODULE_EXECUTE_PATH:
return executeModulePath;
default:
return null;
}
}
}
示例8: getPropertyName
@Override
public String[] getPropertyName (SourceGroup sg, String type) {
if (ClassPathSupport.ENDORSED.equals(type)) {
return endorsedClasspath;
}
FileObject root = sg.getRootFolder();
FileObject[] path = getPrimarySrcPath();
for (int i=0; i<path.length; i++) {
if (root.equals(path[i])) {
switch (type) {
case ClassPath.COMPILE:
return javacClasspath;
case ClassPath.EXECUTE:
return runClasspath;
case JavaClassPathConstants.PROCESSOR_PATH:
return processorClasspath;
case JavaClassPathConstants.MODULE_COMPILE_PATH:
return modulePath;
case JavaClassPathConstants.MODULE_EXECUTE_PATH:
return moduleExecutePath;
case JavaClassPathConstants.MODULE_PROCESSOR_PATH:
return processorModulePath;
default:
return null;
}
}
}
path = getTestSrcDir();
for (int i=0; i<path.length; i++) {
if (root.equals(path[i])) {
switch (type) {
case ClassPath.COMPILE:
return javacTestClasspath;
case ClassPath.EXECUTE:
return runTestClasspath;
case JavaClassPathConstants.PROCESSOR_PATH:
return processorTestClasspath;
case JavaClassPathConstants.MODULE_COMPILE_PATH:
return testModulePath;
case JavaClassPathConstants.MODULE_EXECUTE_PATH:
return moduleExecutePath;
case JavaClassPathConstants.MODULE_PROCESSOR_PATH:
return processorTestModulepath;
default:
return null;
}
}
}
return null;
}