Some reorganization to get more manifest parsing functionality grouped
together. (FELIX-98)
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@488409 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ExportedPackageImpl.java b/framework/src/main/java/org/apache/felix/framework/ExportedPackageImpl.java
index ed592fa..07d0cab 100644
--- a/framework/src/main/java/org/apache/felix/framework/ExportedPackageImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/ExportedPackageImpl.java
@@ -18,7 +18,7 @@
*/
package org.apache.felix.framework;
-import org.apache.felix.framework.searchpolicy.R4Export;
+import org.apache.felix.framework.util.manifestparser.R4Export;
import org.apache.felix.moduleloader.IModule;
import org.osgi.framework.Bundle;
import org.osgi.framework.Version;
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 6625b31..36e8335 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -24,12 +24,15 @@
import java.security.CodeSource;
import java.security.ProtectionDomain;
import java.util.*;
-
-import org.apache.felix.framework.cache.*;
+import org.apache.felix.framework.cache.BundleArchive;
+import org.apache.felix.framework.cache.BundleCache;
+import org.apache.felix.framework.cache.SystemBundleArchive;
import org.apache.felix.framework.searchpolicy.*;
import org.apache.felix.framework.util.*;
+import org.apache.felix.framework.util.manifestparser.*;
import org.apache.felix.moduleloader.*;
import org.osgi.framework.*;
+
import org.osgi.service.packageadmin.ExportedPackage;
import org.osgi.service.startlevel.StartLevel;
diff --git a/framework/src/main/java/org/apache/felix/framework/PackageAdminImpl.java b/framework/src/main/java/org/apache/felix/framework/PackageAdminImpl.java
index 56148c3..9e65e8b 100644
--- a/framework/src/main/java/org/apache/felix/framework/PackageAdminImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/PackageAdminImpl.java
@@ -20,7 +20,7 @@
import java.util.*;
-import org.apache.felix.framework.searchpolicy.VersionRange;
+import org.apache.felix.framework.util.VersionRange;
import org.osgi.framework.*;
import org.osgi.service.packageadmin.*;
diff --git a/framework/src/main/java/org/apache/felix/framework/SystemBundle.java b/framework/src/main/java/org/apache/felix/framework/SystemBundle.java
index 29cc2df..7868fe5 100644
--- a/framework/src/main/java/org/apache/felix/framework/SystemBundle.java
+++ b/framework/src/main/java/org/apache/felix/framework/SystemBundle.java
@@ -22,8 +22,10 @@
import java.util.*;
import org.apache.felix.framework.cache.SystemBundleArchive;
-import org.apache.felix.framework.searchpolicy.*;
-import org.apache.felix.framework.util.*;
+import org.apache.felix.framework.util.FelixConstants;
+import org.apache.felix.framework.util.StringMap;
+import org.apache.felix.framework.util.manifestparser.ManifestParser;
+import org.apache.felix.framework.util.manifestparser.R4Export;
import org.apache.felix.moduleloader.IContentLoader;
import org.osgi.framework.*;
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java b/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
index 764ed7f..996e535 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
@@ -24,7 +24,9 @@
import java.util.jar.*;
import org.apache.felix.framework.Logger;
-import org.apache.felix.framework.util.*;
+import org.apache.felix.framework.util.FelixConstants;
+import org.apache.felix.framework.util.StringMap;
+import org.apache.felix.framework.util.manifestparser.ManifestParser;
import org.apache.felix.moduleloader.*;
/**
@@ -122,7 +124,7 @@
? null : (String) map.get(FelixConstants.BUNDLE_CLASSPATH);
// Parse the class path into strings.
- String[] classPathStrings = Util.parseDelimitedString(
+ String[] classPathStrings = ManifestParser.parseDelimitedString(
classPath, FelixConstants.CLASS_PATH_SEPARATOR);
if (classPathStrings == null)
diff --git a/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java b/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
index 259dfcf..efc2bb3 100644
--- a/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
+++ b/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
@@ -28,7 +28,10 @@
import java.util.zip.ZipEntry;
import org.apache.felix.framework.Logger;
-import org.apache.felix.framework.util.*;
+import org.apache.felix.framework.util.FelixConstants;
+import org.apache.felix.framework.util.StringMap;
+import org.apache.felix.framework.util.Util;
+import org.apache.felix.framework.util.manifestparser.ManifestParser;
import org.apache.felix.moduleloader.*;
/**
@@ -134,7 +137,7 @@
? null : (String) map.get(FelixConstants.BUNDLE_CLASSPATH);
// Parse the class path into strings.
- String[] classPathStrings = Util.parseDelimitedString(
+ String[] classPathStrings = ManifestParser.parseDelimitedString(
classPath, FelixConstants.CLASS_PATH_SEPARATOR);
if (classPathStrings == null)
@@ -357,7 +360,7 @@
? null : (String) map.get(FelixConstants.BUNDLE_CLASSPATH);
// Parse the class path into strings.
- String[] classPathStrings = Util.parseDelimitedString(
+ String[] classPathStrings = ManifestParser.parseDelimitedString(
classPath, FelixConstants.CLASS_PATH_SEPARATOR);
if (classPathStrings == null)
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ModuleDefinition.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ModuleDefinition.java
index 565b0a0..a3e3d47 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ModuleDefinition.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ModuleDefinition.java
@@ -18,6 +18,9 @@
*/
package org.apache.felix.framework.searchpolicy;
+import org.apache.felix.framework.util.manifestparser.R4Export;
+import org.apache.felix.framework.util.manifestparser.R4Import;
+import org.apache.felix.framework.util.manifestparser.R4Library;
import org.apache.felix.moduleloader.IModuleDefinition;
public class ModuleDefinition implements IModuleDefinition
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
index f5e282c..e63160d 100755
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
@@ -25,6 +25,7 @@
import org.apache.felix.framework.Logger;
import org.apache.felix.framework.util.*;
+import org.apache.felix.framework.util.manifestparser.*;
import org.apache.felix.moduleloader.*;
import org.osgi.framework.*;
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
index 7415de5..e276295 100755
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Wire.java
@@ -22,6 +22,7 @@
import java.util.Enumeration;
import org.apache.felix.framework.util.Util;
+import org.apache.felix.framework.util.manifestparser.R4Export;
import org.apache.felix.moduleloader.*;
public class R4Wire implements IWire
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ResolveException.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ResolveException.java
index 609fda8..594cbef 100755
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ResolveException.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ResolveException.java
@@ -18,6 +18,7 @@
*/
package org.apache.felix.framework.searchpolicy;
+import org.apache.felix.framework.util.manifestparser.R4Package;
import org.apache.felix.moduleloader.IModule;
/**
diff --git a/framework/src/main/java/org/apache/felix/framework/util/Util.java b/framework/src/main/java/org/apache/felix/framework/util/Util.java
index 4e438a7..9034749 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/Util.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/Util.java
@@ -24,6 +24,9 @@
import org.apache.felix.framework.Logger;
import org.apache.felix.framework.searchpolicy.*;
+import org.apache.felix.framework.util.manifestparser.R4Export;
+import org.apache.felix.framework.util.manifestparser.R4Import;
+import org.apache.felix.framework.util.manifestparser.R4LibraryClause;
import org.apache.felix.moduleloader.IModule;
import org.apache.felix.moduleloader.IWire;
@@ -230,100 +233,6 @@
return null;
}
- /**
- * Parses delimited string and returns an array containing the tokens. This
- * parser obeys quotes, so the delimiter character will be ignored if it is
- * inside of a quote. This method assumes that the quote character is not
- * included in the set of delimiter characters.
- * @param value the delimited string to parse.
- * @param delim the characters delimiting the tokens.
- * @return an array of string tokens or null if there were no tokens.
- **/
- public static String[] parseDelimitedString(String value, String delim)
- {
- if (value == null)
- {
- value = "";
- }
-
- List list = new ArrayList();
-
- int CHAR = 1;
- int DELIMITER = 2;
- int STARTQUOTE = 4;
- int ENDQUOTE = 8;
-
- StringBuffer sb = new StringBuffer();
-
- int expecting = (CHAR | DELIMITER | STARTQUOTE);
-
- for (int i = 0; i < value.length(); i++)
- {
- char c = value.charAt(i);
-
- boolean isDelimiter = (delim.indexOf(c) >= 0);
- boolean isQuote = (c == '"');
-
- if (isDelimiter && ((expecting & DELIMITER) > 0))
- {
- list.add(sb.toString().trim());
- sb.delete(0, sb.length());
- expecting = (CHAR | DELIMITER | STARTQUOTE);
- }
- else if (isQuote && ((expecting & STARTQUOTE) > 0))
- {
- sb.append(c);
- expecting = CHAR | ENDQUOTE;
- }
- else if (isQuote && ((expecting & ENDQUOTE) > 0))
- {
- sb.append(c);
- expecting = (CHAR | STARTQUOTE | DELIMITER);
- }
- else if ((expecting & CHAR) > 0)
- {
- sb.append(c);
- }
- else
- {
- throw new IllegalArgumentException("Invalid delimited string: " + value);
- }
- }
-
- if (sb.length() > 0)
- {
- list.add(sb.toString().trim());
- }
-
- return (String[]) list.toArray(new String[list.size()]);
- }
-
- /**
- * Parses native code manifest headers.
- * @param libStrs an array of native library manifest header
- * strings from the bundle manifest.
- * @return an array of <tt>LibraryInfo</tt> objects for the
- * passed in strings.
- **/
- public static R4LibraryClause[] parseLibraryStrings(Logger logger, String[] libStrs)
- throws IllegalArgumentException
- {
- if (libStrs == null)
- {
- return new R4LibraryClause[0];
- }
-
- List libList = new ArrayList();
-
- for (int i = 0; i < libStrs.length; i++)
- {
- R4LibraryClause clause = R4LibraryClause.parse(logger, libStrs[i]);
- libList.add(clause);
- }
-
- return (R4LibraryClause[]) libList.toArray(new R4LibraryClause[libList.size()]);
- }
-
private static final byte encTab[] = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46,
0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64,
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/VersionRange.java b/framework/src/main/java/org/apache/felix/framework/util/VersionRange.java
similarity index 98%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/VersionRange.java
rename to framework/src/main/java/org/apache/felix/framework/util/VersionRange.java
index 0dfd1cb..58829e7 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/VersionRange.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/VersionRange.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util;
import org.osgi.framework.Version;
diff --git a/framework/src/main/java/org/apache/felix/framework/util/ManifestParser.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
similarity index 91%
rename from framework/src/main/java/org/apache/felix/framework/util/ManifestParser.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
index bdb2b0d..b47f7a7 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/ManifestParser.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
@@ -16,13 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.util;
+package org.apache.felix.framework.util.manifestparser;
import java.util.*;
import org.apache.felix.framework.Logger;
import org.apache.felix.framework.cache.BundleRevision;
import org.apache.felix.framework.searchpolicy.*;
+import org.apache.felix.framework.util.*;
import org.osgi.framework.*;
public class ManifestParser
@@ -224,9 +225,9 @@
// Get native library entry names for module library sources.
m_libraryHeaders =
- Util.parseLibraryStrings(
+ parseLibraryStrings(
m_logger,
- Util.parseDelimitedString((String) m_headerMap.get(Constants.BUNDLE_NATIVECODE), ","));
+ parseDelimitedString((String) m_headerMap.get(Constants.BUNDLE_NATIVECODE), ","));
// Check to see if there was an optional native library clause, which is
// represented by a null library header; if so, record it and remove it.
@@ -808,7 +809,7 @@
"A header cannot be an empty string.");
}
- String[] clauseStrings = Util.parseDelimitedString(
+ String[] clauseStrings = parseDelimitedString(
header, FelixConstants.CLASS_PATH_SEPARATOR);
List completeList = new ArrayList();
@@ -827,7 +828,7 @@
throws IllegalArgumentException
{
// Break string into semi-colon delimited pieces.
- String[] pieces = Util.parseDelimitedString(
+ String[] pieces = parseDelimitedString(
clauseString, FelixConstants.PACKAGE_SEPARATOR);
// Count the number of different paths; paths
@@ -926,4 +927,98 @@
return clause;
}
+
+ /**
+ * Parses delimited string and returns an array containing the tokens. This
+ * parser obeys quotes, so the delimiter character will be ignored if it is
+ * inside of a quote. This method assumes that the quote character is not
+ * included in the set of delimiter characters.
+ * @param value the delimited string to parse.
+ * @param delim the characters delimiting the tokens.
+ * @return an array of string tokens or null if there were no tokens.
+ **/
+ public static String[] parseDelimitedString(String value, String delim)
+ {
+ if (value == null)
+ {
+ value = "";
+ }
+
+ List list = new ArrayList();
+
+ int CHAR = 1;
+ int DELIMITER = 2;
+ int STARTQUOTE = 4;
+ int ENDQUOTE = 8;
+
+ StringBuffer sb = new StringBuffer();
+
+ int expecting = (CHAR | DELIMITER | STARTQUOTE);
+
+ for (int i = 0; i < value.length(); i++)
+ {
+ char c = value.charAt(i);
+
+ boolean isDelimiter = (delim.indexOf(c) >= 0);
+ boolean isQuote = (c == '"');
+
+ if (isDelimiter && ((expecting & DELIMITER) > 0))
+ {
+ list.add(sb.toString().trim());
+ sb.delete(0, sb.length());
+ expecting = (CHAR | DELIMITER | STARTQUOTE);
+ }
+ else if (isQuote && ((expecting & STARTQUOTE) > 0))
+ {
+ sb.append(c);
+ expecting = CHAR | ENDQUOTE;
+ }
+ else if (isQuote && ((expecting & ENDQUOTE) > 0))
+ {
+ sb.append(c);
+ expecting = (CHAR | STARTQUOTE | DELIMITER);
+ }
+ else if ((expecting & CHAR) > 0)
+ {
+ sb.append(c);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid delimited string: " + value);
+ }
+ }
+
+ if (sb.length() > 0)
+ {
+ list.add(sb.toString().trim());
+ }
+
+ return (String[]) list.toArray(new String[list.size()]);
+ }
+
+ /**
+ * Parses native code manifest headers.
+ * @param libStrs an array of native library manifest header
+ * strings from the bundle manifest.
+ * @return an array of <tt>LibraryInfo</tt> objects for the
+ * passed in strings.
+ **/
+ public static R4LibraryClause[] parseLibraryStrings(Logger logger, String[] libStrs)
+ throws IllegalArgumentException
+ {
+ if (libStrs == null)
+ {
+ return new R4LibraryClause[0];
+ }
+
+ List libList = new ArrayList();
+
+ for (int i = 0; i < libStrs.length; i++)
+ {
+ R4LibraryClause clause = R4LibraryClause.parse(logger, libStrs[i]);
+ libList.add(clause);
+ }
+
+ return (R4LibraryClause[]) libList.toArray(new R4LibraryClause[libList.size()]);
+ }
}
\ No newline at end of file
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Attribute.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Attribute.java
similarity index 95%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Attribute.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Attribute.java
index 8eedbdb..7bb5a2c 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Attribute.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Attribute.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
public class R4Attribute
{
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Directive.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Directive.java
similarity index 95%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Directive.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Directive.java
index c8a343e..3dfaa48 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Directive.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Directive.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
public class R4Directive
{
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Export.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Export.java
similarity index 97%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Export.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Export.java
index ff4e77a..8cdef06 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Export.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Export.java
@@ -16,10 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
import java.util.*;
-
import org.apache.felix.framework.util.Util;
import org.osgi.framework.Constants;
import org.osgi.framework.Version;
@@ -48,7 +47,7 @@
}
else if (m_directives[i].getName().equals(Constants.INCLUDE_DIRECTIVE))
{
- String[] ss = Util.parseDelimitedString(m_directives[i].getValue(), ",");
+ String[] ss = ManifestParser.parseDelimitedString(m_directives[i].getValue(), ",");
m_includeFilter = new String[ss.length][];
for (int filterIdx = 0; filterIdx < ss.length; filterIdx++)
{
@@ -57,7 +56,7 @@
}
else if (m_directives[i].getName().equals(Constants.EXCLUDE_DIRECTIVE))
{
- String[] ss = Util.parseDelimitedString(m_directives[i].getValue(), ",");
+ String[] ss = ManifestParser.parseDelimitedString(m_directives[i].getValue(), ",");
m_excludeFilter = new String[ss.length][];
for (int filterIdx = 0; filterIdx < ss.length; filterIdx++)
{
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Import.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Import.java
similarity index 97%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Import.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Import.java
index acf7166..44ae911 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Import.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Import.java
@@ -16,8 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
+import org.apache.felix.framework.searchpolicy.*;
+import org.apache.felix.framework.util.VersionRange;
import org.osgi.framework.Constants;
import org.osgi.framework.Version;
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Library.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
similarity index 98%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Library.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
index 61fb70c..624b987 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Library.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Library.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
import org.apache.felix.framework.Logger;
import org.apache.felix.framework.cache.BundleRevision;
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4LibraryClause.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
similarity index 99%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4LibraryClause.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
index c0a2754..c748915 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4LibraryClause.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4LibraryClause.java
@@ -16,14 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
import java.util.*;
-
import org.apache.felix.framework.FilterImpl;
import org.apache.felix.framework.Logger;
import org.apache.felix.framework.util.FelixConstants;
import org.apache.felix.framework.util.PropertyResolver;
+
+import org.apache.felix.framework.util.VersionRange;
import org.osgi.framework.*;
public class R4LibraryClause
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Package.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Package.java
similarity index 97%
rename from framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Package.java
rename to framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Package.java
index 06dee44..e6480cc 100755
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4Package.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/R4Package.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.felix.framework.searchpolicy;
+package org.apache.felix.framework.util.manifestparser;
import org.osgi.framework.Version;
diff --git a/framework/src/main/java/org/apache/felix/moduleloader/IModuleDefinition.java b/framework/src/main/java/org/apache/felix/moduleloader/IModuleDefinition.java
index 2811661..26a391b 100644
--- a/framework/src/main/java/org/apache/felix/moduleloader/IModuleDefinition.java
+++ b/framework/src/main/java/org/apache/felix/moduleloader/IModuleDefinition.java
@@ -18,6 +18,9 @@
*/
package org.apache.felix.moduleloader;
+import org.apache.felix.framework.util.manifestparser.R4Import;
+import org.apache.felix.framework.util.manifestparser.R4Export;
+import org.apache.felix.framework.util.manifestparser.R4Library;
import org.apache.felix.framework.searchpolicy.*;
public interface IModuleDefinition
diff --git a/framework/src/main/java/org/apache/felix/moduleloader/IWire.java b/framework/src/main/java/org/apache/felix/moduleloader/IWire.java
index 6807363..6fea614 100644
--- a/framework/src/main/java/org/apache/felix/moduleloader/IWire.java
+++ b/framework/src/main/java/org/apache/felix/moduleloader/IWire.java
@@ -21,7 +21,7 @@
import java.net.URL;
import java.util.Enumeration;
-import org.apache.felix.framework.searchpolicy.R4Export;
+import org.apache.felix.framework.util.manifestparser.R4Export;
public interface IWire
{