[Git][java-team/osgi-annotation][upstream] New upstream version 7.0.0

Emmanuel Bourg gitlab at salsa.debian.org
Sun Aug 2 23:22:30 BST 2020



Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / osgi-annotation


Commits:
4fd9756a by Emmanuel Bourg at 2018-12-28T22:40:45+01:00
New upstream version 7.0.0
- - - - -


18 changed files:

- − LICENSE
- + META-INF/MANIFEST.MF
- − about.html
- + org/osgi/annotation/bundle/Attribute.java
- + org/osgi/annotation/bundle/Capabilities.java
- + org/osgi/annotation/bundle/Capability.java
- + org/osgi/annotation/bundle/Directive.java
- + org/osgi/annotation/bundle/Export.java
- + org/osgi/annotation/bundle/Header.java
- + org/osgi/annotation/bundle/Headers.java
- + org/osgi/annotation/bundle/Requirement.java
- + org/osgi/annotation/bundle/Requirements.java
- + org/osgi/annotation/bundle/package-info.java
- org/osgi/annotation/versioning/ConsumerType.java
- org/osgi/annotation/versioning/ProviderType.java
- org/osgi/annotation/versioning/Version.java
- org/osgi/annotation/versioning/package-info.java
- − org/osgi/annotation/versioning/packageinfo


Changes:

=====================================
LICENSE deleted
=====================================
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.


=====================================
META-INF/MANIFEST.MF
=====================================
@@ -0,0 +1 @@
+Manifest-Version: 1.0


=====================================
about.html deleted
=====================================
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<h3>Copyright</h3>
-<p>Copyright © OSGi Alliance (2000, 2014). All Rights Reserved.</p>
-
-<p>OSGi Alliance<br/>
-Bishop Ranch 6<br/>
-2400 Camino Ramon, Suite 375<br/>
-San Ramon, CA 94583 USA
-</p>
-
-<h3>License</h3>
-<p>The OSGi Alliance makes available all content in this jar ("Work").  Unless otherwise indicated below, the Work is provided to you under the terms and conditions of the
-Apache License, Version 2.0 (the "License").  A copy of the License is available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
-
-<h3>Notices</h3>
-<p>Implementation of certain elements of the Content may be subject to third party
-intellectual property rights, including without limitation, patent rights (such a third party may
-or may not be a member of the OSGi Alliance). The OSGi Alliance and its members are not responsible 
-and shall not be held responsible in any manner for identifying or failing to identify any or 
-all such third party intellectual property rights.</p>
-
-<p>OSGi™ is a trademark, registered trademark, or service mark
-of The OSGi Alliance in the US and other countries. Java is a trademark,
-registered trademark, or service mark of Sun Microsystems, Inc. in the US
-and other countries. All other trademarks, registered trademarks, or
-service marks used in the Content are the property of their respective
-owners and are hereby recognized.</p>
-
-</body>
-</html>


=====================================
org/osgi/annotation/bundle/Attribute.java
=====================================
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) OSGi Alliance (2016, 2018). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark an annotation element as an attribute.
+ * <p>
+ * This is used when applying {@link Capability} or {@link Requirement} as a
+ * meta annotation to an annotation declaration. The value of the annotation
+ * element annotated with {@code Attribute} is used as the value of an attribute
+ * in the generated capability or requirement clause. For example:
+ * 
+ * <pre>
+ * @Capability(namespace = "my.namespace")
+ * public @interface MyCapability {
+ *   @Attribute("attr")
+ *   String value() default "";
+ * }
+ * 
+ * @MyCapability("foo")
+ * public MyClass {}
+ * </pre>
+ * 
+ * The use of the {@code MyCapability} annotation, which is meta annotated with
+ * the {@code Capability} and {@code Attribute} annotations, will result in a
+ * capability in the namespace {@code my.namespace} with the attribute
+ * {@code attr=foo}.
+ * <p>
+ * If the element annotated with {@code Attribute} is unspecified when applied,
+ * then the attribute must not be generated in the generated capability or
+ * requirement clause. For example:
+ * 
+ * <pre>
+ * @MyCapability
+ * public MyClass {}
+ * </pre>
+ * 
+ * will not have the {@code attr} attribute in the generated capability.
+ * <p>
+ * This annotation is not retained at runtime. It is for use by tools to
+ * generate bundle manifests.
+ * 
+ * @author $Id: 78245cbc51f58d2308bbfa600059b9f524979954 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target(ElementType.METHOD)
+public @interface Attribute {
+	/**
+	 * The name of the attribute.
+	 * <p>
+	 * If not specified, the name of the annotated element is used as the name
+	 * of the attribute.
+	 */
+	String value() default "";
+}


=====================================
org/osgi/annotation/bundle/Capabilities.java
=====================================
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) OSGi Alliance (2016). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Container annotation for repeated {@link Capability} annotations.
+ * 
+ * @author $Id: 66ba91e3c6527e7baf58107b0d41e8961094198a $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
+public @interface Capabilities {
+	/**
+	 * Repeated {@link Capability} annotations.
+	 */
+	Capability[] value();
+}


=====================================
org/osgi/annotation/bundle/Capability.java
=====================================
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) OSGi Alliance (2016, 2018). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Define a capability for a bundle.
+ * <p>
+ * For example:
+ * 
+ * <pre>
+ * @Capability(namespace=ExtenderNamespace.EXTENDER_NAMESPACE,
+ *             name="osgi.component", version="1.3.0")
+ * </pre>
+ * <p>
+ * This annotation is not retained at runtime. It is for use by tools to
+ * generate bundle manifests or otherwise process the type or package.
+ * <p>
+ * This annotation can be used to annotate an annotation. If the meta-annotated
+ * annotation declares an element of the same name as an element in this
+ * annotation, the element is considered to override the element in this
+ * annotation.
+ * 
+ * @author $Id: bf3cb5ae29bf95f25c8e217e3807c232b1ffb96c $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
+ at Repeatable(Capabilities.class)
+public @interface Capability {
+
+	/**
+	 * The namespace of this capability.
+	 */
+	String namespace();
+
+	/**
+	 * The name of this capability within the namespace.
+	 * <p>
+	 * If specified, adds an attribute with the name of the namespace and the
+	 * value of the specified name to the capability clause.
+	 */
+	String name() default "";
+
+	/**
+	 * The version of this capability.
+	 * <p>
+	 * If specified, adds an attribute with the name and type of
+	 * {@code version:Version} and the value of the specified version to the
+	 * capability clause.
+	 * <p>
+	 * The specified version must be a valid OSGi version string.
+	 */
+	String version() default "";
+
+	/**
+	 * A list of classes whose packages are inspected to calculate the
+	 * {@code uses} directive for this capability.
+	 * <p>
+	 * If not specified, the {@code uses} directive is omitted from the
+	 * capability clause.
+	 */
+	Class< ? >[] uses() default {};
+
+	/**
+	 * The effective time of this capability.
+	 * <p>
+	 * Specifies the time the capability is available. The OSGi framework
+	 * resolver only considers capabilities without an effective directive or
+	 * effective:=resolve. Capabilities with other values for the effective
+	 * directive can be considered by an external agent.
+	 * <p>
+	 * If not specified, the {@code effective} directive is omitted from the
+	 * capability clause.
+	 */
+	String effective() default "resolve"; // Namespace.EFFECTIVE_RESOLVE
+
+	/**
+	 * A list of attribute or directive names and values.
+	 * <p>
+	 * Each string should be specified in the form:
+	 * <ul>
+	 * <li>{@code "name=value"} for attributes.</li>
+	 * <li>{@code "name:type=value"} for typed attributes.</li>
+	 * <li>{@code "name:=value"} for directives.</li>
+	 * </ul>
+	 * These are added, separated by semicolons, to the export package clause.
+	 */
+	String[] attribute() default {};
+}


=====================================
org/osgi/annotation/bundle/Directive.java
=====================================
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) OSGi Alliance (2016, 2018). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark an annotation element as a directive.
+ * <p>
+ * This is used when applying {@link Capability} or {@link Requirement} as a
+ * meta annotation to an annotation declaration. The value of the annotation
+ * element annotated with {@code Directive} is used as the value of a directive
+ * in the generated capability or requirement clause. For example:
+ * 
+ * <pre>
+ * @Capability(namespace = "my.namespace")
+ * public @interface MyCapability {
+ *   @Directive("resource")
+ *   String value() default "";
+ * }
+ * 
+ * @MyCapability("foo")
+ * public MyClass {}
+ * </pre>
+ * 
+ * The use of the {@code MyCapability} annotation, which is meta annotated with
+ * the {@code Capability} and {@code Directive} annotations, will result in a
+ * capability in the namespace {@code my.namespace} with the directive
+ * {@code resource:=foo}.
+ * <p>
+ * If the element annotated with {@code Directive} is unspecified when applied,
+ * then the directive must not be generated in the generated capability or
+ * requirement clause. For example:
+ * 
+ * <pre>
+ * @MyCapability
+ * public MyClass {}
+ * </pre>
+ * 
+ * will not have the {@code resource} directive in the generated capability.
+ * <p>
+ * This annotation is not retained at runtime. It is for use by tools to
+ * generate bundle manifests.
+ * 
+ * @author $Id: b0e9776264d7c1598147b7c9826e92e7224aae35 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target(ElementType.METHOD)
+public @interface Directive {
+	/**
+	 * The name of the directive.
+	 * <p>
+	 * If not specified, the name of the annotated element is used as the name
+	 * of the directive.
+	 */
+	String value() default "";
+}


=====================================
org/osgi/annotation/bundle/Export.java
=====================================
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) OSGi Alliance (2016). All Rights Reserved.
+ * 
+ * Licensed under the Apache License, Export 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.osgi.annotation.versioning.ConsumerType;
+import org.osgi.annotation.versioning.ProviderType;
+import org.osgi.annotation.versioning.Version;
+
+/**
+ * Mark a package to be exported from its bundle.
+ * <p>
+ * The package must also be annotation with the {@link Version} annotation to
+ * specify the export version of the package.
+ * <p>
+ * This annotation is not retained at runtime. It is for use by tools to
+ * generate bundle manifests or otherwise process the package.
+ * 
+ * @author $Id: 8e77e5578eea93b272d22c0824d0e133c6ff44bf $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target(ElementType.PACKAGE)
+public @interface Export {
+	/**
+	 * A list of package names that are used by this package.
+	 * <p>
+	 * If the {@code uses} directive must be omitted from the export package
+	 * clause for this package, the empty value <code>&#x7B;&#x7D;</code> must
+	 * be specified.
+	 * <p>
+	 * If not specified, the {@code uses} directive for the export package
+	 * clause is calculated by inspection of the classes in this package.
+	 */
+	String[] uses() default {};
+
+	/**
+	 * A list of attribute or directive names and values.
+	 * <p>
+	 * Each string should be specified in the form:
+	 * <ul>
+	 * <li>{@code "name=value"} for attributes.</li>
+	 * <li>{@code "name:type=value"} for typed attributes.</li>
+	 * <li>{@code "name:=value"} for directives.</li>
+	 * </ul>
+	 * These are added, separated by semicolons, to the export package clause.
+	 */
+	String[] attribute() default {};
+
+	/**
+	 * Specify the policy for substitutably importing this package.
+	 * <p>
+	 * Bundles that collaborate require the same class loader for types used in
+	 * the collaboration. If multiple bundles export packages with collaboration
+	 * types then they will have to be placed in disjoint class spaces, making
+	 * collaboration impossible. Collaboration is significantly improved when
+	 * bundles are willing to import exported packages; these imports will allow
+	 * a framework to substitute exports for imports.
+	 * <p>
+	 * If not specified, the {@link Substitution#CALCULATED} substitution
+	 * policy is used for this package.
+	 */
+	Substitution substitution() default Substitution.CALCULATED;
+
+	/**
+	 * Substitution policy for this package.
+	 */
+	public enum Substitution {
+		/**
+		 * Use a consumer type version range for the import package clause when
+		 * substitutably importing a package.
+		 * 
+		 * @see ConsumerType
+		 */
+		CONSUMER,
+
+		/**
+		 * Use a provider type version range for the import package clause when
+		 * substitutably importing a package.
+		 * 
+		 * @see ProviderType
+		 */
+		PROVIDER,
+
+		/**
+		 * The package must not be substitutably imported.
+		 */
+		NOIMPORT,
+
+		/**
+		 * The policy value is calculated by inspection of the classes in the
+		 * package.
+		 */
+		CALCULATED
+	}
+}


=====================================
org/osgi/annotation/bundle/Header.java
=====================================
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) OSGi Alliance (2016). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Define a manifest header for a bundle.
+ * <p>
+ * For example:
+ * 
+ * <pre>
+ * @Header(name=Constants.BUNDLE_CATEGORY, value="osgi")
+ * </pre>
+ * <p>
+ * This annotation is not retained at runtime. It is for use by tools to
+ * generate bundle manifests.
+ * 
+ * @author $Id: 7f055fcd764d4e5cb2f7ea10bc77dbc808df068a $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
+ at Repeatable(Headers.class)
+public @interface Header {
+
+	/**
+	 * The name of this header.
+	 */
+	String name();
+
+	/**
+	 * The value of this header.
+	 */
+	String value();
+}


=====================================
org/osgi/annotation/bundle/Headers.java
=====================================
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) OSGi Alliance (2016). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Container annotation for repeated {@link Header} annotations.
+ * 
+ * @author $Id: 70dba5395acc84b1371c31bec21f15b0edf03196 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
+public @interface Headers {
+	/**
+	 * Repeated {@link Header} annotations.
+	 */
+	Header[] value();
+}


=====================================
org/osgi/annotation/bundle/Requirement.java
=====================================
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) OSGi Alliance (2016, 2018). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Define a requirement for a bundle.
+ * <p>
+ * For example:
+ * 
+ * <pre>
+ * @Requirement(namespace=ExtenderNamespace.EXTENDER_NAMESPACE,
+ *              name="osgi.component", version="1.3.0")
+ * </pre>
+ * <p>
+ * This annotation is not retained at runtime. It is for use by tools to
+ * generate bundle manifests or otherwise process the a package.
+ * <p>
+ * This annotation can be used to annotate an annotation. If the meta-annotated
+ * annotation declares an element of the same name as an element in this
+ * annotation, the element is considered to override the element in this
+ * annotation.
+ * 
+ * @author $Id: f3ba4bcd99d63afe386b98e17adf8dab456312e2 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
+ at Repeatable(Requirements.class)
+public @interface Requirement {
+
+	/**
+	 * The namespace of this requirement.
+	 */
+	String namespace();
+
+	/**
+	 * The name of this requirement within the namespace.
+	 * <p>
+	 * If specified, adds an expression, using the {@code &} operator with any
+	 * specified {@link #filter()}, to the requirement's filter directive to
+	 * test that an attribute with the name of the namespace is equal to the
+	 * value of the specified name.
+	 */
+	String name() default "";
+
+	/**
+	 * The floor version of the version range for this requirement.
+	 * <p>
+	 * If specified, adds a version range expression, using the {@code &}
+	 * operator with any specified {@link #filter()}, to the requirement's
+	 * filter directive. The ceiling version of the version range is the next
+	 * major version from the floor version. For example, if the specified
+	 * version is {@code 1.3}, then the version range expression is
+	 * {@code (&(version>=1.3)(!(version>=2.0)))}.
+	 * <p>
+	 * The specified version must be a valid OSGi version string.
+	 */
+	String version() default "";
+
+	/**
+	 * The filter expression of this requirement, if any.
+	 */
+	String filter() default "";
+
+	/**
+	 * The effective time of this requirement.
+	 * <p>
+	 * Specifies the time the requirement is available. The OSGi framework
+	 * resolver only considers requirement without an effective directive or
+	 * effective:=resolve. Requirements with other values for the effective
+	 * directive can be considered by an external agent.
+	 * <p>
+	 * If not specified, the {@code effective} directive is omitted from the
+	 * requirement clause.
+	 */
+	String effective() default "resolve"; // Namespace.EFFECTIVE_RESOLVE
+
+	/**
+	 * A list of attribute or directive names and values.
+	 * <p>
+	 * Each string should be specified in the form:
+	 * <ul>
+	 * <li>{@code "name=value"} for attributes.</li>
+	 * <li>{@code "name:type=value"} for typed attributes.</li>
+	 * <li>{@code "name:=value"} for directives.</li>
+	 * </ul>
+	 * These are added, separated by semicolons, to the export package clause.
+	 */
+	String[] attribute() default {};
+
+	/**
+	 * The cardinality of this requirement.
+	 * <p>
+	 * Indicates if this requirement can be wired a single time or multiple
+	 * times.
+	 * <p>
+	 * If not specified, the {@code cardinality} directive is omitted from the
+	 * requirement clause.
+	 */
+	Cardinality cardinality() default Cardinality.SINGLE;
+
+	/**
+	 * Cardinality for this requirement.
+	 */
+	public enum Cardinality {
+		/**
+		 * Indicates if the requirement can only be wired a single time.
+		 */
+		SINGLE("single"), // Namespace.CARDINALITY_SINGLE
+
+		/**
+		 * Indicates if the requirement can be wired multiple times.
+		 */
+		MULTIPLE("multiple"); // Namespace.CARDINALITY_MULTIPLE
+
+		private final String value;
+
+		Cardinality(String value) {
+			this.value = value;
+		}
+
+		@Override
+		public String toString() {
+			return value;
+		}
+	}
+
+	/**
+	 * The resolution policy of this requirement.
+	 * <p>
+	 * A mandatory requirement forbids the bundle to resolve when this
+	 * requirement is not satisfied; an optional requirement allows a bundle to
+	 * resolve even if this requirement is not satisfied.
+	 * <p>
+	 * If not specified, the {@code resolution} directive is omitted from the
+	 * requirement clause.
+	 */
+	Resolution resolution() default Resolution.MANDATORY;
+
+	/**
+	 * Resolution for this requirement.
+	 */
+	public enum Resolution {
+		/**
+		 * A mandatory requirement forbids the bundle to resolve when the
+		 * requirement is not satisfied.
+		 */
+		MANDATORY("mandatory"), // Namespace.RESOLUTION_MANDATORY
+
+		/**
+		 * An optional requirement allows a bundle to resolve even if the
+		 * requirement is not satisfied.
+		 */
+		OPTIONAL("optional"); // Namespace.RESOLUTION_OPTIONAL
+
+		private final String value;
+
+		Resolution(String value) {
+			this.value = value;
+		}
+
+		@Override
+		public String toString() {
+			return value;
+		}
+	}
+}


=====================================
org/osgi/annotation/bundle/Requirements.java
=====================================
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) OSGi Alliance (2016). 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.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.annotation.bundle;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Container annotation for repeated {@link Requirement} annotations.
+ * 
+ * @author $Id: 5d5354fddd97ea582c70caeffccf8e36904cae4c $
+ */
+ at Documented
+ at Retention(RetentionPolicy.CLASS)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
+public @interface Requirements {
+	/**
+	 * Repeated {@link Requirement} annotations.
+	 */
+	Requirement[] value();
+}


=====================================
org/osgi/annotation/bundle/package-info.java
=====================================
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) OSGi Alliance (2016). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Export 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * OSGi Bundle Annotations Package Version 1.0.
+ * <p>
+ * This package is not used at runtime.
+ *
+ * @author $Id: f1e867c6f15cade9f8e8f280826c856175018bf6 $
+ */
+ at Version("1.0")
+package org.osgi.annotation.bundle;
+
+import org.osgi.annotation.versioning.Version;


=====================================
org/osgi/annotation/versioning/ConsumerType.java
=====================================
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2017). 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,20 +23,28 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * A type implemented by the Consumer Role.
- * 
+ * A type implemented by, or extended by, the Consumer Role.
  * <p>
- * A non-binary compatible change to a consumer type normally requires
+ * A non-binary-compatible change to a consumer type or a binary-compatible
+ * change to a consumer type affecting an abstract method normally requires
  * incrementing the major version of the type's package. This change will
  * require all providers and all consumers to be updated to handle the change
- * since consumers implement the consumer type and all providers must understand
- * the change in the consumer type.
- * 
+ * since consumers that implement or extend the consumer type and all providers
+ * must understand the change in the consumer type.
+ * <p>
+ * A binary-compatible change to a consumer type not affecting an abstract
+ * method normally requires incrementing the minor version of the type's
+ * package. This change will require all providers to be updated to handle the
+ * change, but consumers will not require changes since no abstract methods
+ * requiring implementation by the consumer are affected.
  * <p>
  * A type can be marked {@link ConsumerType} or {@link ProviderType} but not
  * both. A type is assumed to be {@link ConsumerType} if it is not marked either
  * {@link ConsumerType} or {@link ProviderType}.
- * 
+ * <p>
+ * A package can be marked {@link ProviderType}. In this case, all types in the
+ * package are considered to be a provider type regardless of whether they are
+ * marked {@link ConsumerType} or {@link ProviderType}.
  * <p>
  * This annotation is not retained at runtime. It is for use by tools to
  * understand the semantic version of a package. When a bundle implements a
@@ -44,9 +52,10 @@ import java.lang.annotation.Target;
  * that package must require the exact major version and a minor version greater
  * than or equal to the package's version.
  * 
- * @see <a href="http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf"
- *      >Semantic Versioning</a>
- * @author $Id: 319ac9d62b568a8cde1523e0059aa3e44c7e86af $
+ * @see <a href=
+ *      "https://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf" >
+ *      Semantic Versioning</a>
+ * @author $Id: 0224e9ea28abfaf6e5fcba33ade5c24b67d3a86c $
  */
 @Documented
 @Retention(RetentionPolicy.CLASS)


=====================================
org/osgi/annotation/versioning/ProviderType.java
=====================================
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013, 2014). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2017). 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,33 +23,47 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * A type implemented by the Provider Role.
- * 
+ * A type implemented by, or extended by, the Provider Role.
  * <p>
- * A non-binary compatible change to a provider type normally requires
- * incrementing the minor version of the type's package. This change will
- * require all providers to be updated to handle the change, but consumers of
- * that package will not require changes since they only use, and do not
- * implement, the provider type.
- * 
+ * A non-binary-compatible change to a provider type normally requires
+ * incrementing the major version of the type's package. This change will
+ * require all providers and all consumers to be updated to handle the change.
+ * However, a non-binary-compatible change affecting a {@code protected} access
+ * member only requires incrementing the minor version of the type's package.
+ * This change will require all providers to be updated to handle the change,
+ * but consumers will not require changes since they only use, and do not
+ * extend, the provider type and thus could not access {@code protected} access
+ * members of the provider type.
+ * <p>
+ * A binary-compatible change to a provider type normally requires incrementing
+ * the minor version of the type's package. This change will require all
+ * providers to be updated to handle the change, but consumers will not require
+ * changes since they only use, and do not implement or extend, the provider
+ * type.
  * <p>
  * A type can be marked {@link ConsumerType} or {@link ProviderType} but not
  * both. A type is assumed to be {@link ConsumerType} if it is not marked either
  * {@link ConsumerType} or {@link ProviderType}.
- * 
+ * <p>
+ * A package can be marked {@link ProviderType}. In this case, all types in the
+ * package are considered to be a provider type regardless of whether they are
+ * marked {@link ConsumerType} or {@link ProviderType}.
  * <p>
  * This annotation is not retained at runtime. It is for use by tools to
  * understand the semantic version of a package. When a bundle implements a
  * provider type from an imported package, then the bundle's import range for
  * that package must require the package's exact major and minor version..
  * 
- * @see <a href="http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf"
- *      >Semantic Versioning</a>
- * @author $Id: 46ccfd7aa446f79451d090e0c23e257c3c5c3cf0 $
+ * @see <a href=
+ *      "https://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf" >
+ *      Semantic Versioning</a>
+ * @author $Id: fccf9ca53cf68e15c1745839770da594ae3111ec $
  */
 @Documented
 @Retention(RetentionPolicy.CLASS)
- at Target(ElementType.TYPE)
+ at Target({
+		ElementType.TYPE, ElementType.PACKAGE
+})
 public @interface ProviderType {
 	// marker annotation
 }


=====================================
org/osgi/annotation/versioning/Version.java
=====================================
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2016). 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.
@@ -24,14 +24,14 @@ import java.lang.annotation.Target;
 
 /**
  * Specify the version of a package.
- * 
  * <p>
  * This annotation is not retained at runtime. It is for use by tools to
  * generate bundle manifests or otherwise process the version of a package.
  * 
- * @see <a href="http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf"
- *      >Semantic Versioning</a>
- * @author $Id: dcb5aff364bf7d59d647211711ae0e32697cc56f $
+ * @see <a href=
+ *      "https://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf" >
+ *      Semantic Versioning</a>
+ * @author $Id: 7121973d858c761b1093ea198d516fa492655ae1 $
  */
 @Documented
 @Retention(RetentionPolicy.CLASS)


=====================================
org/osgi/annotation/versioning/package-info.java
=====================================
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) OSGi Alliance (2013). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2013, 2016). 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.
@@ -15,16 +15,15 @@
  */
 
 /**
- * OSGi Versioning Annotations Package Version 1.0.
- *
+ * OSGi Versioning Annotations Package Version 1.1.
  * <p>
  * This package is not used at runtime.
  *
- * @see <a href="http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf"
- *      >Semantic Versioning</a>
- * @version 1.0
- * @author $Id: 1bffd081f72d9ddcdc31a7c49493b35b009ba0e3 $
+ * @see <a href=
+ *      "https://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf" >
+ *      Semantic Versioning</a>
+ * @author $Id: 2ff0bf766254e2570f961cd0260349635fa5ed3b $
  */
- at Version("1.0")
+ at Version("1.1")
 package org.osgi.annotation.versioning;
 


=====================================
org/osgi/annotation/versioning/packageinfo deleted
=====================================
@@ -1 +0,0 @@
-version 1.0



View it on GitLab: https://salsa.debian.org/java-team/osgi-annotation/-/commit/4fd9756a44f4230a3e803445fd90cff9dd30e83b

-- 
View it on GitLab: https://salsa.debian.org/java-team/osgi-annotation/-/commit/4fd9756a44f4230a3e803445fd90cff9dd30e83b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20200802/95c9e83e/attachment.html>


More information about the pkg-java-commits mailing list