当前位置: 首页>>代码示例>>Java>>正文


Java ClassPath.EXECUTE属性代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:SourceUtilsTestUtil.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:OpenAction.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:HintTest.java

示例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
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:CPExtender.java

示例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,
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:ClassPathModifier.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:ComputeOverridersTest.java

示例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;
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:42,代码来源:MultiModuleClassPathProvider.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:50,代码来源:ClassPathProviderImpl.java


注:本文中的org.netbeans.api.java.classpath.ClassPath.EXECUTE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。