Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBJ Hargrave2013-05-22 16:45:06 +0000
committerBJ Hargrave2013-05-22 20:57:47 +0000
commitd68069ae33ca988ddceb36a55e5e8c2bb299e8e5 (patch)
treeae7d6ec9a429966585ac3816e75c1b98269e0d31 /bundles/org.eclipse.osgi/osgi/src/org
parent4ee7d51dc44cf5ae743a52ecaf5c921bc446b939 (diff)
downloadrt.equinox.framework-d68069ae33ca988ddceb36a55e5e8c2bb299e8e5.tar.gz
rt.equinox.framework-d68069ae33ca988ddceb36a55e5e8c2bb299e8e5.tar.xz
rt.equinox.framework-d68069ae33ca988ddceb36a55e5e8c2bb299e8e5.zip
Update OSGi API to use annotations
Use OSGi versioning annotations. Also move ident to @author, use @Override and @SuppressWarnings, use PrivilegedAction<Void> when the action does not return any value Signed-off-by: BJ Hargrave <hargrave@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/osgi/src/org')
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java20
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java20
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java8
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.java13
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.java8
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java3
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleException.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java13
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleReference.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java19
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Configurable.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Constants.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java12
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/InvalidSyntaxException.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java18
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceException.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceFactory.java8
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java24
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SignerProperty.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java8
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java19
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java19
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/CollisionHook.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/EventHook.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/FindHook.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHook.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHookFactory.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventListenerHook.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java9
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java8
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClass.java12
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClassListener.java8
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/FrameworkFactory.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/AbstractWiringNamespace.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/BundleNamespace.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/ExecutionEnvironmentNamespace.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/IdentityNamespace.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/PackageNamespace.java4
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/BundleStartLevel.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/FrameworkStartLevel.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevisions.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java6
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java38
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/FrameworkWiring.java6
63 files changed, 343 insertions, 189 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java
index c28a970b8..9f0866e63 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdaptPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import java.util.Map;
* {@code AdaptPermission} has one action: {@code adapt}.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
public final class AdaptPermission extends BasicPermission {
@@ -286,6 +286,7 @@ public final class AdaptPermission extends BasicPermission {
* @return {@code true} if the specified permission is implied by this
* object; {@code false} otherwise.
*/
+ @Override
public boolean implies(Permission p) {
if (!(p instanceof AdaptPermission)) {
return false;
@@ -339,6 +340,7 @@ public final class AdaptPermission extends BasicPermission {
* @return Canonical string representation of the {@code AdaptPermission}
* actions.
*/
+ @Override
public String getActions() {
String result = actions;
if (result == null) {
@@ -353,6 +355,7 @@ public final class AdaptPermission extends BasicPermission {
*
* @return A new {@code PermissionCollection} object.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new AdaptPermissionCollection();
}
@@ -369,6 +372,7 @@ public final class AdaptPermission extends BasicPermission {
* the same name and actions as this {@code AdaptPermission} object;
* {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -388,6 +392,7 @@ public final class AdaptPermission extends BasicPermission {
*
* @return A hash code value for this object.
*/
+ @Override
public int hashCode() {
int h = 31 * 17 + getName().hashCode();
h = 31 * h + getActions().hashCode();
@@ -437,8 +442,8 @@ public final class AdaptPermission extends BasicPermission {
final Map<String, Object> map = new HashMap<String, Object>(5);
map.put("adaptClass", getName());
if (bundle != null) {
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
- public Object run() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
map.put("id", new Long(bundle.getBundleId()));
map.put("location", bundle.getLocation());
String name = bundle.getSymbolicName();
@@ -501,6 +506,7 @@ final class AdaptPermissionCollection extends PermissionCollection {
* @throws SecurityException If this {@code AdaptPermissionCollection}
* object has been marked read-only.
*/
+ @Override
public void add(final Permission permission) {
if (!(permission instanceof AdaptPermission)) {
throw new IllegalArgumentException("invalid permission: " + permission);
@@ -546,6 +552,7 @@ final class AdaptPermissionCollection extends PermissionCollection {
* @return {@code true} if {@code permission} is a proper subset of a
* permission in the set; {@code false} otherwise.
*/
+ @Override
public boolean implies(final Permission permission) {
if (!(permission instanceof AdaptPermission)) {
return false;
@@ -589,6 +596,7 @@ final class AdaptPermissionCollection extends PermissionCollection {
*
* @return Enumeration of all {@code AdaptPermission} objects.
*/
+ @Override
public synchronized Enumeration<Permission> elements() {
List<Permission> all = new ArrayList<Permission>(permissions.values());
return Collections.enumeration(all);
@@ -606,7 +614,9 @@ final class AdaptPermissionCollection extends PermissionCollection {
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
- permissions = (HashMap<String, AdaptPermission>) gfields.get("permissions", null);
+ @SuppressWarnings("unchecked")
+ HashMap<String, AdaptPermission> p = (HashMap<String, AdaptPermission>) gfields.get("permissions", null);
+ permissions = p;
all_allowed = gfields.get("all_allowed", false);
}
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java
index 6427b848a..2a803b07d 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AdminPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,7 +69,8 @@ import java.util.Map;
* startlevel FrameworkStartLevel.setStartLevel
* FrameworkStartLevel.setInitialBundleStartLevel
* context Bundle.getBundleContext
- * weave WovenClass.setBytes
+ * weave WovenClass.getBytes
+ * WovenClass.setBytes
* WovenClass.getDynamicImports for modification
* </pre>
*
@@ -91,7 +92,7 @@ import java.util.Map;
* Filter attribute names are processed in a case sensitive manner.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
public final class AdminPermission extends BasicPermission {
@@ -596,6 +597,7 @@ public final class AdminPermission extends BasicPermission {
* @return {@code true} if the specified permission is implied by this
* object; {@code false} otherwise.
*/
+ @Override
public boolean implies(Permission p) {
if (!(p instanceof AdminPermission)) {
return false;
@@ -666,6 +668,7 @@ public final class AdminPermission extends BasicPermission {
* @return Canonical string representation of the {@code AdminPermission}
* actions.
*/
+ @Override
public String getActions() {
String result = actions;
if (result == null) {
@@ -743,6 +746,7 @@ public final class AdminPermission extends BasicPermission {
*
* @return A new {@code PermissionCollection} object.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new AdminPermissionCollection();
}
@@ -754,6 +758,7 @@ public final class AdminPermission extends BasicPermission {
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -773,6 +778,7 @@ public final class AdminPermission extends BasicPermission {
*
* @return Hash code value for this object.
*/
+ @Override
public int hashCode() {
int h = 31 * 17 + getName().hashCode();
h = 31 * h + getActions().hashCode();
@@ -836,8 +842,8 @@ public final class AdminPermission extends BasicPermission {
recurse.set(bundle);
try {
final Map<String, Object> map = new HashMap<String, Object>(4);
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
- public Object run() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
map.put("id", new Long(bundle.getBundleId()));
map.put("location", bundle.getLocation());
String name = bundle.getSymbolicName();
@@ -896,6 +902,7 @@ final class AdminPermissionCollection extends PermissionCollection {
* @throws SecurityException If this {@code AdminPermissionCollection}
* object has been marked read-only.
*/
+ @Override
public void add(Permission permission) {
if (!(permission instanceof AdminPermission)) {
throw new IllegalArgumentException("invalid permission: " + permission);
@@ -939,6 +946,7 @@ final class AdminPermissionCollection extends PermissionCollection {
* {@code AdminPermission} in this collection, {@code false}
* otherwise.
*/
+ @Override
public boolean implies(Permission permission) {
if (!(permission instanceof AdminPermission)) {
return false;
@@ -982,6 +990,7 @@ final class AdminPermissionCollection extends PermissionCollection {
*
* @return Enumeration of all {@code AdminPermission} objects.
*/
+ @Override
public synchronized Enumeration<Permission> elements() {
List<Permission> all = new ArrayList<Permission>(permissions.values());
return Collections.enumeration(all);
@@ -1000,6 +1009,7 @@ final class AdminPermissionCollection extends PermissionCollection {
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
+ @SuppressWarnings("unchecked")
Hashtable<String, AdminPermission> hashtable = (Hashtable<String, AdminPermission>) gfields.get("permissions", null);
permissions = new HashMap<String, AdminPermission>(hashtable);
all_allowed = gfields.get("all_allowed", false);
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java
index 7a0c82db4..fc2039183 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/AllServiceListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ConsumerType;
+
/**
* A {@code ServiceEvent} listener that does not filter based upon package
* wiring. {@code AllServiceListener} is a listener interface that may be
@@ -52,9 +54,9 @@ package org.osgi.framework;
* @see ServicePermission
* @ThreadSafe
* @since 1.3
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface AllServiceListener extends ServiceListener {
// This is a marker interface
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.java
index 07244666a..5ebb357f8 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Bundle.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import java.util.Dictionary;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.wiring.FrameworkWiring;
/**
@@ -75,8 +76,9 @@ import org.osgi.framework.wiring.FrameworkWiring;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface Bundle extends Comparable<Bundle> {
/**
* The bundle is uninstalled and may not be used.
@@ -279,14 +281,14 @@ public interface Bundle extends Comparable<Bundle> {
* before continuing. If this does not occur in a reasonable time, a
* {@code BundleException} is thrown to indicate this bundle was unable to
* be started.</li>
- * <li>If this bundle's state is {@code ACTIVE} then this method returns
- * immediately.</li>
* <li>If the {@link #START_TRANSIENT} option is not set then set this
* bundle's autostart setting to <em>Started with declared activation</em>
* if the {@link #START_ACTIVATION_POLICY} option is set or
* <em>Started with eager activation</em> if not set. When the Framework is
* restarted and this bundle's autostart setting is not <em>Stopped</em>,
* this bundle must be automatically started.</li>
+ * <li>If this bundle's state is {@code ACTIVE} then this method returns
+ * immediately.</li>
* <li>If this bundle's state is not {@code RESOLVED}, an attempt is made to
* resolve this bundle. If the Framework cannot resolve this bundle, a
* {@code BundleException} is thrown.</li>
@@ -318,9 +320,6 @@ public interface Bundle extends Comparable<Bundle> {
* <li>A {@code BundleException} is then thrown.</li>
* </ul>
* </li>
- * <li>If this bundle's state is {@code UNINSTALLED}, because this bundle
- * was uninstalled while the {@code BundleActivator.start} method was
- * running, a {@code BundleException} is thrown.</li>
* <li>This bundle's state is set to {@code ACTIVE}.</li>
* <li>A bundle event of type {@link BundleEvent#STARTED} is fired.</li>
* </ol>
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.java
index 45c8b37f5..a9d91a8ae 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleActivator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ConsumerType;
+
/**
* Customizes the starting and stopping of a bundle.
* <p>
@@ -44,9 +46,9 @@ package org.osgi.framework;
* created by {@code Class.newInstance()}.
*
* @NotThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface BundleActivator {
/**
* Called when this bundle is started so the Framework can perform the
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java
index ff5b7a376..3e8ca046c 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleContext.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.InputStream;
import java.util.Collection;
import java.util.Dictionary;
+import org.osgi.annotation.versioning.ProviderType;
/**
* A bundle's execution context within the Framework. The context is used to
@@ -87,7 +88,7 @@ import java.util.Dictionary;
* @noimplement
* @author $Id$
*/
-
+@ProviderType
public interface BundleContext extends BundleReference {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.java
index e96b8598f..cd4984821 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleEvent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ import java.util.EventObject;
* @Immutable
* @see BundleListener
* @see SynchronousBundleListener
- * @version $Id$
+ * @author $Id$
*/
public class BundleEvent extends EventObject {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleException.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleException.java
index 0c97ed269..a0d23c4cb 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleException.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ package org.osgi.framework;
* <p>
* This exception conforms to the general purpose exception chaining mechanism.
*
- * @version $Id$
+ * @author $Id$
*/
public class BundleException extends Exception {
@@ -203,6 +203,7 @@ public class BundleException extends Exception {
* @return The cause of this exception or {@code null} if no cause was set.
* @since 1.3
*/
+ @Override
public Throwable getCause() {
return super.getCause();
}
@@ -218,6 +219,7 @@ public class BundleException extends Exception {
* been set.
* @since 1.3
*/
+ @Override
public Throwable initCause(Throwable cause) {
return super.initCause(cause);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java
index d48b4a8a5..2c27d37a3 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework;
import java.util.EventListener;
+import org.osgi.annotation.versioning.ConsumerType;
/**
* A {@code BundleEvent} listener. {@code BundleListener} is a listener
@@ -34,9 +35,9 @@ import java.util.EventListener;
*
* @see BundleEvent
* @NotThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface BundleListener extends EventListener {
/**
* Receives notification that a bundle has had a lifecycle change.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java
index ccba905e3..5d3a115a2 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundlePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ import java.util.Map;
*
* @since 1.3
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
public final class BundlePermission extends BasicPermission {
@@ -287,6 +287,7 @@ public final class BundlePermission extends BasicPermission {
* @return {@code true} if the specified {@code BundlePermission} action is
* implied by this object; {@code false} otherwise.
*/
+ @Override
public boolean implies(Permission p) {
if (!(p instanceof BundlePermission)) {
return false;
@@ -309,6 +310,7 @@ public final class BundlePermission extends BasicPermission {
* @return Canonical string representation of the {@code BundlePermission
* } actions.
*/
+ @Override
public String getActions() {
String result = actions;
if (result == null) {
@@ -351,6 +353,7 @@ public final class BundlePermission extends BasicPermission {
*
* @return A new {@code PermissionCollection} object.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new BundlePermissionCollection();
}
@@ -368,6 +371,7 @@ public final class BundlePermission extends BasicPermission {
* has the same bundle symbolic name and actions as this
* {@code BundlePermission} object; {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -387,6 +391,7 @@ public final class BundlePermission extends BasicPermission {
*
* @return A hash code value for this object.
*/
+ @Override
public int hashCode() {
int h = 31 * 17 + getName().hashCode();
h = 31 * h + getActions().hashCode();
@@ -461,6 +466,7 @@ final class BundlePermissionCollection extends PermissionCollection {
* @throws SecurityException If this {@code BundlePermissionCollection}
* object has been marked read-only.
*/
+ @Override
public void add(final Permission permission) {
if (!(permission instanceof BundlePermission)) {
throw new IllegalArgumentException("invalid permission: " + permission);
@@ -500,6 +506,7 @@ final class BundlePermissionCollection extends PermissionCollection {
* @return {@code true} if {@code permission} is a proper subset of a
* permission in the set; {@code false} otherwise.
*/
+ @Override
public boolean implies(final Permission permission) {
if (!(permission instanceof BundlePermission)) {
return false;
@@ -559,6 +566,7 @@ final class BundlePermissionCollection extends PermissionCollection {
*
* @return Enumeration of all {@code BundlePermission} objects.
*/
+ @Override
public synchronized Enumeration<Permission> elements() {
List<Permission> all = new ArrayList<Permission>(permissions.values());
return Collections.enumeration(all);
@@ -577,6 +585,7 @@ final class BundlePermissionCollection extends PermissionCollection {
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
+ @SuppressWarnings("unchecked")
Hashtable<String, BundlePermission> hashtable = (Hashtable<String, BundlePermission>) gfields.get("permissions", null);
permissions = new HashMap<String, BundlePermission>(hashtable);
all_allowed = gfields.get("all_allowed", false);
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleReference.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleReference.java
index e61bd3e02..ddb8a8c38 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleReference.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/BundleReference.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,14 +16,17 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ProviderType;
+
/**
* A reference to a Bundle.
*
* @since 1.5
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleReference {
/**
* Returns the {@code Bundle} object associated with this
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java
index d57e79740..1d8e892cf 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/CapabilityPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ import java.util.Set;
* </ul>
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
* @since 1.6
*/
@@ -334,6 +334,7 @@ public final class CapabilityPermission extends BasicPermission {
* @return {@code true} if the specified permission is implied by this
* object; {@code false} otherwise.
*/
+ @Override
public boolean implies(Permission p) {
if (!(p instanceof CapabilityPermission)) {
return false;
@@ -382,6 +383,7 @@ public final class CapabilityPermission extends BasicPermission {
*
* @return The canonical string representation of the actions.
*/
+ @Override
public String getActions() {
String result = actions;
if (result == null) {
@@ -413,6 +415,7 @@ public final class CapabilityPermission extends BasicPermission {
* @return A new {@code PermissionCollection} object suitable for storing
* {@code CapabilityPermission} objects.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new CapabilityPermissionCollection();
}
@@ -428,6 +431,7 @@ public final class CapabilityPermission extends BasicPermission {
* name and actions as this {@code CapabilityPermission} object;
* {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -448,6 +452,7 @@ public final class CapabilityPermission extends BasicPermission {
*
* @return Hash code value for this object.
*/
+ @Override
public int hashCode() {
int h = 31 * 17 + getName().hashCode();
h = 31 * h + getActions().hashCode();
@@ -501,8 +506,8 @@ public final class CapabilityPermission extends BasicPermission {
if (bundle == null) {
return properties = props;
}
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
- public Object run() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
props.put("id", new Long(bundle.getBundleId()));
props.put("location", bundle.getLocation());
String name = bundle.getSymbolicName();
@@ -530,6 +535,7 @@ public final class CapabilityPermission extends BasicPermission {
entries = null;
}
+ @Override
public Object get(Object k) {
if (!(k instanceof String)) {
return null;
@@ -608,6 +614,7 @@ final class CapabilityPermissionCollection extends PermissionCollection {
* @throws SecurityException If this {@code CapabilityPermissionCollection}
* object has been marked read-only.
*/
+ @Override
public void add(final Permission permission) {
if (!(permission instanceof CapabilityPermission)) {
throw new IllegalArgumentException("invalid permission: " + permission);
@@ -662,6 +669,7 @@ final class CapabilityPermissionCollection extends PermissionCollection {
* @return {@code true} if {@code permission} is a proper subset of a
* permission in the set; {@code false} otherwise.
*/
+ @Override
public boolean implies(final Permission permission) {
if (!(permission instanceof CapabilityPermission)) {
return false;
@@ -742,6 +750,7 @@ final class CapabilityPermissionCollection extends PermissionCollection {
*
* @return Enumeration of all the CapabilityPermission objects.
*/
+ @Override
public synchronized Enumeration<Permission> elements() {
List<Permission> all = new ArrayList<Permission>(permissions.values());
Map<String, CapabilityPermission> pc = filterPermissions;
@@ -765,9 +774,11 @@ final class CapabilityPermissionCollection extends PermissionCollection {
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
+ @SuppressWarnings("unchecked")
HashMap<String, CapabilityPermission> p = (HashMap<String, CapabilityPermission>) gfields.get("permissions", null);
permissions = p;
all_allowed = gfields.get("all_allowed", false);
+ @SuppressWarnings("unchecked")
HashMap<String, CapabilityPermission> fp = (HashMap<String, CapabilityPermission>) gfields.get("filterPermissions", null);
filterPermissions = fp;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Configurable.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Configurable.java
index 1018601ae..dce95833d 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Configurable.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Configurable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ package org.osgi.framework;
* {@code instanceof Configurable}.
*
* @deprecated As of 1.2. Please use Configuration Admin service.
- * @version $Id$
+ * @author $Id$
*/
public interface Configurable {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Constants.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Constants.java
index d31896e63..22d390f39 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Constants.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Constants.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.hooks.bundle.CollisionHook;
import org.osgi.framework.launch.Framework;
@@ -29,9 +30,9 @@ import org.osgi.framework.launch.Framework;
*
* @since 1.1
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
-
+@ProviderType
public interface Constants {
/**
* Location identifier of the OSGi <i>system bundle </i>, which is defined
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java
index 807a04ac0..1d5b36f14 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.osgi.framework;
import java.util.Dictionary;
import java.util.Map;
+import org.osgi.annotation.versioning.ProviderType;
/**
* An <a href="http://www.ietf.org/rfc/rfc1960.txt">RFC 1960</a>-based Filter.
@@ -42,8 +43,9 @@ import java.util.Map;
* @see "Core Specification, Filters, for a description of the filter string syntax."
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface Filter {
/**
* Filter using a service's properties.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java
index dac4691af..7b74a6831 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkEvent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ import org.osgi.framework.wiring.FrameworkWiring;
*
* @Immutable
* @see FrameworkListener
- * @version $Id$
+ * @author $Id$
*/
public class FrameworkEvent extends EventObject {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java
index ad7f563bd..97c76c64c 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework;
import java.util.EventListener;
+import org.osgi.annotation.versioning.ConsumerType;
/**
* A {@code FrameworkEvent} listener. {@code FrameworkListener} is a listener
@@ -34,9 +35,9 @@ import java.util.EventListener;
*
* @see FrameworkEvent
* @NotThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface FrameworkListener extends EventListener {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java
index e7209cd11..e93d15cef 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java
@@ -43,7 +43,7 @@ import javax.security.auth.x500.X500Principal;
*
* @since 1.3
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
public class FrameworkUtil {
/**
@@ -539,6 +539,7 @@ public class FrameworkUtil {
*
* @return This {@code Filter}'s filter string.
*/
+ @Override
public String toString() {
String result = filterString;
if (result == null) {
@@ -661,6 +662,7 @@ public class FrameworkUtil {
* {@code this.toString().equals(obj.toString()}; {@code false}
* otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -682,6 +684,7 @@ public class FrameworkUtil {
*
* @return The hashCode of this {@code Filter}.
*/
+ @Override
public int hashCode() {
return this.toString().hashCode();
}
@@ -768,6 +771,7 @@ public class FrameworkUtil {
return compare_Boolean(operation, ((Boolean) value1).booleanValue(), value2);
}
if (value1 instanceof Comparable<?>) {
+ @SuppressWarnings("unchecked")
Comparable<Object> comparable = (Comparable<Object>) value1;
return compare_Comparable(operation, comparable, value2);
}
@@ -1615,6 +1619,7 @@ public class FrameworkUtil {
this.keys = keyList.toArray(new String[keyList.size()]);
}
+ @Override
public Object get(Object o) {
String k = (String) o;
for (String key : keys) {
@@ -1643,6 +1648,7 @@ public class FrameworkUtil {
this.reference = reference;
}
+ @Override
public Object get(Object key) {
if (reference == null) {
return null;
@@ -1655,14 +1661,14 @@ public class FrameworkUtil {
}
}
- static private final class SetAccessibleAction implements PrivilegedAction<Object> {
+ static private final class SetAccessibleAction implements PrivilegedAction<Void> {
private final AccessibleObject accessible;
SetAccessibleAction(AccessibleObject accessible) {
this.accessible = accessible;
}
- public Object run() {
+ public Void run() {
accessible.setAccessible(true);
return null;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/InvalidSyntaxException.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/InvalidSyntaxException.java
index 8820ca2db..59696296e 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/InvalidSyntaxException.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/InvalidSyntaxException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ package org.osgi.framework;
* <p>
* This exception conforms to the general purpose exception chaining mechanism.
*
- * @version $Id$
+ * @author $Id$
*/
public class InvalidSyntaxException extends Exception {
@@ -99,6 +99,7 @@ public class InvalidSyntaxException extends Exception {
* @return The cause of this exception or {@code null} if no cause was set.
* @since 1.3
*/
+ @Override
public Throwable getCause() {
return super.getCause();
}
@@ -114,6 +115,7 @@ public class InvalidSyntaxException extends Exception {
* been set.
* @since 1.3
*/
+ @Override
public Throwable initCause(Throwable cause) {
return super.initCause(cause);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
index 4f9324c0e..c2d45ff15 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ import java.util.Map;
* deprecated, implies the {@code import} action.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
public final class PackagePermission extends BasicPermission {
@@ -372,6 +372,7 @@ public final class PackagePermission extends BasicPermission {
* @return {@code true} if the specified permission is implied by this
* object; {@code false} otherwise.
*/
+ @Override
public boolean implies(Permission p) {
if (!(p instanceof PackagePermission)) {
return false;
@@ -424,6 +425,7 @@ public final class PackagePermission extends BasicPermission {
* @return Canonical string representation of the {@code PackagePermission}
* actions.
*/
+ @Override
public String getActions() {
String result = actions;
if (result == null) {
@@ -453,6 +455,7 @@ public final class PackagePermission extends BasicPermission {
*
* @return A new {@code PermissionCollection} object.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new PackagePermissionCollection();
}
@@ -470,6 +473,7 @@ public final class PackagePermission extends BasicPermission {
* has the same package name and actions as this
* {@code PackagePermission} object; {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -489,6 +493,7 @@ public final class PackagePermission extends BasicPermission {
*
* @return A hash code value for this object.
*/
+ @Override
public int hashCode() {
int h = 31 * 17 + getName().hashCode();
h = 31 * h + getActions().hashCode();
@@ -538,8 +543,8 @@ public final class PackagePermission extends BasicPermission {
final Map<String, Object> map = new HashMap<String, Object>(5);
map.put("package.name", getName());
if (bundle != null) {
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
- public Object run() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
map.put("id", new Long(bundle.getBundleId()));
map.put("location", bundle.getLocation());
String name = bundle.getSymbolicName();
@@ -609,6 +614,7 @@ final class PackagePermissionCollection extends PermissionCollection {
* @throws SecurityException If this {@code PackagePermissionCollection}
* object has been marked read-only.
*/
+ @Override
public void add(final Permission permission) {
if (!(permission instanceof PackagePermission)) {
throw new IllegalArgumentException("invalid permission: " + permission);
@@ -665,6 +671,7 @@ final class PackagePermissionCollection extends PermissionCollection {
* @return {@code true} if {@code permission} is a proper subset of a
* permission in the set; {@code false} otherwise.
*/
+ @Override
public boolean implies(final Permission permission) {
if (!(permission instanceof PackagePermission)) {
return false;
@@ -743,6 +750,7 @@ final class PackagePermissionCollection extends PermissionCollection {
*
* @return Enumeration of all {@code PackagePermission} objects.
*/
+ @Override
public synchronized Enumeration<Permission> elements() {
List<Permission> all = new ArrayList<Permission>(permissions.values());
Map<String, PackagePermission> pc = filterPermissions;
@@ -767,9 +775,11 @@ final class PackagePermissionCollection extends PermissionCollection {
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
+ @SuppressWarnings("unchecked")
Hashtable<String, PackagePermission> hashtable = (Hashtable<String, PackagePermission>) gfields.get("permissions", null);
permissions = new HashMap<String, PackagePermission>(hashtable);
all_allowed = gfields.get("all_allowed", false);
+ @SuppressWarnings("unchecked")
HashMap<String, PackagePermission> fp = (HashMap<String, PackagePermission>) gfields.get("filterPermissions", null);
filterPermissions = fp;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.java
index 49e34e0ad..b27a941cb 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceEvent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ import java.util.EventObject;
* @Immutable
* @see ServiceListener
* @see AllServiceListener
- * @version $Id$
+ * @author $Id$
*/
public class ServiceEvent extends EventObject {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceException.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceException.java
index 9f7634126..98f0a687b 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceException.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2007, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2007, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ package org.osgi.framework;
* <p>
* This exception conforms to the general purpose exception chaining mechanism.
*
- * @version $Id$
+ * @author $Id$
* @since 1.5
*/
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceFactory.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceFactory.java
index 535776e70..c47ea837d 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceFactory.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ConsumerType;
+
/**
* Allows services to provide customized service objects in the OSGi
* environment.
@@ -45,9 +47,9 @@ package org.osgi.framework;
* @param <S> Type of Service
* @see BundleContext#getService(ServiceReference)
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface ServiceFactory<S> {
/**
* Creates a new service object.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java
index 601dfda61..8468dbc76 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework;
import java.util.EventListener;
+import org.osgi.annotation.versioning.ConsumerType;
/**
* A {@code ServiceEvent} listener. {@code ServiceListener} is a listener
@@ -49,9 +50,9 @@ import java.util.EventListener;
* @see ServiceEvent
* @see ServicePermission
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface ServiceListener extends EventListener {
/**
* Receives notification that a service has had a lifecycle change.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
index eb144295b..ff7fc46dd 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@ import java.util.Set;
* to get the specific service.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
public final class ServicePermission extends BasicPermission {
@@ -207,7 +207,7 @@ public final class ServicePermission extends BasicPermission {
if (reference == null) {
throw new IllegalArgumentException("reference must not be null");
}
- StringBuffer sb = new StringBuffer("(service.id=");
+ StringBuffer sb = new StringBuffer("(" + Constants.SERVICE_ID + "=");
sb.append(reference.getProperty(Constants.SERVICE_ID));
sb.append(")");
return sb.toString();
@@ -364,6 +364,7 @@ public final class ServicePermission extends BasicPermission {
* @return {@code true} if the specified permission is implied by this
* object; {@code false} otherwise.
*/
+ @Override
public boolean implies(Permission p) {
if (!(p instanceof ServicePermission)) {
return false;
@@ -438,6 +439,7 @@ public final class ServicePermission extends BasicPermission {
*
* @return The canonical string representation of the actions.
*/
+ @Override
public String getActions() {
String result = actions;
if (result == null) {
@@ -469,6 +471,7 @@ public final class ServicePermission extends BasicPermission {
* @return A new {@code PermissionCollection} object suitable for storing
* {@code ServicePermission} objects.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new ServicePermissionCollection();
}
@@ -484,6 +487,7 @@ public final class ServicePermission extends BasicPermission {
* class name and actions as this {@code ServicePermission} object;
* {@code false} otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -503,6 +507,7 @@ public final class ServicePermission extends BasicPermission {
*
* @return Hash code value for this object.
*/
+ @Override
public int hashCode() {
int h = 31 * 17 + getName().hashCode();
h = 31 * h + getActions().hashCode();
@@ -556,8 +561,8 @@ public final class ServicePermission extends BasicPermission {
final Map<String, Object> props = new HashMap<String, Object>(4);
final Bundle bundle = service.getBundle();
if (bundle != null) {
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
- public Object run() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
props.put("id", new Long(bundle.getBundleId()));
props.put("location", bundle.getLocation());
String name = bundle.getSymbolicName();
@@ -586,6 +591,7 @@ public final class ServicePermission extends BasicPermission {
entries = null;
}
+ @Override
public Object get(Object k) {
if (!(k instanceof String)) {
return null;
@@ -638,14 +644,17 @@ public final class ServicePermission extends BasicPermission {
throw new UnsupportedOperationException();
}
+ @Override
public String toString() {
return k + "=" + v;
}
+ @Override
public int hashCode() {
return ((k == null) ? 0 : k.hashCode()) ^ ((v == null) ? 0 : v.hashCode());
}
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -716,6 +725,7 @@ final class ServicePermissionCollection extends PermissionCollection {
* @throws SecurityException If this {@code ServicePermissionCollection}
* object has been marked read-only.
*/
+ @Override
public void add(final Permission permission) {
if (!(permission instanceof ServicePermission)) {
throw new IllegalArgumentException("invalid permission: " + permission);
@@ -770,6 +780,7 @@ final class ServicePermissionCollection extends PermissionCollection {
* @return {@code true} if {@code permission} is a proper subset of a
* permission in the set; {@code false} otherwise.
*/
+ @Override
public boolean implies(final Permission permission) {
if (!(permission instanceof ServicePermission)) {
return false;
@@ -876,6 +887,7 @@ final class ServicePermissionCollection extends PermissionCollection {
*
* @return Enumeration of all the ServicePermission objects.
*/
+ @Override
public synchronized Enumeration<Permission> elements() {
List<Permission> all = new ArrayList<Permission>(permissions.values());
Map<String, ServicePermission> pc = filterPermissions;
@@ -900,9 +912,11 @@ final class ServicePermissionCollection extends PermissionCollection {
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
ObjectInputStream.GetField gfields = in.readFields();
+ @SuppressWarnings("unchecked")
Hashtable<String, ServicePermission> hashtable = (Hashtable<String, ServicePermission>) gfields.get("permissions", null);
permissions = new HashMap<String, ServicePermission>(hashtable);
all_allowed = gfields.get("all_allowed", false);
+ @SuppressWarnings("unchecked")
HashMap<String, ServicePermission> fp = (HashMap<String, ServicePermission>) gfields.get("filterPermissions", null);
filterPermissions = fp;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java
index 75352193f..baf87dc28 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceReference.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework;
import java.util.Dictionary;
+import org.osgi.annotation.versioning.ProviderType;
/**
* A reference to a service.
@@ -48,9 +49,9 @@ import java.util.Dictionary;
* @see BundleContext#getService(ServiceReference)
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
-
+@ProviderType
public interface ServiceReference<S> extends Comparable<Object> {
/**
* Returns the property value to which the specified property key is mapped
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.java
index ad3d1ff7a..6b06992d6 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceRegistration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2000, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework;
import java.util.Dictionary;
+import org.osgi.annotation.versioning.ProviderType;
/**
* A registered service.
@@ -34,9 +35,9 @@ import java.util.Dictionary;
* @see BundleContext#registerService(String[],Object,Dictionary)
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
-
+@ProviderType
public interface ServiceRegistration<S> {
/**
* Returns a {@code ServiceReference} object for a service being registered.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SignerProperty.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SignerProperty.java
index 94eea1905..53dec4a36 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SignerProperty.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SignerProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ import java.util.Map;
* during filter expression evaluation in the permission implies method.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
final class SignerProperty {
private final Bundle bundle;
@@ -64,6 +64,7 @@ final class SignerProperty {
* @param o SignerProperty to compare against.
* @return true if the DN name chain matches the pattern.
*/
+ @Override
public boolean equals(Object o) {
if (!(o instanceof SignerProperty))
return false;
@@ -91,6 +92,7 @@ final class SignerProperty {
* Since the equals method does not obey the general equals contract, this
* method cannot generate hash codes which obey the equals contract.
*/
+ @Override
public int hashCode() {
return 31;
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java
index 74246f4ce..6b50c6c9d 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/SynchronousBundleListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ConsumerType;
+
/**
* A synchronous {@code BundleEvent} listener. {@code SynchronousBundleListener}
* is a listener interface that may be implemented by a bundle developer. When a
@@ -57,9 +59,9 @@ package org.osgi.framework;
* @since 1.1
* @see BundleEvent
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface SynchronousBundleListener extends BundleListener {
// This is a marker interface
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java
index 543a34580..c68fe7ab0 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/UnfilteredServiceListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.osgi.framework;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.hooks.service.ListenerHook;
/**
@@ -65,9 +66,9 @@ import org.osgi.framework.hooks.service.ListenerHook;
* @see ServicePermission
* @ThreadSafe
* @since 1.7
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface UnfilteredServiceListener extends ServiceListener {
// This is a marker interface
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java
index a0b5a865f..b41eacd7a 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/Version.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ import java.util.StringTokenizer;
*
* @since 1.3
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public class Version implements Comparable<Version> {
@@ -279,6 +279,7 @@ public class Version implements Comparable<Version> {
*
* @return The string representation of this version identifier.
*/
+ @Override
public String toString() {
return toString0();
}
@@ -289,8 +290,9 @@ public class Version implements Comparable<Version> {
* @return The string representation of this version identifier.
*/
String toString0() {
- if (versionString != null) {
- return versionString;
+ String s = versionString;
+ if (s != null) {
+ return s;
}
int q = qualifier.length();
StringBuffer result = new StringBuffer(20 + q);
@@ -311,11 +313,13 @@ public class Version implements Comparable<Version> {
*
* @return An integer which is a hash code value for this object.
*/
+ @Override
public int hashCode() {
- if (hash != 0) {
- return hash;
+ int h = hash;
+ if (h != 0) {
+ return h;
}
- int h = 31 * 17;
+ h = 31 * 17;
h = 31 * h + major;
h = 31 * h + minor;
h = 31 * h + micro;
@@ -335,6 +339,7 @@ public class Version implements Comparable<Version> {
* @return {@code true} if {@code object} is a {@code Version} and is equal
* to this object; {@code false} otherwise.
*/
+ @Override
public boolean equals(Object object) {
if (object == this) { // quicktest
return true;
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java
index d0c21e6a5..7106211ca 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/VersionRange.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ import java.util.StringTokenizer;
*
* @since 1.7
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public class VersionRange {
@@ -377,9 +377,11 @@ public class VersionRange {
*
* @return The string representation of this version range.
*/
+ @Override
public String toString() {
- if (versionRangeString != null) {
- return versionRangeString;
+ String s = versionRangeString;
+ if (s != null) {
+ return s;
}
String leftVersion = left.toString();
if (right == null) {
@@ -402,14 +404,16 @@ public class VersionRange {
*
* @return An integer which is a hash code value for this object.
*/
+ @Override
public int hashCode() {
- if (hash != 0) {
- return hash;
+ int h = hash;
+ if (h != 0) {
+ return h;
}
if (empty) {
return hash = 31;
}
- int h = 31 + (leftClosed ? 7 : 5);
+ h = 31 + (leftClosed ? 7 : 5);
h = 31 * h + left.hashCode();
if (right != null) {
h = 31 * h + right.hashCode();
@@ -430,6 +434,7 @@ public class VersionRange {
* @return {@code true} if {@code object} is a {@code VersionRange} and is
* equal to this object; {@code false} otherwise.
*/
+ @Override
public boolean equals(Object object) {
if (object == this) { // quicktest
return true;
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/CollisionHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/CollisionHook.java
index 11cbddb52..b05e0c381 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/CollisionHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/CollisionHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.bundle;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
@@ -33,8 +34,9 @@ import org.osgi.framework.Constants;
* in a bundle symbolic name and version collision.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
+@ConsumerType
public interface CollisionHook {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/EventHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/EventHook.java
index e1471b364..0b986db90 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/EventHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/EventHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.bundle;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -28,8 +29,9 @@ import org.osgi.framework.BundleEvent;
* (install, start, stop, update, and uninstall bundle) operations.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
+@ConsumerType
public interface EventHook {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/FindHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/FindHook.java
index ae6bf5fc5..1029e1021 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/FindHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/bundle/FindHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.bundle;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -29,8 +30,9 @@ import org.osgi.framework.BundleException;
* (get bundles) operations.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
+@ConsumerType
public interface FindHook {
/**
* Find hook method. This method is called for the following:
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHook.java
index 325aec709..7b2a0a5db 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.resolver;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.Bundle;
import org.osgi.framework.namespace.BundleNamespace;
import org.osgi.framework.namespace.IdentityNamespace;
@@ -130,8 +131,9 @@ import org.osgi.framework.wiring.FrameworkWiring;
*
* @see ResolverHookFactory
* @NotThreadSafe
- * @version $Id$
+ * @author $Id$
*/
+@ConsumerType
public interface ResolverHook {
/**
* Filter resolvable candidates hook method. This method may be called
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHookFactory.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHookFactory.java
index e0a2f3ad0..d073890a9 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHookFactory.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/resolver/ResolverHookFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.resolver;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.Bundle;
import org.osgi.framework.wiring.BundleRevision;
import org.osgi.framework.wiring.FrameworkWiring;
@@ -31,8 +32,9 @@ import org.osgi.framework.wiring.FrameworkWiring;
*
* @ThreadSafe
* @see ResolverHook
- * @version $Id$
+ * @author $Id$
*/
+@ConsumerType
public interface ResolverHookFactory {
/**
* This method is called by the framework each time a resolve process begins
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java
index 84757a5f7..b8c500c6f 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.service;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;
@@ -29,9 +30,9 @@ import org.osgi.framework.ServiceEvent;
*
* @ThreadSafe
* @deprecated As of 1.1. Replaced by {@link EventListenerHook}.
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface EventHook {
/**
* Event hook method. This method is called prior to service event delivery
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventListenerHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventListenerHook.java
index b0b99b292..2b80241ca 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventListenerHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventListenerHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.osgi.framework.hooks.service;
import java.util.Collection;
import java.util.Map;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.hooks.service.ListenerHook.ListenerInfo;
@@ -31,9 +32,9 @@ import org.osgi.framework.hooks.service.ListenerHook.ListenerInfo;
*
* @ThreadSafe
* @since 1.1
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface EventListenerHook {
/**
* Event listener hook method. This method is called prior to service event
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java
index 45612d6a1..4325a49f8 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.hooks.service;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -28,9 +29,9 @@ import org.osgi.framework.ServiceReference;
* (get service references) operations.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface FindHook {
/**
* Find hook method. This method is called during the service find operation
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
index 94029e2b7..f38cb1f33 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
package org.osgi.framework.hooks.service;
import java.util.Collection;
+import org.osgi.annotation.versioning.ConsumerType;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.BundleContext;
/**
@@ -27,9 +29,9 @@ import org.osgi.framework.BundleContext;
* addition and removal.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface ListenerHook {
/**
* Added listeners hook method. This method is called to provide the hook
@@ -68,6 +70,7 @@ public interface ListenerHook {
* @ThreadSafe
* @noimplement
*/
+ @ProviderType
public interface ListenerInfo {
/**
* Return the context of the bundle which added the listener.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java
index eb38b85f6..7575fc1b0 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ package org.osgi.framework.hooks.weaving;
* <p>
* This exception conforms to the general purpose exception chaining mechanism.
*
- * @version $Id$
+ * @author $Id$
*/
public class WeavingException extends RuntimeException {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java
index d19850290..8d99df5b0 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WeavingHook.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.osgi.framework.hooks.weaving;
+import org.osgi.annotation.versioning.ConsumerType;
+
/**
* OSGi Framework Weaving Hook Service.
*
@@ -34,9 +36,9 @@ package org.osgi.framework.hooks.weaving;
* bytes as modified by previously called weaving hooks.
*
* @ThreadSafe
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface WeavingHook {
/**
* Weaving hook method.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClass.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClass.java
index db897c57d..6c8a81452 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClass.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClass.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.osgi.framework.hooks.weaving;
import java.security.ProtectionDomain;
import java.util.List;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.wiring.BundleWiring;
/**
@@ -34,8 +35,9 @@ import org.osgi.framework.wiring.BundleWiring;
*
* @NotThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface WovenClass {
/**
* The woven class is being transformed.
@@ -164,8 +166,10 @@ public interface WovenClass {
* longer be transformed and the returned list will be unmodifiable.
*
* <p>
- * If the Java runtime environment supports permissions, the caller must
- * have {@code AdminPermission[bundle,WEAVE]} to modify the returned list.
+ * If the Java runtime environment supports permissions, any modification to
+ * the returned list requires {@code AdminPermission[bundle,WEAVE]}.
+ * Additionally, any add or set modification requires
+ * {@code PackagePermission[package,IMPORT]}.
*
* @return A list containing zero or more dynamic import package
* descriptions to add to the bundle wiring for this woven class.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClassListener.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClassListener.java
index 0405b08e9..d8230835b 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClassListener.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/weaving/WovenClassListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
package org.osgi.framework.hooks.weaving;
-
+import org.osgi.annotation.versioning.ConsumerType;
/**
* OSGi Framework Woven Class Listener Service.
@@ -47,9 +47,9 @@ package org.osgi.framework.hooks.weaving;
*
* @ThreadSafe
* @since 1.1
- * @version $Id$
+ * @author $Id$
*/
-
+@ConsumerType
public interface WovenClassListener {
/**
* Receives notification that a {@link WovenClass woven class} has completed
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java
index 2b14cb8f7..21ab62b75 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/Framework.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ package org.osgi.framework.launch;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
@@ -34,8 +35,9 @@ import org.osgi.framework.FrameworkEvent;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface Framework extends Bundle {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/FrameworkFactory.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/FrameworkFactory.java
index 1684e14aa..648dc4d6f 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/FrameworkFactory.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/launch/FrameworkFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2009, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2009, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.launch;
import java.util.Map;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
/**
@@ -45,8 +46,9 @@ import org.osgi.framework.Bundle;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface FrameworkFactory {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/AbstractWiringNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/AbstractWiringNamespace.java
index 383e84df9..6bbd0ddef 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/AbstractWiringNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/AbstractWiringNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.osgi.framework.namespace;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.resource.Namespace;
/**
@@ -31,8 +32,9 @@ import org.osgi.resource.Namespace;
* otherwise indicated.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public abstract class AbstractWiringNamespace extends Namespace {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/BundleNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/BundleNamespace.java
index 339f12047..2672d40cf 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/BundleNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/BundleNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ import org.osgi.resource.Namespace;
* capability.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public final class BundleNamespace extends AbstractWiringNamespace {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/ExecutionEnvironmentNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/ExecutionEnvironmentNamespace.java
index e1c30aac8..45a233050 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/ExecutionEnvironmentNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/ExecutionEnvironmentNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ import org.osgi.resource.Namespace;
* {@code String}, unless otherwise indicated.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public final class ExecutionEnvironmentNamespace extends Namespace {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java
index aa3cc744c..993cb4ace 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/HostNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ import org.osgi.resource.Namespace;
* capability.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public final class HostNamespace extends AbstractWiringNamespace {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/IdentityNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/IdentityNamespace.java
index e34dcaba1..7bc7a11c4 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/IdentityNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/IdentityNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ import org.osgi.resource.Namespace;
* capability.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public final class IdentityNamespace extends Namespace {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java
index 92ba0ee9b..0e11cacf6 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/NativeNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ import org.osgi.resource.Namespace;
* {@code String}, unless otherwise indicated.
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public final class NativeNamespace extends Namespace {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/PackageNamespace.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/PackageNamespace.java
index 5adc45bd1..5f241fb08 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/PackageNamespace.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/namespace/PackageNamespace.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ import org.osgi.resource.Namespace;
* </ul>
*
* @Immutable
- * @version $Id$
+ * @author $Id$
*/
public final class PackageNamespace extends AbstractWiringNamespace {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/BundleStartLevel.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/BundleStartLevel.java
index 9a000be19..a934ad04a 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/BundleStartLevel.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/BundleStartLevel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.osgi.framework.startlevel;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
@@ -30,8 +31,9 @@ import org.osgi.framework.BundleReference;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleStartLevel extends BundleReference {
/**
* Return the assigned start level value for the bundle.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/FrameworkStartLevel.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/FrameworkStartLevel.java
index 155604dee..45837c361 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/FrameworkStartLevel.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/startlevel/FrameworkStartLevel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2002, 2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2002, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.osgi.framework.startlevel;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
import org.osgi.framework.FrameworkListener;
@@ -33,8 +34,9 @@ import org.osgi.framework.FrameworkListener;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface FrameworkStartLevel extends BundleReference {
/**
* Return the active start level value of the Framework.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
index 39086f7e6..f6f845083 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.wiring;
import java.util.Map;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.namespace.AbstractWiringNamespace;
import org.osgi.resource.Capability;
@@ -26,8 +27,9 @@ import org.osgi.resource.Capability;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleCapability extends Capability {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
index 212ffb64f..259e45da7 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.wiring;
import java.util.Map;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.namespace.AbstractWiringNamespace;
import org.osgi.resource.Requirement;
@@ -26,8 +27,9 @@ import org.osgi.resource.Requirement;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleRequirement extends Requirement {
/**
* Returns the bundle revision declaring this requirement.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
index 1748fbbba..44416eae1 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.wiring;
import java.util.List;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
import org.osgi.framework.Constants;
@@ -52,8 +53,9 @@ import org.osgi.resource.Resource;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleRevision extends BundleReference, Resource {
/**
* Returns the symbolic name for this bundle revision.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevisions.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevisions.java
index 842324207..d667e0777 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevisions.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevisions.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.wiring;
import java.util.List;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
@@ -37,8 +38,9 @@ import org.osgi.framework.BundleReference;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleRevisions extends BundleReference {
/**
* Return the bundle revisions for the {@link BundleReference#getBundle()
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
index 02e7cd6ec..e5a315512 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2011, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.osgi.framework.wiring;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.resource.Wire;
/**
@@ -23,8 +24,9 @@ import org.osgi.resource.Wire;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleWire extends Wire {
/**
* Returns the {@link BundleCapability} for this wire.
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
index 04103f9fd..c6860d3e9 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2010, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ package org.osgi.framework.wiring;
import java.net.URL;
import java.util.Collection;
import java.util.List;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
import org.osgi.framework.namespace.IdentityNamespace;
@@ -53,8 +54,9 @@ import org.osgi.resource.Wiring;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface BundleWiring extends BundleReference, Wiring {
/**
* Returns {@code true} if this bundle wiring is the current bundle wiring.
@@ -113,8 +115,8 @@ public interface BundleWiring extends BundleReference, Wiring {
* an empty list if this bundle wiring provides no capabilities in
* the specified namespace. If this bundle wiring is not
* {@link #isInUse() in use}, {@code null} will be returned. For a
- * given namespace, the list contains the wires in the order the
- * capabilities were specified in the manifests of the
+ * given namespace, the list contains the capabilities in the order
+ * the capabilities were specified in the manifests of the
* {@link #getRevision() bundle revision} and the attached
* fragments<sup>&#8224;</sup> of this bundle wiring. There is no
* ordering defined between capabilities in different namespaces.
@@ -143,8 +145,8 @@ public interface BundleWiring extends BundleReference, Wiring {
* or an empty list if this bundle wiring uses no requirements in
* the specified namespace. If this bundle wiring is not
* {@link #isInUse() in use}, {@code null} will be returned. For a
- * given namespace, the list contains the wires in the order the
- * requirements were specified in the manifests of the
+ * given namespace, the list contains the requirements in the order
+ * the requirements were specified in the manifests of the
* {@link #getRevision() bundle revision} and the attached fragments
* of this bundle wiring. There is no ordering defined between
* requirements in different namespaces.
@@ -176,9 +178,10 @@ public interface BundleWiring extends BundleReference, Wiring {
* requirements} in use by this bundle wiring.
*
* <p>
- * This method may return different results if this bundle wiring adds wires
- * to more requirements. For example, dynamically importing a package will
- * establish a new wire to the dynamically imported package.
+ * This method may return different results if this bundle wiring
+ * establishes additional wires to more requirements. For example,
+ * dynamically importing a package will establish a new wire to the
+ * dynamically imported package.
*
* @param namespace The namespace of the requirements for which to return
* wires or {@code null} to return the wires for the requirements in
@@ -191,8 +194,9 @@ public interface BundleWiring extends BundleReference, Wiring {
* given namespace, the list contains the wires in the order the
* requirements were specified in the manifests of the
* {@link #getRevision() bundle revision} and the attached fragments
- * of this bundle wiring. There is no ordering defined between
- * requirements in different namespaces.
+ * of this bundle wiring followed by dynamically established wires,
+ * if any, in the order they were established. There is no ordering
+ * defined between requirements in different namespaces.
*/
List<BundleWire> getRequiredWires(String namespace);
@@ -405,7 +409,7 @@ public interface BundleWiring extends BundleReference, Wiring {
* @return A list containing a snapshot of the {@link Capability}s, or an
* empty list if this wiring provides no capabilities in the
* specified namespace. For a given namespace, the list contains the
- * wires in the order the capabilities were specified in the
+ * capabilities in the order the capabilities were specified in the
* manifests of the {@link #getResource() resource} and the attached
* fragment resources<sup>&#8224;</sup> of this wiring. There is no
* ordering defined between capabilities in different namespaces.
@@ -436,11 +440,11 @@ public interface BundleWiring extends BundleReference, Wiring {
* {@code null} to return the requirements from all namespaces.
* @return A list containing a snapshot of the {@link Requirement}s, or an
* empty list if this wiring uses no requirements in the specified
- * namespace. For a given namespace, the list contains the wires in
- * the order the requirements were specified in the manifests of the
- * {@link #getResource() resource} and the attached fragment
- * resources of this wiring. There is no ordering defined between
- * requirements in different namespaces.
+ * namespace. For a given namespace, the list contains the
+ * requirements in the order the requirements were specified in the
+ * manifests of the {@link #getResource() resource} and the attached
+ * fragment resources of this wiring. There is no ordering defined
+ * between requirements in different namespaces.
* @since 1.1
*/
List<Requirement> getResourceRequirements(String namespace);
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/FrameworkWiring.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/FrameworkWiring.java
index 54742f47d..cb07cf814 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/FrameworkWiring.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/FrameworkWiring.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2012). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2013). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package org.osgi.framework.wiring;
import java.util.Collection;
+import org.osgi.annotation.versioning.ProviderType;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
import org.osgi.framework.FrameworkListener;
@@ -33,8 +34,9 @@ import org.osgi.framework.FrameworkListener;
*
* @ThreadSafe
* @noimplement
- * @version $Id$
+ * @author $Id$
*/
+@ProviderType
public interface FrameworkWiring extends BundleReference {
/**
* Refreshes the specified bundles. This forces the update (replacement) or

Back to the top