2
* Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
16
package net.sf.antcontrib.design;
18
import java.util.ArrayList;
19
import java.util.HashSet;
20
import java.util.List;
25
* Created on Aug 24, 2003
27
* To change the template for this generated file go to
28
* Window>Preferences>Java>Code Generation>Code and Comments
31
* FILL IN JAVADOC HERE
33
* @author Dean Hiller(dean@xsoftware.biz)
35
public class Package {
37
public final static String DEFAULT = "default package";
41
//holds the name attribute of the package element of each
42
//package this package depends on.
44
private Set unusedDepends = new HashSet();
45
private boolean isIncludeSubpackages;
46
private boolean needDeclarations;
47
private boolean needDepends;
48
private boolean isUsed = false;
50
public void setName(String name) {
55
public String getName() {
59
public void setPackage(String pack) {
63
public String getPackage() {
67
public void addDepends(Depends d) {
69
depends = new ArrayList();
74
public Depends[] getDepends() {
75
Depends[] d = new Depends[0];
78
return (Depends[])depends.toArray(d);
84
public void setIncludeSubpackages(boolean b) {
85
isIncludeSubpackages = b;
90
public boolean isIncludeSubpackages() {
91
return isIncludeSubpackages;
96
public void setNeedDeclarations(boolean b) {
102
public boolean isNeedDeclarations() {
103
return needDeclarations;
108
public void setNeedDepends(boolean b) {
112
public boolean getNeedDepends() {
118
public void setUsed(boolean b)
122
public boolean isUsed()
129
public void addUsedDependency(Depends d)
131
unusedDepends.remove(d);
134
public Set getUnusedDepends() {
135
return unusedDepends;