KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > loader > ClassPackage


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Scott Ferguson
27  */

28
29 package com.caucho.loader;
30
31 /**
32  * Information about a particular package.
33  */

34 public class ClassPackage {
35   private String JavaDoc _prefix;
36   
37   private String JavaDoc _specName;
38   private String JavaDoc _specVersion;
39   private String JavaDoc _specVendor;
40   
41   private String JavaDoc _implName;
42   private String JavaDoc _implVersion;
43   private String JavaDoc _implVendor;
44   
45   public ClassPackage(String JavaDoc name)
46   {
47     if (! name.equals("") && ! name.endsWith("/"))
48       name = name + "/";
49     
50     _prefix = name;
51   }
52
53   /**
54    * Returns the prefix for this package.
55    */

56   public String JavaDoc getPrefix()
57   {
58     return _prefix;
59   }
60
61   /**
62    * Returns the specification name.
63    */

64   public String JavaDoc getSpecificationTitle()
65   {
66     return _specName;
67   }
68
69   /**
70    * Sets the specification name.
71    */

72   public void setSpecificationTitle(String JavaDoc specName)
73   {
74     _specName = specName;
75   }
76
77   /**
78    * Returns the specification vendor.
79    */

80   public String JavaDoc getSpecificationVendor()
81   {
82     return _specVendor;
83   }
84
85   /**
86    * Sets the specification vendor.
87    */

88   public void setSpecificationVendor(String JavaDoc specVendor)
89   {
90     _specVendor = specVendor;
91   }
92
93   /**
94    * Returns the specification version.
95    */

96   public String JavaDoc getSpecificationVersion()
97   {
98     return _specVersion;
99   }
100
101   /**
102    * Sets the specification version.
103    */

104   public void setSpecificationVersion(String JavaDoc specVersion)
105   {
106     _specVersion = specVersion;
107   }
108
109   /**
110    * Returns the implementation name.
111    */

112   public String JavaDoc getImplementationTitle()
113   {
114     return _implName;
115   }
116
117   /**
118    * Sets the implementation name.
119    */

120   public void setImplementationTitle(String JavaDoc implName)
121   {
122     _implName = implName;
123   }
124
125   /**
126    * Returns the implementation vendor.
127    */

128   public String JavaDoc getImplementationVendor()
129   {
130     return _implVendor;
131   }
132
133   /**
134    * Sets the implementation vendor.
135    */

136   public void setImplementationVendor(String JavaDoc implVendor)
137   {
138     _implVendor = implVendor;
139   }
140
141   /**
142    * Returns the implementation version.
143    */

144   public String JavaDoc getImplementationVersion()
145   {
146     return _implVersion;
147   }
148
149   /**
150    * Sets the implementation version.
151    */

152   public void setImplementationVersion(String JavaDoc implVersion)
153   {
154     _implVersion = implVersion;
155   }
156 }
157
Popular Tags