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


Java Property.setPrefix方法代码示例

本文整理汇总了Java中org.apache.tools.ant.taskdefs.Property.setPrefix方法的典型用法代码示例。如果您正苦于以下问题:Java Property.setPrefix方法的具体用法?Java Property.setPrefix怎么用?Java Property.setPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tools.ant.taskdefs.Property的用法示例。


在下文中一共展示了Property.setPrefix方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: reinit

import org.apache.tools.ant.taskdefs.Property; //导入方法依赖的package包/类
/**
 * Called in execute or createProperty if newProject is null. <p>
 *
 * This can happen if the same instance of this task is run twice as
 * newProject is set to null at the end of execute (to save memory and help
 * the GC).</p> <p>
 *
 * Sets all properties that have been defined as nested property elements.
 * </p>
 */
private void reinit() {
   init();
   final int count = properties.size();
   for ( int i = 0; i < count; i++ ) {
      Property p = (Property)properties.elementAt( i );
      Property newP = (Property)newProject.createTask( "property" );
      newP.setName( p.getName() );
      if ( p.getValue() != null ) {
         newP.setValue( p.getValue() );
      }
      if ( p.getFile() != null ) {
         newP.setFile( p.getFile() );
      }
      if ( p.getResource() != null ) {
         newP.setResource( p.getResource() );
      }
      if ( p.getPrefix() != null ) {
         newP.setPrefix( p.getPrefix() );
      }
      if ( p.getRefid() != null ) {
         newP.setRefid( p.getRefid() );
      }
      if ( p.getEnvironment() != null ) {
         newP.setEnvironment( p.getEnvironment() );
      }
      if ( p.getClasspath() != null ) {
         newP.setClasspath( p.getClasspath() );
      }
      properties.setElementAt( newP, i );
   }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:42,代码来源:AntFetch.java

示例2: reinit

import org.apache.tools.ant.taskdefs.Property; //导入方法依赖的package包/类
/**
 * Called in execute or createProperty if newProject is null.
 * <p>
 *
 * This can happen if the same instance of this task is run twice as
 * newProject is set to null at the end of execute (to save memory and help
 * the GC).
 * </p>
 * <p>
 *
 * Sets all properties that have been defined as nested property elements.
 * </p>
 */
private void reinit() {
	init();
	final int count = properties.size();
	for (int i = 0; i < count; i++) {
		Property p = (Property) properties.elementAt(i);
		Property newP = (Property) newProject.createTask("property");
		newP.setName(p.getName());
		if (p.getValue() != null) {
			newP.setValue(p.getValue());
		}
		if (p.getFile() != null) {
			newP.setFile(p.getFile());
		}
		if (p.getResource() != null) {
			newP.setResource(p.getResource());
		}
		if (p.getPrefix() != null) {
			newP.setPrefix(p.getPrefix());
		}
		if (p.getRefid() != null) {
			newP.setRefid(p.getRefid());
		}
		if (p.getEnvironment() != null) {
			newP.setEnvironment(p.getEnvironment());
		}
		if (p.getClasspath() != null) {
			newP.setClasspath(p.getClasspath());
		}
		properties.setElementAt(newP, i);
	}
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:45,代码来源:AntCallBack.java

示例3: populate

import org.apache.tools.ant.taskdefs.Property; //导入方法依赖的package包/类
private void populate(final Property property)
{
    if (nameSet) {
        property.setName(name);
    }
    if (valueSet) {
        property.setValue(value);
    }
    if (locationSet) {
        property.setLocation(location);
    }
    if (fileSet) {
        property.setFile(file);
    }
    if (urlSet) {
        property.setUrl(url);
    }
    if (resourceSet) {
        property.setResource(resource);
    }
    if (classpathAttributeSet) {
        property.setClasspath(classpathAttribute);
    }
    if (classpath != null) {
        property.createClasspath().add(classpath);
    }
    if (classpathRefSet) {
        property.setClasspathRef(classpathRef);
    }
    if (environmentSet) {
        property.setEnvironment(environment);
    }
    if (referenceSet) {
        property.setRefid(reference);
    }
    if (prefixSet) {
        property.setPrefix(prefix);
    }
}
 
开发者ID:dzidzitop,项目名称:ant_modular,代码行数:40,代码来源:CallTargetForModules.java

示例4: createCallTarget

import org.apache.tools.ant.taskdefs.Property; //导入方法依赖的package包/类
private CallTarget createCallTarget() {
	CallTarget ct = (CallTarget) getProject().createTask("antcall");
	ct.setOwningTarget(getOwningTarget());
	ct.init();
	ct.setTarget(target);
	ct.setInheritAll(inheritAll);
	ct.setInheritRefs(inheritRefs);
	Enumeration e = params.elements();
	while (e.hasMoreElements()) {
		Property param = (Property) e.nextElement();
		Property toSet = ct.createParam();
		toSet.setName(param.getName());
		if (param.getValue() != null) {
			toSet.setValue(param.getValue());
		}
		if (param.getFile() != null) {
			toSet.setFile(param.getFile());
		}
		if (param.getResource() != null) {
			toSet.setResource(param.getResource());
		}
		if (param.getPrefix() != null) {
			toSet.setPrefix(param.getPrefix());
		}
		if (param.getRefid() != null) {
			toSet.setRefid(param.getRefid());
		}
		if (param.getEnvironment() != null) {
			toSet.setEnvironment(param.getEnvironment());
		}
		if (param.getClasspath() != null) {
			toSet.setClasspath(param.getClasspath());
		}
	}

	e = references.elements();
	while (e.hasMoreElements()) {
		ct.addReference((Ant.Reference) e.nextElement());
	}

	return ct;
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:43,代码来源:ForEach.java


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