Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs
Class Property

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.Property

public class Property
extends Task

Will set a Project property. Used to be a hack in ProjectHelper Will not override values set by the command line or parent projects.

Author:
  costin@dnt.ro, Sam Ruby , Glenn McAllister

Field Summary
`protected Path` | `classpath`
`protected java.lang.String` | `env`
`protected java.io.File` | `file`
`protected java.lang.String` | `name`
`protected Reference` | `ref`
`protected java.lang.String` | `resource`
`protected boolean` | `userProperty`
`protected java.lang.String` | `value`

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`Property()`

Method Summary
`protected void` | `addProperties(java.util.Properties props)`
`protected void` | `addProperty(java.lang.String n, java.lang.String v)`
`Path` | `createClasspath()`
`void` | `execute()` Called by the project to let the task do it's work.
`java.lang.String` | `getEnvironment()`
`java.io.File` | `getFile()`
`java.lang.String` | `getName()`
`Reference` | `getRefid()`
`java.lang.String` | `getResource()`
`java.lang.String` | `getValue()`
`protected void` | `loadEnvironment(java.lang.String prefix)`
`protected void` | `loadFile(java.io.File file)`
`protected void` | `loadResource(java.lang.String name)`
`void` | `setClasspath(Path classpath)`
`void` | `setClasspathRef(Reference r)`
`void` | `setEnvironment(java.lang.String env)`
`void` | `setFile(java.io.File file)`
`void` | `setLocation(java.io.File location)`
`void` | `setName(java.lang.String name)`
`void` | `setRefid(Reference ref)`
`void` | `setResource(java.lang.String resource)`
`void` | `setUserProperty(boolean userProperty)`
`void` | `setValue(java.lang.String value)`
`java.lang.String` | `toString()`

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    protected java.lang.String name

### value

    protected java.lang.String value

### file

    protected java.io.File file

### resource

    protected java.lang.String resource

### classpath

    protected Path classpath

### env

    protected java.lang.String env

### ref

    protected Reference ref

### userProperty

    protected boolean userProperty

Constructor Detail

### Property

    public Property()

Method Detail

### setName

    public void setName(java.lang.String name)

### getName

    public java.lang.String getName()

### setLocation

    public void setLocation(java.io.File location)

### setValue

    public void setValue(java.lang.String value)

### getValue

    public java.lang.String getValue()

### setFile

    public void setFile(java.io.File file)

### getFile

    public java.io.File getFile()

### setRefid

    public void setRefid(Reference ref)

### getRefid

    public Reference getRefid()

### setResource

    public void setResource(java.lang.String resource)

### getResource

    public java.lang.String getResource()

### setEnvironment

    public void setEnvironment(java.lang.String env)

### getEnvironment

    public java.lang.String getEnvironment()

### setClasspath

    public void setClasspath(Path classpath)

### createClasspath

    public Path createClasspath()

### setClasspathRef

    public void setClasspathRef(Reference r)

### setUserProperty

    public void setUserProperty(boolean userProperty)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### execute

    public void execute()
                 throws BuildException

  Description copied from class: `Task`
  Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.
  Overrides:
    `execute` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

### loadFile

    protected void loadFile(java.io.File file)
                     throws BuildException

### loadResource

    protected void loadResource(java.lang.String name)

### loadEnvironment

    protected void loadEnvironment(java.lang.String prefix)

### addProperties

    protected void addProperties(java.util.Properties props)

### addProperty

    protected void addProperty(java.lang.String n,
                               java.lang.String v)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.