]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/PrecompileExceptDef.java
Restructuring for better separation of Tool packages.
[mirror_edk2.git] / Tools / Java / Source / Cpptasks / net / sf / antcontrib / cpptasks / PrecompileExceptDef.java
1 /*
2 *
3 * Copyright 2002-2004 The Ant-Contrib project
4 *
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
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
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.
16 */
17 package net.sf.antcontrib.cpptasks;
18 import java.io.File;
19
20 import net.sf.antcontrib.cpptasks.types.ConditionalFileSet;
21
22 import org.apache.tools.ant.BuildException;
23 /**
24 * Specifies files that should not be compiled using precompiled headers.
25 *
26 * @author Curt Arnold
27 */
28 public final class PrecompileExceptDef {
29 private ConditionalFileSet localSet = null;
30 /**
31 * Collection of <fileset>contained by definition
32 */
33 private PrecompileDef owner;
34 /**
35 * Constructor
36 *
37 */
38 public PrecompileExceptDef(PrecompileDef owner) {
39 this.owner = owner;
40 }
41 /**
42 * Adds filesets that specify files that should not be processed using
43 * precompiled headers.
44 *
45 * @param exceptSet
46 * FileSet specify files that should not be processed with
47 * precompiled headers enabled.
48 */
49 public void addFileset(ConditionalFileSet exceptSet) {
50 owner.appendExceptFileSet(exceptSet);
51 }
52 public void execute() throws org.apache.tools.ant.BuildException {
53 throw new org.apache.tools.ant.BuildException(
54 "Not an actual task, but looks like one for documentation purposes");
55 }
56 /**
57 * Sets the base-directory
58 */
59 public void setDir(File dir) throws BuildException {
60 if (localSet == null) {
61 localSet = new ConditionalFileSet();
62 owner.appendExceptFileSet(localSet);
63 }
64 localSet.setDir(dir);
65 }
66 /**
67 * Comma or space separated list of file patterns that should not be
68 * compiled using precompiled headers.
69 *
70 * @param includes
71 * the string containing the include patterns
72 */
73 public void setIncludes(String includes) {
74 if (localSet == null) {
75 localSet = new ConditionalFileSet();
76 owner.appendExceptFileSet(localSet);
77 }
78 localSet.setIncludes(includes);
79 }
80 }