當前位置: 首頁>>代碼示例>>Java>>正文


Java Project.toBoolean方法代碼示例

本文整理匯總了Java中org.apache.tools.ant.Project.toBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java Project.toBoolean方法的具體用法?Java Project.toBoolean怎麽用?Java Project.toBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.tools.ant.Project的用法示例。


在下文中一共展示了Project.toBoolean方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: reqManOrMod

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
/** Returns true if either a manifest or a module must be specified.
  * This is true unless either the global property
  * makenbm.manOrModReq is false, or the manOrModReq attribute of
  * this task is false.  The attribute, if set, has priority over the
  * global property.
  */
 public boolean reqManOrMod() {
   boolean req = true ;

   if( manOrModReqSet) {
     req = manOrModReq ;
   }
   else {
     String s = getProject().getProperty("makenbm.manOrModReq"); //NOI18N
     if( s != null && !s.equals( "")) { //NOI18N
req = Project.toBoolean(s);
     }
   }

   return( req) ;
 }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:22,代碼來源:MakeLNBM.java

示例2: getTextNode

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
public org.w3c.dom.Text getTextNode(Document ownerDoc) {
           // XXX Current XMLUtil.write anyway does not preserve CDATA sections, it seems.
           String nocdata = getProject().getProperty("makenbm.nocdata");
           if (nocdata != null && Project.toBoolean(nocdata)) {
               return ownerDoc.createTextNode(text.toString());
           } else {
               return ownerDoc.createCDATASection(text.toString());
           }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:MakeNBM.java

示例3: getText

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
public String getText () {
           String nocdata = getProject().getProperty("makenbm.nocdata"); //NOI18N
           if (nocdata != null && Project.toBoolean(nocdata)) {
               return xmlEscape(text.toString());
           } else {
               return "<![CDATA[" + text.toString () + "]]>"; //NOI18N
           }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:MakeLNBM.java

示例4: specVersBaseWarning

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
private void specVersBaseWarning(File manifestFile, String message) throws BuildException {
    message = manifestFile + ": " + message + "\n(see http://wiki.netbeans.org/DevFaqImplementationDependency)" +
            "\n(define spec.version.base.fatal.warning=false in project.properties to make this be a nonfatal warning)";
    if (Project.toBoolean(getProject().getProperty("spec.version.base.fatal.warning"))) {
        throw new BuildException(message);
    } else {
        log(message, Project.MSG_WARN);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:JarWithModuleAttributes.java

示例5: getLazyJarsSet

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
private static Set<? extends File> getLazyJarsSet(final Project prj, final List<? extends File> runCp, final Path value) {
    final Set<File> result = new HashSet<File>();
    if (value != null) {
        for (String pathElement : value.list()) {
            result.add(prj.resolveFile(pathElement));
        }
    }
    for (File re : runCp) {
        if (Project.toBoolean(prj.getProperty(String.format(JNLP_LAZY_FORMAT, re.getName())))) {
            result.add(re);
        }
    }
    return result;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:15,代碼來源:GenerateJnlpFileTask.java

示例6: toBoolean

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
public boolean toBoolean(String val) {
    return Project.toBoolean(val);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:4,代碼來源:BridgeImpl.java

示例7: computeClasspathModuleLocation

import org.apache.tools.ant.Project; //導入方法依賴的package包/類
private File computeClasspathModuleLocation(ModuleListParser modules, String cnb,
        Set<File> clusterPath, Set<String> excludedModules, boolean runtime) throws BuildException {
    ModuleListParser.Entry module = modules.findByCodeNameBase(cnb);
    if (module == null && cnb.contains("-")) {
        final String alternativeCnb = cnb.replace('-', '_');
        module = modules.findByCodeNameBase(alternativeCnb);
        if (module != null) {
            cnb = alternativeCnb;
        }
    }
    if (module == null) {
        throw new BuildException("No dependent module " + cnb, getLocation());
    }
    File jar = module.getJar();
    if (jar == null) return null;

    OK: if (module.getClusterName() != null && clusterPath != null) {
        File clusterF = jar.getParentFile();
        while (clusterF != null) {
            if (clusterPath.contains(clusterF)) {
                break OK;
            }
            clusterF = clusterF.getParentFile();
        }
        String msg = "The module " + cnb + " cannot be " + (runtime ? "run" : "compiled") +
                " against because it is part of the cluster " +
                jar.getParentFile().getParentFile() + " which is not part of cluster.path in your suite configuration.\n\n" +
                "Cluster.path is: " + clusterPath;
        throw new BuildException(msg, getLocation());
    }
    if (excludedModules != null && excludedModules.contains(cnb)) { // again #68716
        throw new BuildException("Module " + cnb + " excluded from the target platform", getLocation());
    }
    if (!jar.isFile()) {
        File srcdir = module.getSourceLocation();
        if (Project.toBoolean(getProject().getProperty(DO_NOT_RECURSE))) {
            log(jar + " missing for " + moduleProject + " but will not first try to build " + srcdir, Project.MSG_VERBOSE);
            return jar;
        }
        if (srcdir != null && srcdir.isDirectory()) {
            log(jar + " missing for " + moduleProject + "; will first try to build " + srcdir, Project.MSG_WARN);
            Ant ant = new Ant();
            ant.setProject(getProject());
            ant.setOwningTarget(getOwningTarget());
            ant.setLocation(getLocation());
            ant.setInheritAll(false);
            ant.setDir(srcdir);
            ant.execute();
        }
    }
    if (!jar.isFile()) {
        throw new BuildException("No such classpath entry: " + jar, getLocation());
    }
    return jar;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:56,代碼來源:ParseProjectXml.java


注:本文中的org.apache.tools.ant.Project.toBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。