You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by da...@apache.org on 2016/09/22 15:59:52 UTC
svn commit: r1761974 - in
/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter:
ConversionException.java ConvertFunction.java Converter.java
Converting.java Function.java Rule.java
Author: davidb
Date: Thu Sep 22 15:59:52 2016
New Revision: 1761974
URL: http://svn.apache.org/viewvc?rev=1761974&view=rev
Log:
Felix Converter - reformatted the converter API package
Modified:
felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConversionException.java
felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConvertFunction.java
felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converter.java
felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converting.java
felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Function.java
felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Rule.java
Modified: felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConversionException.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConversionException.java?rev=1761974&r1=1761973&r2=1761974&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConversionException.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConversionException.java Thu Sep 22 15:59:52 2016
@@ -25,7 +25,7 @@ public class ConversionException extends
/**
* Create a Conversion Exception with a message.
- *
+ *
* @param message The message for this exception.
*/
public ConversionException(String message) {
@@ -34,7 +34,7 @@ public class ConversionException extends
/**
* Create a Conversion Exception with a message and a nested cause.
- *
+ *
* @param message The message for this exception.
* @param cause The causing exception.
*/
Modified: felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConvertFunction.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConvertFunction.java?rev=1761974&r1=1761973&r2=1761974&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConvertFunction.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/ConvertFunction.java Thu Sep 22 15:59:52 2016
@@ -30,10 +30,14 @@ public interface ConvertFunction<F, T> {
/**
* Convert the object into the target type.
*
- * @param obj The object to be converted. This object will never be {@code null} as the convert function will not be invoked for null values.
+ * @param obj The object to be converted. This object will never be
+ * {@code null} as the convert function will not be invoked for
+ * null values.
* @param targetType The target type.
- * @return The conversion result or {@code null} to indicate that the convert function cannot handle this conversion. In this case the next matching rule or adapter will be given a
- * opportunity to convert.
+ * @return The conversion result or {@code null} to indicate that the
+ * convert function cannot handle this conversion. In this case the
+ * next matching rule or adapter will be given a opportunity to
+ * convert.
*/
T convert(F obj, Type targetType) throws Exception;
}
Modified: felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converter.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converter.java?rev=1761974&r1=1761973&r2=1761974&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converter.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converter.java Thu Sep 22 15:59:52 2016
@@ -27,19 +27,19 @@ import org.osgi.annotation.versioning.Pr
*/
@ProviderType
public interface Converter {
- /**
- * Start a conversion for the given object.
- *
- * @param obj The object that should be converted.
- * @return A {@link Converting} object to complete the conversion.
- */
- Converting convert(Object obj);
+ /**
+ * Start a conversion for the given object.
+ *
+ * @param obj The object that should be converted.
+ * @return A {@link Converting} object to complete the conversion.
+ */
+ Converting convert(Object obj);
- /**
- * Obtain a builder to create a modified converter based on this converter.
+ /**
+ * Obtain a builder to create a modified converter based on this converter.
* For more details see the {@link ConverterBuilder} interface.
- *
- * @return A new Converter Builder.
- */
- ConverterBuilder newConverterBuilder();
+ *
+ * @return A new Converter Builder.
+ */
+ ConverterBuilder newConverterBuilder();
}
Modified: felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converting.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converting.java?rev=1761974&r1=1761973&r2=1761974&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converting.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Converting.java Thu Sep 22 15:59:52 2016
@@ -32,7 +32,7 @@ public interface Converting {
/**
* The default value to use when the object cannot be converted or in case
* of conversion from a {@code null} value.
- *
+ *
* @param defVal The default value.
* @return The current {@code Converting} object so that additional calls
* can be chained.
@@ -74,7 +74,7 @@ public interface Converting {
/**
* Same as {@code to(String.class)}.
- *
+ *
* @return The converted object.
*/
@Override
Modified: felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Function.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Function.java?rev=1761974&r1=1761973&r2=1761974&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Function.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Function.java Thu Sep 22 15:59:52 2016
@@ -20,14 +20,12 @@ import org.osgi.annotation.versioning.Co
/**
* A function that accepts a single argument and produces a result.
- *
* <p>
* This is a functional interface and can be used as the assignment target for a
* lambda expression or method reference.
*
* @param <T> The type of the function input.
* @param <R> The type of the function output.
- *
* @ThreadSafe
* @author $Id: 3d17c97c7dc36185681b98caed5ee10bdeb2cd93 $
*/
Modified: felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Rule.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Rule.java?rev=1761974&r1=1761973&r2=1761974&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Rule.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/osgi/service/converter/Rule.java Thu Sep 22 15:59:52 2016
@@ -17,7 +17,7 @@ package org.osgi.service.converter;
/**
* A rule is a data entity can hold all the information needed to specify a
- * custom conversion for use by an {@link Adapter}.
+ * custom conversion for use by the {@link ConverterBuilder}.
*
* @param <F> The type to convert from.
* @param <T> The type to convert to.