XSLTProcess.Param (Apache Ant API)
Date: 2016-08-23

org.apache.tools.ant.taskdefs

## Class XSLTProcess.Param

- java.lang.Object
- - org.apache.tools.ant.taskdefs.XSLTProcess.Param

- Enclosing class:
    XSLTProcess

      public static class XSLTProcess.Param
      extends java.lang.Object

  The Param inner class used to store XSL parameters

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Param()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getExpression()` Get the parameter's value
    `java.lang.String` | `getName()` Get the parameter name
    `java.lang.String` | `getType()`
    `void` | `setExpression(java.lang.String expression)` The parameter value - can be a primitive type value or an XPath expression.
    `void` | `setIf(java.lang.Object ifCond)` Set whether this param should be used.
    `void` | `setIf(java.lang.String ifProperty)` Set whether this param should be used.
    `void` | `setName(java.lang.String name)` Set the parameter name.
    `void` | `setProject(Project project)` Set the current project
    `void` | `setType(java.lang.String type)`
    `void` | `setUnless(java.lang.Object unlessCond)` Set whether this param should NOT be used.
    `void` | `setUnless(java.lang.String unlessProperty)` Set whether this param should NOT be used.
    `boolean` | `shouldUse()` Ensures that the param passes the conditions placed on it with `if` and `unless` properties.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Param

          public Param()

  - ### Method Detail

    - #### setProject

          public void setProject(Project project)

      Set the current project
      Parameters:
        `project` - the current project

    - #### setName

          public void setName(java.lang.String name)

      Set the parameter name.
      Parameters:
        `name` - the name of the parameter.

    - #### setExpression

          public void setExpression(java.lang.String expression)

      The parameter value - can be a primitive type value or an XPath expression.
      Parameters:
        `expression` - the parameter's value/expression.
      See Also:
        `setType(java.lang.String)`

    - #### setType

          public void setType(java.lang.String type)

      Since:
        Ant 1.9.3
      See Also:
        `XSLTProcess.ParamType`

    - #### getName

          public java.lang.String getName()
                                   throws BuildException

      Get the parameter name
      Returns:
        the parameter name
      Throws:
        `BuildException` - if the name is not set.

    - #### getExpression

          public java.lang.String getExpression()
                                         throws BuildException

      Get the parameter's value
      Returns:
        the parameter value
      Throws:
        `BuildException` - if the value is not set.
      See Also:
        `getType()`

    - #### getType

          public java.lang.String getType()

      Since:
        Ant 1.9.3
      See Also:
        `XSLTProcess.ParamType`

    - #### setIf

          public void setIf(java.lang.Object ifCond)

      Set whether this param should be used. It will be used if the expression evaluates to true or the name of a property which has been set, otherwise it won't.
      Parameters:
        `ifCond` - evaluated expression
      Since:
        Ant 1.8.0

    - #### setIf

          public void setIf(java.lang.String ifProperty)

      Set whether this param should be used. It will be used if the expression evaluates to true or the name of a property which has been set, otherwise it won't.
      Parameters:
        `ifProperty` - evaluated expression

    - #### setUnless

          public void setUnless(java.lang.Object unlessCond)

      Set whether this param should NOT be used. It will not be used if the expression evaluates to true or the name of a property which has been set, otherwise it will be used.
      Parameters:
        `unlessCond` - evaluated expression
      Since:
        Ant 1.8.0

    - #### setUnless

          public void setUnless(java.lang.String unlessProperty)

      Set whether this param should NOT be used. It will not be used if the expression evaluates to true or the name of a property which has been set, otherwise it will be used.
      Parameters:
        `unlessProperty` - evaluated expression

    - #### shouldUse

          public boolean shouldUse()

      Ensures that the param passes the conditions placed on it with `if` and `unless` properties.
      Returns:
        true if the task passes the "if" and "unless" parameters