Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 810f6b47335d9e55b10db6a406533d6a5f8da278 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*******************************************************************************
 * Copyright (c) 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.osgi.internal.resolver;

import java.util.*;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.service.resolver.ExportPackageDescription;

public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements ExportPackageDescription {
	private String grouping;
	private Map attributes;
	private BundleDescription exporter;
	private String exclude;
	private String include;
	private String[] mandatory;
	private boolean root;
	private int tableIndex;

	public String getGrouping() {
		if (grouping == null)
			return getName(); // default is to have a unique grouping using the package name
		return grouping;
	}

	protected String getBasicGrouping() {
		return grouping;
	}

	public String getInclude() {
		return include;
	}

	public String getExclude() {
		return exclude;
	}

	public Map getAttributes() {
		return attributes;
	}

	public BundleDescription getExporter() {
		return exporter;
	}

	public boolean isRoot() {
		return root;
	}

	public String[] getMandatory() {
		return mandatory;
	}

	protected void setGrouping(String grouping) {
		this.grouping = grouping;
	}

	protected void setInclude(String include) {
		this.include = include;
	}

	protected void setExclude(String exclude) {
		this.exclude = exclude;
	}

	protected void setAttributes(Map attributes) {
		this.attributes = attributes;
	}

	protected void setExporter(BundleDescription exporter) {
		this.exporter = exporter;
	}

	protected void setRoot(boolean root) {
		this.root = root;
	}

	protected void setMandatory(String[] mandatory) {
		this.mandatory = mandatory;
	}

	public String toString() {
		return "Export-Package: " + getName() + "; version=\"" + getVersion() + "\"";  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
	}

	int getTableIndex() {
		return tableIndex;
	}

	void setTableIndex(int tableIndex) {
		this.tableIndex = tableIndex;
	}
}

Back to the top