Skip to content

Commit

Permalink
Format java files in o.e.osgi.services
Browse files Browse the repository at this point in the history
This was achieved by running:
eclipse -consolelog -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter \
  -config .settings/org.eclipse.jdt.core.prefs . -data `mktemp -d`

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
  • Loading branch information
Torbjorn-Svensson committed Oct 1, 2023
1 parent d6e4644 commit 04895a8
Show file tree
Hide file tree
Showing 39 changed files with 810 additions and 838 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
* The name of this Component.
*
* <p>
* If not specified, the name of this Component is the fully qualified type
* name of the class being annotated.
* If not specified, the name of this Component is the fully qualified type name
* of the class being annotated.
*
* @see "The name attribute of the component element of a Component Description."
*/
Expand All @@ -53,8 +53,8 @@
* The types under which to register this Component as a service.
*
* <p>
* If no service should be registered, the empty value
* <code>&#x7B;&#x7D;</code> must be specified.
* If no service should be registered, the empty value <code>&#x7B;&#x7D;</code>
* must be specified.
*
* <p>
* If not specified, the service types for this Component are all the
Expand All @@ -77,27 +77,27 @@
String factory() default "";

/**
* Declares whether this Component uses the OSGi ServiceFactory concept and
* each bundle using this Component's service will receive a different
* component instance.
* Declares whether this Component uses the OSGi ServiceFactory concept and each
* bundle using this Component's service will receive a different component
* instance.
*
* <p>
* This element is ignored when the {@link #scope()} element does not have
* the default value. If {@code true}, this Component uses
* This element is ignored when the {@link #scope()} element does not have the
* default value. If {@code true}, this Component uses
* {@link ServiceScope#BUNDLE bundle} service scope. If {@code false} or not
* specified, this Component uses {@link ServiceScope#SINGLETON singleton}
* service scope. If the {@link #factory()} element is specified or the
* {@link #immediate()} element is specified with {@code true}, this element
* can only be specified with {@code false}.
* {@link #immediate()} element is specified with {@code true}, this element can
* only be specified with {@code false}.
*
* @see "The scope attribute of the service element of a Component Description."
* @deprecated Since 1.3. Replaced by {@link #scope()}.
*/
boolean servicefactory() default false;

/**
* Declares whether this Component is enabled when the bundle containing it
* is started.
* Declares whether this Component is enabled when the bundle containing it is
* started.
*
* <p>
* If {@code true} or not specified, this Component is enabled. If
Expand All @@ -108,21 +108,20 @@
boolean enabled() default true;

/**
* Declares whether this Component must be immediately activated upon
* becoming satisfied or whether activation should be delayed.
* Declares whether this Component must be immediately activated upon becoming
* satisfied or whether activation should be delayed.
*
* <p>
* If {@code true}, this Component must be immediately activated upon
* becoming satisfied. If {@code false}, activation of this Component is
* delayed. If this property is specified, its value must be {@code false}
* if the {@link #factory()} property is also specified or must be
* {@code true} if the {@link #service()} property is specified with an
* empty value.
* If {@code true}, this Component must be immediately activated upon becoming
* satisfied. If {@code false}, activation of this Component is delayed. If this
* property is specified, its value must be {@code false} if the
* {@link #factory()} property is also specified or must be {@code true} if the
* {@link #service()} property is specified with an empty value.
*
* <p>
* If not specified, the default is {@code false} if the {@link #factory()}
* property is specified or the {@link #service()} property is not specified
* or specified with a non-empty value and {@code true} otherwise.
* property is specified or the {@link #service()} property is not specified or
* specified with a non-empty value and {@code true} otherwise.
*
* @see "The immediate attribute of the component element of a Component Description."
*/
Expand All @@ -132,15 +131,14 @@
* Properties for this Component.
*
* <p>
* Each property string is specified as {@code "name=value"}. The type of
* the property value can be specified in the name as
* {@code name:type=value}. The type must be one of the property types
* supported by the type attribute of the property element of a Component
* Description.
* Each property string is specified as {@code "name=value"}. The type of the
* property value can be specified in the name as {@code name:type=value}. The
* type must be one of the property types supported by the type attribute of the
* property element of a Component Description.
*
* <p>
* To specify a property with multiple values, use multiple name, value
* pairs. For example, {@code "foo=bar", "foo=baz"}.
* To specify a property with multiple values, use multiple name, value pairs.
* For example, {@code "foo=bar", "foo=baz"}.
*
* @see "The property element of a Component Description."
*/
Expand All @@ -151,8 +149,8 @@
*
* <p>
* Specifies the name of an entry in the bundle whose contents conform to a
* standard Java Properties File. The entry is read and processed to obtain
* the properties and their values.
* standard Java Properties File. The entry is read and processed to obtain the
* properties and their values.
*
* @see "The properties element of a Component Description."
*/
Expand All @@ -162,9 +160,9 @@
* The XML name space of the Component Description for this Component.
*
* <p>
* If not specified, the XML name space of the Component Description for
* this Component should be the lowest Declarative Services XML name space
* which supports all the specification features used by this Component.
* If not specified, the XML name space of the Component Description for this
* Component should be the lowest Declarative Services XML name space which
* supports all the specification features used by this Component.
*
* @see "The XML name space specified for a Component Description."
*/
Expand All @@ -174,23 +172,22 @@
* The configuration policy of this Component.
*
* <p>
* Controls whether component configurations must be satisfied depending on
* the presence of a corresponding Configuration object in the OSGi
* Configuration Admin service. A corresponding configuration is a
* Configuration object where the PID equals the name of the component.
* Controls whether component configurations must be satisfied depending on the
* presence of a corresponding Configuration object in the OSGi Configuration
* Admin service. A corresponding configuration is a Configuration object where
* the PID equals the name of the component.
*
* <p>
* If not specified, the configuration policy is based upon whether the
* component is also annotated with the Meta Type
* {@link org.osgi.service.metatype.annotations.Designate Designate}
* annotation.
* {@link org.osgi.service.metatype.annotations.Designate Designate} annotation.
* <ul>
* <li>Not annotated with {@code Designate} - The configuration policy is
* {@link ConfigurationPolicy#OPTIONAL OPTIONAL}.</li>
* <li>Annotated with {@code Designate(factory=false)} - The configuration
* policy is {@link ConfigurationPolicy#OPTIONAL OPTIONAL}.</li>
* <li>Annotated with {@code Designate(factory=true)} - The configuration
* policy is {@link ConfigurationPolicy#REQUIRE REQUIRE}.</li>
* <li>Annotated with {@code Designate(factory=true)} - The configuration policy
* is {@link ConfigurationPolicy#REQUIRE REQUIRE}.</li>
* </ul>
*
* @see "The configuration-policy attribute of the component element of a Component Description."
Expand All @@ -210,15 +207,15 @@
*
* <p>
* A special string (<code>{@value #NAME}</code>) can be used to specify the
* name of the component as a configuration PID. The {@code NAME} constant
* holds this special string. For example:
* name of the component as a configuration PID. The {@code NAME} constant holds
* this special string. For example:
*
* <pre>
* &#64;Component(configurationPid={"com.acme.system", Component.NAME})
* </pre>
*
* Tools creating a Component Description from this annotation must replace
* the special string with the actual name of this Component.
* Tools creating a Component Description from this annotation must replace the
* special string with the actual name of this Component.
*
* @see "The configuration-pid attribute of the component element of a Component Description."
* @since 1.2
Expand All @@ -229,30 +226,30 @@
* Special string representing the name of this Component.
*
* <p>
* This string can be used in {@link #configurationPid()} to specify the
* name of the component as a configuration PID. For example:
* This string can be used in {@link #configurationPid()} to specify the name of
* the component as a configuration PID. For example:
*
* <pre>
* &#64;Component(configurationPid={"com.acme.system", Component.NAME})
* </pre>
*
* Tools creating a Component Description from this annotation must replace
* the special string with the actual name of this Component.
* Tools creating a Component Description from this annotation must replace the
* special string with the actual name of this Component.
*
* @since 1.3
*/
String NAME = "$";
String NAME = "$";

/**
* The service scope for the service of this Component.
*
* <p>
* If not specified (and the deprecated {@link #servicefactory()} element is
* not specified), the {@link ServiceScope#SINGLETON singleton} service
* scope is used. If the {@link #factory()} element is specified or the
* {@link #immediate()} element is specified with {@code true}, this element
* can only be specified with the {@link ServiceScope#SINGLETON singleton}
* service scope.
* If not specified (and the deprecated {@link #servicefactory()} element is not
* specified), the {@link ServiceScope#SINGLETON singleton} service scope is
* used. If the {@link #factory()} element is specified or the
* {@link #immediate()} element is specified with {@code true}, this element can
* only be specified with the {@link ServiceScope#SINGLETON singleton} service
* scope.
*
* @see "The scope attribute of the service element of a Component Description."
* @since 1.3
Expand All @@ -263,15 +260,15 @@
* The lookup strategy references of this Component.
*
* <p>
* To access references using the lookup strategy, {@link Reference}
* annotations are specified naming the reference and declaring the type of
* the referenced service. The referenced service can be accessed using one
* of the {@code locateService} methods of {@code ComponentContext}.
* To access references using the lookup strategy, {@link Reference} annotations
* are specified naming the reference and declaring the type of the referenced
* service. The referenced service can be accessed using one of the
* {@code locateService} methods of {@code ComponentContext}.
*
* <p>
* To access references using the event strategy, bind methods are annotated
* with {@link Reference}. To access references using the field strategy,
* fields are annotated with {@link Reference}.
* with {@link Reference}. To access references using the field strategy, fields
* are annotated with {@link Reference}.
*
* @see "The reference element of a Component Description."
* @since 1.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
*/
public enum ConfigurationPolicy {
/**
* Use the corresponding Configuration object if present but allow the
* component to be satisfied even if the corresponding Configuration object
* is not present.
* Use the corresponding Configuration object if present but allow the component
* to be satisfied even if the corresponding Configuration object is not
* present.
*/
OPTIONAL("optional"),

Expand All @@ -43,12 +43,12 @@ public enum ConfigurationPolicy {
REQUIRE("require"),

/**
* Always allow the component configuration to be satisfied and do not use
* the corresponding Configuration object even if it is present.
* Always allow the component configuration to be satisfied and do not use the
* corresponding Configuration object even if it is present.
*/
IGNORE("ignore");

private final String value;
private final String value;

ConfigurationPolicy(String value) {
this.value = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
* @author $Id$
*/
public enum FieldOption {

/**
* The update field option is used to update the collection referenced by
* the field when there are changes to the bound services.
* The update field option is used to update the collection referenced by the
* field when there are changes to the bound services.
*
* <p>
* This field option can only be used when the field reference has dynamic
* policy and multiple cardinality.
*/
UPDATE("update"),

/**
* The replace field option is used to replace the field value with a new
* value when there are changes to the bound services.
* The replace field option is used to replace the field value with a new value
* when there are changes to the bound services.
*/
REPLACE("replace");

private final String value;
private final String value;

FieldOption(String value) {
this.value = value;
Expand Down
Loading

0 comments on commit 04895a8

Please sign in to comment.