This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.commons.osgi-2.3.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-osgi.git
commit 553cb5c49ebab560ea65089dc799532cffb9879b Author: Stefan Seifert <[email protected]> AuthorDate: Fri May 22 20:03:57 2015 +0000 update javadocs git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/osgi@1681221 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/sling/commons/osgi/ManifestHeader.java | 10 ++++++---- src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java | 9 +++++++++ .../java/org/apache/sling/commons/osgi/PropertiesUtil.java | 9 +++++++++ .../java/org/apache/sling/commons/osgi/RankedServices.java | 4 ++-- .../org/apache/sling/commons/osgi/SortingServiceTracker.java | 4 ++++ .../sling/commons/osgi/bundleversion/BundleVersionInfo.java | 10 +++++----- 6 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java b/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java index 37e5376..385ccf1 100644 --- a/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java +++ b/src/main/java/org/apache/sling/commons/osgi/ManifestHeader.java @@ -34,17 +34,17 @@ public class ManifestHeader { public interface Entry { /** - * The value of the entry. + * @return The value of the entry. */ String getValue(); /** - * The attributes specified for this entry. + * @return The attributes specified for this entry. */ NameValuePair[] getAttributes(); /** - * The directives for this entry. + * @return The directives for this entry. */ NameValuePair[] getDirectives(); @@ -69,7 +69,7 @@ public class ManifestHeader { } /** - * Return the entries for this header. + * @return Return the entries for this header. */ public Entry[] getEntries() { return this.entries; @@ -107,6 +107,8 @@ public class ManifestHeader { * Like this: path; path; dir1:=dirval1; dir2:=dirval2; attr1=attrval1; attr2=attrval2, * path; path; dir1:=dirval1; dir2:=dirval2; attr1=attrval1; attr2=attrval2 * The returned object maintains the order of entries (paths), directives and attributes. + * @param header Header name + * @return Parsed header or null if not found */ public static ManifestHeader parse(String header) { final ManifestHeader entry = new ManifestHeader(); diff --git a/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java b/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java index 8252e8f..d77a4e9 100644 --- a/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java +++ b/src/main/java/org/apache/sling/commons/osgi/OsgiUtil.java @@ -43,6 +43,7 @@ public class OsgiUtil { * object. * @param propValue the property value or <code>null</code> * @param defaultValue the default boolean value + * @return Boolean value */ public static boolean toBoolean(final Object propValue, final boolean defaultValue) { return PropertiesUtil.toBoolean(propValue, defaultValue); @@ -53,6 +54,7 @@ public class OsgiUtil { * <code>defaultValue</code> if the parameter is <code>null</code>. * @param propValue the property value or <code>null</code> * @param defaultValue the default string value + * @return String value */ public static String toString(final Object propValue, final String defaultValue) { return PropertiesUtil.toString(propValue, defaultValue); @@ -65,6 +67,7 @@ public class OsgiUtil { * a <code>Long</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default long value + * @return Long value */ public static long toLong(final Object propValue, final long defaultValue) { return PropertiesUtil.toLong(propValue, defaultValue); @@ -77,6 +80,7 @@ public class OsgiUtil { * an <code>Integer</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default integer value + * @return Integer value */ public static int toInteger(final Object propValue, final int defaultValue) { return PropertiesUtil.toInteger(propValue, defaultValue); @@ -89,6 +93,7 @@ public class OsgiUtil { * a <code>Double</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default double value + * @return Double value * * @deprecated since 2.0.4, use {@link #toDouble(Object, double)} instead */ @@ -104,6 +109,7 @@ public class OsgiUtil { * a <code>Double</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default double value + * @return Double value * * @since 2.0.4 */ @@ -119,6 +125,7 @@ public class OsgiUtil { * <code>java.util.Collection</code>, the first collection element is returned. * Otherwise <code>null</code> is returned. * @param propValue the parameter to convert. + * @return Object value */ public static Object toObject(final Object propValue) { return PropertiesUtil.toObject(propValue); @@ -133,6 +140,7 @@ public class OsgiUtil { * Otherwise (if the parameter is <code>null</code>) <code>null</code> is * returned. * @param propValue The object to convert. + * @return String array value */ public static String[] toStringArray(final Object propValue) { return PropertiesUtil.toStringArray(propValue); @@ -149,6 +157,7 @@ public class OsgiUtil { * @since 2.0.4 * @param propValue The object to convert. * @param defaultArray The default array to return. + * @return String array value */ public static String[] toStringArray(final Object propValue, final String[] defaultArray) { return PropertiesUtil.toStringArray(propValue, defaultArray); diff --git a/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java b/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java index 9f73d96..673c9fa 100644 --- a/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java +++ b/src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java @@ -40,6 +40,7 @@ public class PropertiesUtil { * object. * @param propValue the property value or <code>null</code> * @param defaultValue the default boolean value + * @return Boolean value */ public static boolean toBoolean(Object propValue, boolean defaultValue) { propValue = toObject(propValue); @@ -57,6 +58,7 @@ public class PropertiesUtil { * <code>defaultValue</code> if the parameter is <code>null</code>. * @param propValue the property value or <code>null</code> * @param defaultValue the default string value + * @return String value */ public static String toString(Object propValue, String defaultValue) { propValue = toObject(propValue); @@ -70,6 +72,7 @@ public class PropertiesUtil { * a <code>Long</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default long value + * @return Long value */ public static long toLong(Object propValue, long defaultValue) { propValue = toObject(propValue); @@ -93,6 +96,7 @@ public class PropertiesUtil { * an <code>Integer</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default integer value + * @return Integer value */ public static int toInteger(Object propValue, int defaultValue) { propValue = toObject(propValue); @@ -116,6 +120,7 @@ public class PropertiesUtil { * a <code>Double</code> from the parameter's string value. * @param propValue the property value or <code>null</code> * @param defaultValue the default double value + * @return Double value */ public static double toDouble(Object propValue, double defaultValue) { propValue = toObject(propValue); @@ -140,6 +145,7 @@ public class PropertiesUtil { * <code>java.util.Collection</code>, the first collection element is returned. * Otherwise <code>null</code> is returned. * @param propValue the parameter to convert. + * @return Object value */ public static Object toObject(Object propValue) { if (propValue == null) { @@ -164,6 +170,7 @@ public class PropertiesUtil { * Otherwise (if the parameter is <code>null</code>) <code>null</code> is * returned. * @param propValue The object to convert. + * @return String array value */ public static String[] toStringArray(Object propValue) { return toStringArray(propValue, null); @@ -179,6 +186,7 @@ public class PropertiesUtil { * returned. * @param propValue The object to convert. * @param defaultArray The default array to return. + * @return String array value */ public static String[] toStringArray(Object propValue, String[] defaultArray) { if (propValue == null) { @@ -236,6 +244,7 @@ public class PropertiesUtil { * returned. * @param propValue The object to convert. * @param defaultArray The default array converted to map. + * @return Map value */ public static Map<String, String> toMap(Object propValue, String[] defaultArray) { String[] arrayValue = toStringArray(propValue, defaultArray); diff --git a/src/main/java/org/apache/sling/commons/osgi/RankedServices.java b/src/main/java/org/apache/sling/commons/osgi/RankedServices.java index 7608ed0..8eecac0 100644 --- a/src/main/java/org/apache/sling/commons/osgi/RankedServices.java +++ b/src/main/java/org/apache/sling/commons/osgi/RankedServices.java @@ -43,10 +43,10 @@ import aQute.bnd.annotation.ProviderType; * </pre> * <p>2. Define bind/unbind methods that delegate to the RankedServices instance:</p> * <pre> - * void bindMyService(MyService service, Map<String, Object> props) { + * void bindMyService(MyService service, Map<String, Object> props) { * myServices.bind(service, props); * } - * void unbindMyService(MyService service, Map<String, Object> props) { + * void unbindMyService(MyService service, Map<String, Object> props) { * myServices.unbind(service, props); * } * </pre> diff --git a/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java b/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java index 1bac6ce..bb9640e 100644 --- a/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java +++ b/src/main/java/org/apache/sling/commons/osgi/SortingServiceTracker.java @@ -44,6 +44,8 @@ public class SortingServiceTracker<T> /** * Constructor + * @param context Bundle context + * @param clazz Class */ public SortingServiceTracker(final BundleContext context, final String clazz) { @@ -81,6 +83,7 @@ public class SortingServiceTracker<T> /** * Return a sorted list of the services. + * @return Service list */ public List<T> getSortedServices() { List<T> result = this.sortedServiceCache; @@ -107,6 +110,7 @@ public class SortingServiceTracker<T> /** * Return a sorted list of the services references. + * @return Service list */ public List<ServiceReference> getSortedServiceReferences() { List<ServiceReference> result = this.sortedReferences; diff --git a/src/main/java/org/apache/sling/commons/osgi/bundleversion/BundleVersionInfo.java b/src/main/java/org/apache/sling/commons/osgi/bundleversion/BundleVersionInfo.java index 7346ed6..106191e 100644 --- a/src/main/java/org/apache/sling/commons/osgi/bundleversion/BundleVersionInfo.java +++ b/src/main/java/org/apache/sling/commons/osgi/bundleversion/BundleVersionInfo.java @@ -40,19 +40,19 @@ public abstract class BundleVersionInfo<T> implements Comparable<BundleVersionIn */ public static final long BND_LAST_MODIFIED_MISSING = -1L; - /** Return the source of information: underlying File or Bundle */ + /** @return Return the source of information: underlying File or Bundle */ public abstract T getSource(); - /** True if the provided data is a valid bundle */ + /** @return True if the provided data is a valid bundle */ public abstract boolean isBundle(); - /** Return the bundle symbolic name, null if not available */ + /** @return Return the bundle symbolic name, null if not available */ public abstract String getBundleSymbolicName(); - /** Return the bundle version, null if not available */ + /** @return Return the bundle version, null if not available */ public abstract Version getVersion(); - /** True if the bundle version indicates a snapshot */ + /** @return True if the bundle version indicates a snapshot */ public abstract boolean isSnapshot(); /** Return the bundle last modification time, based on the BND_LAST_MODIFIED -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
