3 * Copyright 2001-2005 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
.compiler
;
21 import org
.apache
.tools
.ant
.BuildException
;
23 import net
.sf
.antcontrib
.cpptasks
.CCTask
;
24 import net
.sf
.antcontrib
.cpptasks
.ProcessorParam
;
27 * A configuration for an ASL compiler
30 public final class CommandLineAslcompilerConfiguration
implements
31 AslcompilerConfiguration
{
33 private String
[] args
;
35 private CommandLineAslcompiler acpi
;
37 private String
[] endArgs
;
39 private boolean rebuild
;
41 public CommandLineAslcompilerConfiguration (CommandLineAslcompiler acpi
,
42 String
[] args
, boolean rebuild
, String
[] endArgs
) {
44 throw new NullPointerException("acpi");
47 this.args
= new String
[0];
49 this.args
= (String
[]) args
.clone();
52 this.rebuild
= rebuild
;
53 this.endArgs
= (String
[]) endArgs
.clone();
56 public int bid (String inputFile
) {
57 int acpiBid
= acpi
.bid(inputFile
);
61 public void aslcompiler (CCTask task
, File outputDir
, String
[] sourceFiles
)
62 throws BuildException
{
64 acpi
.aslcompiler(task
, outputDir
, sourceFiles
, args
, endArgs
);
65 } catch (BuildException ex
) {
70 public String
getIdentifier () {
71 return acpi
.getCommand();
74 public ProcessorParam
[] getParams () {
75 return new ProcessorParam
[0];
78 public boolean getRebuild () {
82 public String
[] getPreArguments () {
83 return (String
[]) args
.clone();
86 public String
[] getEndArguments () {
87 return (String
[]) endArgs
.clone();
90 public String
getOutputFileName (String inputFile
) {
91 return acpi
.getOutputFileName(inputFile
);