KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > text > bundle > PackageFriend


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core.text.bundle;
12
13 import java.io.PrintWriter JavaDoc;
14
15 import org.eclipse.pde.internal.core.bundle.BundleObject;
16
17 public class PackageFriend extends BundleObject {
18
19     private static final long serialVersionUID = 1L;
20
21     private String JavaDoc fName;
22
23     private transient PackageObject fPackageObject;
24     
25     public PackageFriend(PackageObject object, String JavaDoc name) {
26         fName = name;
27         fPackageObject = object;
28     }
29
30     public String JavaDoc getName() {
31         return fName;
32     }
33     
34     public String JavaDoc toString() {
35         return fName;
36     }
37     
38     public ManifestHeader getHeader() {
39         return fPackageObject.getHeader();
40     }
41
42     /**
43      * @param object
44      */

45     public void reconnect(PackageObject object) {
46         fPackageObject = object;
47     }
48
49     /* (non-Javadoc)
50      * @see org.eclipse.pde.internal.core.bundle.BundleObject#writeDelimeter(java.io.PrintWriter)
51      */

52     public void writeDelimeter(PrintWriter JavaDoc writer) {
53         writer.print(',');
54     }
55     
56 }
57
Popular Tags