本文整理汇总了Java中org.apache.tools.ant.taskdefs.Property.getClasspath方法的典型用法代码示例。如果您正苦于以下问题:Java Property.getClasspath方法的具体用法?Java Property.getClasspath怎么用?Java Property.getClasspath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tools.ant.taskdefs.Property
的用法示例。
在下文中一共展示了Property.getClasspath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
}
示例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);
}
}
示例3: 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;
}