]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/ProcessorParam.java
b2d47962ed851267fbeb93696e0d8375fe294d92
3 * Copyright 2001-2004 The Ant-Contrib project
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package net
.sf
.antcontrib
.cpptasks
;
18 /*******************************************************************************
19 * Place class description here.
22 * @author <additional author>
25 ******************************************************************************/
26 public class ProcessorParam
{
27 private String ifCond
;
29 private String unlessCond
;
31 public ProcessorParam() {
33 public String
getName() {
36 public String
getValue() {
40 * Returns true if the define's if and unless conditions (if any) are
43 public boolean isActive(org
.apache
.tools
.ant
.Project p
) {
47 if (ifCond
!= null && p
.getProperty(ifCond
) == null) {
49 } else if (unlessCond
!= null && p
.getProperty(unlessCond
) != null) {
55 * Sets the property name for the 'if' condition.
57 * The argument will be ignored unless the property is defined.
59 * The value of the property is insignificant, but values that would imply
60 * misinterpretation ("false", "no") will throw an exception when
63 public void setIf(String propName
) {
67 * Specifies relative location of argument on command line. "start" will
68 * place argument at start of command line, "mid" will place argument after
69 * all "start" arguments but before filenames, "end" will place argument
73 public void setName(String name
) {
77 * Set the property name for the 'unless' condition.
79 * If named property is set, the argument will be ignored.
81 * The value of the property is insignificant, but values that would imply
82 * misinterpretation ("false", "no") of the behavior will throw an
83 * exception when evaluated.
88 public void setUnless(String propName
) {
89 unlessCond
= propName
;
92 * Specifies the string that should appear on the command line. The
93 * argument will be quoted if it contains embedded blanks. Use multiple
94 * arguments to avoid quoting.
97 public void setValue(String value
) {