]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/AslcompilerDef.java
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
;
19 import net
.sf
.antcontrib
.cpptasks
.compiler
.Aslcompiler
;
20 import net
.sf
.antcontrib
.cpptasks
.compiler
.Processor
;
21 import net
.sf
.antcontrib
.cpptasks
.intel
.IntelWin32Aslcompiler
;
22 import net
.sf
.antcontrib
.cpptasks
.types
.AslcompilerArgument
;
24 import org
.apache
.tools
.ant
.BuildException
;
27 * A asl compiler definition. asl compiler elements may be placed either as
28 * children of a cc element or the project element. A asl compiler element with
29 * an id attribute may be referenced from asl compiler elements with refid or
33 public final class AslcompilerDef
extends ProcessorDef
{
35 private Boolean defaultflag
= new Boolean(true);
37 public AslcompilerDef () {
41 * Adds a asl compiler command-line arg.
43 public void addConfiguredAslcompilerArg(AslcompilerArgument arg
) {
45 throw noChildrenAllowed();
47 addConfiguredProcessorArg(arg
);
50 public void execute() throws org
.apache
.tools
.ant
.BuildException
{
51 throw new org
.apache
.tools
.ant
.BuildException(
52 "Not an actual task, but looks like one for documentation purposes");
55 public final Boolean
getDefaultflag(AslcompilerDef
[] defaultProviders
,
58 return ((AslcompilerDef
) getCheckedRef(AslcompilerDef
.class,
59 "AslcompilerDef")).getDefaultflag(defaultProviders
,
65 public Processor
getProcessor() {
66 Processor processor
= super.getProcessor();
67 if (processor
== null) {
68 processor
= IntelWin32Aslcompiler
.getInstance();
76 * <table width="100%" border="1"> <thead>Supported ASL Compilers</thead>
78 * <td>iasl (default)</td>
79 * <td>Intel ACPI Source Language</td>
83 * <td>Microsoft ACPI Source Language</td>
88 public void setName(AslcompilerEnum name
) throws BuildException
{
90 throw tooManyAttributes();
92 Aslcompiler aslcompiler
= name
.getAslcompiler();
93 setProcessor(aslcompiler
);
96 protected void setProcessor(Processor proc
) throws BuildException
{
98 super.setProcessor((Aslcompiler
) proc
);
99 } catch (ClassCastException ex
) {
100 throw new BuildException(ex
);
105 * Enables or disables default flags.
108 * if true, default flags will add to command line.
111 public void setDefaultflag(boolean defaultflag
) {
113 throw tooManyAttributes();
115 this.defaultflag
= booleanValueOf(defaultflag
);