Author: davidb
Date: Tue Oct 18 11:02:20 2016
New Revision: 1765413

URL: http://svn.apache.org/viewvc?rev=1765413&view=rev
Log:
Felix Converter - rename org.osgi.converter to org.osgi.util.converter

Added:
    felix/trunk/converter/converter/src/main/java/org/osgi/util/
    felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConversionException.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConvertFunction.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converter.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConverterBuilder.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converting.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Function.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Rule.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/StandardConverter.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/TypeReference.java
    
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/package-info.java
Removed:
    felix/trunk/converter/converter/src/main/java/org/osgi/converter/
Modified:
    felix/trunk/converter/converter/pom.xml
    
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/AdapterImpl.java
    
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterBuilderImpl.java
    
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterImpl.java
    
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConvertingImpl.java
    
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverter.java
    
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverting.java
    
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterBuilderTest.java
    
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterMapTest.java
    
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Node.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Schematizer.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/StandardSchematizer.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/TypeRule.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/CollectionNode.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/NodeImpl.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/SchematizerImpl.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/Util.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
    
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
    
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/schematizer/impl/SchematizerServiceTest.java
    
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/impl/json/JsonDeserializationTest.java
    
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ComplexManagerService.java
    
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ObjectFactory.java
    
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/SimpleManagerService.java
    
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/prevayler/DTOSerializer.java
    
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
    
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
    
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
    
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlDeserializingImpl.java
    
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializerImpl.java
    
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializingImpl.java
    
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Deserializing.java
    
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializer.java
    
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializing.java
    
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
    
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java

Modified: felix/trunk/converter/converter/pom.xml
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/pom.xml?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- felix/trunk/converter/converter/pom.xml (original)
+++ felix/trunk/converter/converter/pom.xml Tue Oct 18 11:02:20 2016
@@ -66,8 +66,8 @@
                 <configuration>
                     <instructions>
                         
<Private-Package>org.apache.felix.converter.*</Private-Package>
-                        <Export-Package>org.osgi.converter</Export-Package>
-                        <Import-Package>org.osgi.converter, *</Import-Package>
+                        
<Export-Package>org.osgi.util.converter</Export-Package>
+                        <Import-Package>org.osgi.util.converter, 
*</Import-Package>
                     </instructions>
                 </configuration>
             </plugin>

Modified: 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/AdapterImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/AdapterImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/AdapterImpl.java
 (original)
+++ 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/AdapterImpl.java
 Tue Oct 18 11:02:20 2016
@@ -28,14 +28,14 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.ConvertFunction;
-import org.osgi.converter.Converter;
-import org.osgi.converter.ConverterBuilder;
-import org.osgi.converter.Converting;
-import org.osgi.converter.Function;
-import org.osgi.converter.Rule;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.ConvertFunction;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.ConverterBuilder;
+import org.osgi.util.converter.Converting;
+import org.osgi.util.converter.Function;
+import org.osgi.util.converter.Rule;
+import org.osgi.util.converter.TypeReference;
 
 public class AdapterImpl implements InternalConverter {
     private final InternalConverter delegate;

Modified: 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterBuilderImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterBuilderImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterBuilderImpl.java
 (original)
+++ 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterBuilderImpl.java
 Tue Oct 18 11:02:20 2016
@@ -21,10 +21,10 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.felix.converter.impl.AdapterImpl.ConvertFunctionImpl;
-import org.osgi.converter.ConverterBuilder;
-import org.osgi.converter.Function;
-import org.osgi.converter.Rule;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.ConverterBuilder;
+import org.osgi.util.converter.Function;
+import org.osgi.util.converter.Rule;
+import org.osgi.util.converter.TypeReference;
 
 public class ConverterBuilderImpl implements ConverterBuilder {
     private final InternalConverter adapter;

Modified: 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterImpl.java
 (original)
+++ 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConverterImpl.java
 Tue Oct 18 11:02:20 2016
@@ -28,7 +28,7 @@ import java.util.Date;
 import java.util.UUID;
 import java.util.regex.Pattern;
 
-import org.osgi.converter.ConverterBuilder;
+import org.osgi.util.converter.ConverterBuilder;
 
 public class ConverterImpl implements InternalConverter {
     @Override

Modified: 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConvertingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConvertingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConvertingImpl.java
 (original)
+++ 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/ConvertingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -41,11 +41,11 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
-import org.osgi.converter.Converting;
-import org.osgi.converter.TypeReference;
 import org.osgi.dto.DTO;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.Converting;
+import org.osgi.util.converter.TypeReference;
 
 public class ConvertingImpl implements Converting, InternalConverting {
     private static final Map<Class<?>, Class<?>> interfaceImplementations;

Modified: 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverter.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverter.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverter.java
 (original)
+++ 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverter.java
 Tue Oct 18 11:02:20 2016
@@ -16,7 +16,7 @@
  */
 package org.apache.felix.converter.impl;
 
-import org.osgi.converter.Converter;
+import org.osgi.util.converter.Converter;
 
 public interface InternalConverter extends Converter {
     public InternalConverting convert(Object obj);

Modified: 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverting.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverting.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverting.java
 (original)
+++ 
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/InternalConverting.java
 Tue Oct 18 11:02:20 2016
@@ -16,8 +16,8 @@
  */
 package org.apache.felix.converter.impl;
 
-import org.osgi.converter.Converter;
-import org.osgi.converter.Converting;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.Converting;
 
 public interface InternalConverting extends Converting {
     public void setConverter(Converter c);

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConversionException.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConversionException.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConversionException.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConversionException.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,44 @@
+/*
+ * 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.util.converter;
+
+/**
+ * This Runtime Exception is thrown when an object is requested to be converted
+ * but the conversion cannot be done. For example when the String "test" is to
+ * be converted into a Long.
+ */
+public class ConversionException extends RuntimeException {
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Create a Conversion Exception with a message.
+        *
+        * @param message The message for this exception.
+        */
+       public ConversionException(String message) {
+               super(message);
+       }
+
+       /**
+        * Create a Conversion Exception with a message and a nested cause.
+        *
+        * @param message The message for this exception.
+        * @param cause The causing exception.
+        */
+       public ConversionException(String message, Throwable cause) {
+               super(message, cause);
+       }
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConvertFunction.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConvertFunction.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConvertFunction.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConvertFunction.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,47 @@
+/*
+ * 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.util.converter;
+
+import java.lang.reflect.Type;
+
+import org.osgi.annotation.versioning.ConsumerType;
+
+/**
+ * An functional interface with a single convert method that is passed the
+ * original object and the target type.
+ *
+ * @param <F> Type parameter for the source object.
+ * @param <T> Type parameter for the converted object.
+ * @author $Id$
+ */
+@ConsumerType
+@FunctionalInterface
+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 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.
+        * @throws Exception
+        */
+       T convert(F obj, Type targetType) throws Exception;
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converter.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converter.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converter.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converter.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,45 @@
+/*
+ * 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.util.converter;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * The Converter service is used to start a conversion. The service is obtained
+ * from the service registry. The conversion is then completed via the
+ * Converting interface that has methods to specify the target type.
+ *
+ * @author $Id$
+ * @ThreadSafe
+ */
+@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);
+
+       /**
+        * 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();
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConverterBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConverterBuilder.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConverterBuilder.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/ConverterBuilder.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,83 @@
+/*
+ * 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.util.converter;
+
+import java.lang.reflect.Type;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * A builder to create a new converter with modified behaviour based on an
+ * existing converter. The modified behaviour is specified by providing rules
+ * and/or conversion functions.
+ *
+ * @author $Id$
+ */
+@ProviderType
+public interface ConverterBuilder {
+       /**
+        * Build the specified converter. Each time this method is called a new
+        * custom converter is produced based on the rules registered with the
+        * builder.
+        *
+        * @return A new converter with the rules provided to the builder.
+        */
+       Converter build();
+
+       /**
+        * Register a special rule for this converter.
+        *
+        * @param rule The rule
+        * @return This converter builder for further building.
+        */
+       <F, T> ConverterBuilder rule(Rule<F,T> rule);
+
+       /**
+        * Register a special rule for this converter.
+        *
+        * @param fromCls The class from which to convert.
+        * @param toCls The class to which to convert.
+        * @param toFun A function that handles the conversion.
+        * @param fromFun A function that handles the reverse conversion.
+        * @return This converter builder for further building.
+        */
+       <F, T> ConverterBuilder rule(Class<F> fromCls, Class<T> toCls,
+                       Function<F,T> toFun, Function<T,F> fromFun);
+
+       /**
+        * Register a special rule for this converter.
+        *
+        * @param fromRef A type reference representing the class to convert 
from.
+        * @param toRef A type reference representing the class to convert to.
+        * @param toFun A function that handles the conversion.
+        * @param fromFun A function that handles the reverse conversion.
+        * @return This converter builder for further building.
+        */
+       <F, T> ConverterBuilder rule(TypeReference<F> fromRef,
+                       TypeReference<T> toRef, Function<F,T> toFun, 
Function<T,F> fromFun);
+
+       /**
+        * Register a special rule for this converter.
+        *
+        * @param fromType A reflection type from which to convert.
+        * @param toType A reflection type to which to convert.
+        * @param toFun A function that handles the conversion.
+        * @param fromFun A function that handles the reverse conversion.
+        * @return This converter builder for further building.
+        */
+       <F, T> ConverterBuilder rule(Type fromType, Type toType,
+                       Function<F,T> toFun, Function<T,F> fromFun);
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converting.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converting.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converting.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Converting.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,94 @@
+/*
+ * 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.util.converter;
+
+import java.lang.reflect.Type;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * This interface is used to specify the target that an object should be
+ * converted to. A {@link Converting} instance can be obtained via the
+ * {@link Converter} service by starting a conversion for a specific object.
+ *
+ * @author $Id$
+ * @ThreadSafe
+ */
+@ProviderType
+public interface Converting {
+       /**
+        * Convert the source object based on rules for the class being passed 
in.
+        * This method can be used to disambiguate objects that would match 
multiple
+        * conversion rules.
+        *
+        * @param type The type or class to be used as the source type for the
+        *            conversion
+        * @return The current {@code Converting} object so that additional 
calls
+        *         can be chained.
+        */
+       Converting as(Class< ? > type);
+
+       /**
+        * 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.
+        */
+       Converting defaultValue(Object defVal);
+
+       /**
+        * Specify the target object type for the conversion as a class object.
+        *
+        * @param cls The class to convert to.
+        * @return The converted object.
+        */
+       <T> T to(Class<T> cls);
+
+       /**
+        * Specify the target object type as a {@link TypeReference}. If the 
target
+        * class carries generics information a TypeReference should be used as 
this
+        * preserves the generic information whereas a Class object has this
+        * information erased. Example use:
+        *
+        * <pre>
+        * List&lt;String&gt; result = converter.convert(Arrays.asList(1, 2, 3))
+        *              .to(new TypeReference&lt;List&lt;String&gt;&gt;() {});
+        * </pre>
+        *
+        * @param ref A type reference to the object being converted to.
+        * @return The converted object.
+        */
+       <T> T to(TypeReference<T> ref);
+
+       /**
+        * Specify the target object type as a Java Reflection Type object.
+        *
+        * @param type A Type object to represent the target type to be 
converted
+        *            to.
+        * @return The converted object.
+        */
+       Object to(Type type);
+
+       /**
+        * Same as {@code to(String.class)}.
+        *
+        * @return The converted object.
+        */
+       @Override
+       String toString();
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Function.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Function.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Function.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Function.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) OSGi Alliance (2014, 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.util.converter;
+
+import org.osgi.annotation.versioning.ConsumerType;
+
+/**
+ * An functional interface with a single convert method that is passed the
+ * object to be converted.
+ *
+ * @param <F> Type parameter for the source object.
+ * @param <T> Type parameter for the converted object.
+ * @ThreadSafe
+ * @author $Id$
+ */
+@ConsumerType
+@FunctionalInterface
+public interface Function<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.
+        * @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.
+        * @throws Exception
+        */
+       T convert(F obj) throws Exception;
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Rule.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Rule.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Rule.java 
(added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/Rule.java 
Tue Oct 18 11:02:20 2016
@@ -0,0 +1,115 @@
+/*
+ * 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.util.converter;
+
+/**
+ * A rule is a data entity can hold all the information needed to specify a
+ * custom conversion for use by the {@link ConverterBuilder}.
+ *
+ * @param <F> The type to convert from.
+ * @param <T> The type to convert to.
+ * @author $Id: 7f624253be48fc23d8a793b38673305dbfd5ff9a $
+ * @Immutable
+ */
+public class Rule<F, T> {
+    private final Class<F>              fromClass;
+    private final Class<T>              toClass;
+    private final ConvertFunction<T,F>  fromFun;
+    private final ConvertFunction<F,T>  toFun;
+
+    /**
+     * Create a bidirectional rule.
+     *
+     * @param fromCls The class from which to convert. If {@link Object} is
+     *            specified then this functions as a wildcard for generic
+     *            conversions.
+     * @param toCls The class to which to convert. If {@link Object} is
+     *            specified then this functions as a wildcard for generic
+     *            conversions.
+     * @param to The conversion function for this rule.
+     * @param from The reverse conversion for this rule.
+     */
+    public Rule(Class<F> fromCls, Class<T> toCls, ConvertFunction<F,T> to,
+            ConvertFunction<T,F> from) {
+        if (fromCls.equals(toCls)) {
+            if (fromCls.equals(Object.class)) {
+                if (from != null) {
+                    throw new IllegalStateException(
+                            "Can only register one catchall converter");
+                }
+            } else {
+                throw new IllegalStateException(
+                        "Cannot register a convert to itself");
+            }
+        }
+
+        fromClass = fromCls;
+        toClass = toCls;
+        toFun = to;
+        fromFun = from;
+    }
+
+    /**
+     * Create a single-direction rule.
+     *
+     * @param fromCls The class from which to convert. If {@link Object} is
+     *            specified then this functions as a wildcard for generic
+     *            conversions.
+     * @param toCls The class to which to convert. If {@link Object} is
+     *            specified then this functions as a wildcard for generic
+     *            conversions.
+     * @param to The conversion function for this rule.
+     */
+    public Rule(Class<F> fromCls, Class<T> toCls, ConvertFunction<F,T> to) {
+        this(fromCls, toCls, to, null);
+    }
+
+    /**
+     * Accessor for the class to convert from.
+     *
+     * @return The class to convert from.
+     */
+    public Class<F> getFromClass() {
+        return fromClass;
+    }
+
+    /**
+     * Accessor for the class to convert to.
+     *
+     * @return The class to convert to.
+     */
+    public Class<T> getToClass() {
+        return toClass;
+    }
+
+    /**
+     * Obtain the conversion function.
+     *
+     * @return The conversion function.
+     */
+    public ConvertFunction<F,T> getToFunction() {
+        return toFun;
+    }
+
+    /**
+     * Obtain the reverse conversion function.
+     *
+     * @return The reverse conversion function.
+     */
+    public ConvertFunction<T,F> getFromFunction() {
+        return fromFun;
+    }
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/StandardConverter.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/StandardConverter.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/StandardConverter.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/StandardConverter.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.util.converter;
+
+import org.apache.felix.converter.impl.ConverterBuilderImpl;
+import org.apache.felix.converter.impl.ConverterImpl;
+import org.apache.felix.converter.impl.InternalConverter;
+
+/**
+ * The standard converter.
+ *
+ * @author $Id$
+ * @ThreadSafe
+ */
+public class StandardConverter implements Converter {
+    private final InternalConverter converter;
+
+    public StandardConverter() {
+        ConverterImpl impl = new ConverterImpl();
+        ConverterBuilderImpl cb = impl.newConverterBuilder();
+        impl.addStandardRules(cb);
+        converter = cb.build();
+    }
+
+    @Override
+    public Converting convert(Object obj) {
+        return converter.convert(obj);
+    }
+
+    @Override
+    public ConverterBuilder newConverterBuilder() {
+        return converter.newConverterBuilder();
+    }
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/TypeReference.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/TypeReference.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/TypeReference.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/TypeReference.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) OSGi Alliance (2015, 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.util.converter;
+
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
+import org.osgi.annotation.versioning.ConsumerType;
+
+/**
+ * An object does not carry any runtime information about its generic type.
+ * However sometimes it is necessary to specify a generic type, that is the
+ * purpose of this class. It allows you to specify an generic type by defining 
a
+ * type T, then subclassing it. The subclass will have a reference to the super
+ * class that contains this generic information. Through reflection, we pick
+ * this reference up and return it with the getType() call.
+ *
+ * <pre>
+ * List&lt;String&gt; result = converter.convert(Arrays.asList(1, 2, 3))
+ *             .to(new TypeReference&lt;List&lt;String&gt;&gt;() {});
+ * </pre>
+ *
+ * @param <T> The target type for the conversion.
+ * @author $Id$
+ * @Immutable
+ */
+@ConsumerType
+public class TypeReference<T> {
+       /**
+        * A {@link TypeReference} cannot be directly instantiated. To use it, 
it
+        * has to be extended, typically as an anonymous inner class.
+        */
+       protected TypeReference() {}
+
+       /**
+        * Return the actual type of this Type Reference
+        *
+        * @return the type of this reference.
+        */
+       public Type getType() {
+               return ((ParameterizedType) getClass().getGenericSuperclass())
+                               .getActualTypeArguments()[0];
+       }
+}

Added: 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/package-info.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/package-info.java?rev=1765413&view=auto
==============================================================================
--- 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/package-info.java
 (added)
+++ 
felix/trunk/converter/converter/src/main/java/org/osgi/util/converter/package-info.java
 Tue Oct 18 11:02:20 2016
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+/**
+ * Converter Package Version 1.0.
+ * <p>
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types 
of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ * <p>
+ * Example import for consumers using the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.converter; version="[1.0,2.0)"}
+ * <p>
+ * Example import for providers implementing the API in this package:
+ * <p>
+ * {@code  Import-Package: org.osgi.converter; version="[1.0,1.1)"}
+ *
+ * @author $Id: 1b82a2a1db1431c5e4398f368662b5b6fb5f8547 $
+ */
+@Version("1.0")
+package org.osgi.util.converter;
+
+import org.osgi.annotation.versioning.Version;

Modified: 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterBuilderTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterBuilderTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterBuilderTest.java
 (original)
+++ 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterBuilderTest.java
 Tue Oct 18 11:02:20 2016
@@ -30,10 +30,10 @@ import java.util.stream.Stream;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.ConvertFunction;
-import org.osgi.converter.Converter;
-import org.osgi.converter.ConverterBuilder;
-import org.osgi.converter.Rule;
+import org.osgi.util.converter.ConvertFunction;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.ConverterBuilder;
+import org.osgi.util.converter.Rule;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;

Modified: 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterMapTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterMapTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterMapTest.java
 (original)
+++ 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterMapTest.java
 Tue Oct 18 11:02:20 2016
@@ -28,10 +28,10 @@ import java.util.Map;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.Converter;
-import org.osgi.converter.ConverterBuilder;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.ConverterBuilder;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;

Modified: 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
 (original)
+++ 
felix/trunk/converter/converter/src/test/java/org/apache/felix/converter/impl/ConverterTest.java
 Tue Oct 18 11:02:20 2016
@@ -51,11 +51,11 @@ import org.apache.felix.converter.impl.M
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
-import org.osgi.converter.ConverterBuilder;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.ConverterBuilder;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Node.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Node.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Node.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Node.java
 Tue Oct 18 11:02:20 2016
@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
 
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public interface Node {
 

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Schematizer.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Schematizer.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Schematizer.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/Schematizer.java
 Tue Oct 18 11:02:20 2016
@@ -19,8 +19,8 @@ import java.util.Map;
 import java.util.Optional;
 
 import org.osgi.annotation.versioning.ProviderType;
-import org.osgi.converter.TypeReference;
 import org.osgi.dto.DTO;
+import org.osgi.util.converter.TypeReference;
 
 @ProviderType
 public interface Schematizer {

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/StandardSchematizer.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/StandardSchematizer.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/StandardSchematizer.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/StandardSchematizer.java
 Tue Oct 18 11:02:20 2016
@@ -19,8 +19,8 @@ package org.apache.felix.schematizer;
 import java.util.Map;
 import java.util.Optional;
 
-import org.osgi.converter.TypeReference;
 import org.osgi.dto.DTO;
+import org.osgi.util.converter.TypeReference;
 
 public class StandardSchematizer implements Schematizer {
     private final Schematizer schematizer;

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/TypeRule.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/TypeRule.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/TypeRule.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/TypeRule.java
 Tue Oct 18 11:02:20 2016
@@ -15,7 +15,7 @@
  */
 package org.apache.felix.schematizer;
 
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public class TypeRule<T> {
        private final String                            path;

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/CollectionNode.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/CollectionNode.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/CollectionNode.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/CollectionNode.java
 Tue Oct 18 11:02:20 2016
@@ -18,7 +18,7 @@ package org.apache.felix.schematizer.imp
 import java.lang.reflect.Type;
 import java.util.Collection;
 
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public class CollectionNode
         extends NodeImpl

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/NodeImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/NodeImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/NodeImpl.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/NodeImpl.java
 Tue Oct 18 11:02:20 2016
@@ -23,7 +23,7 @@ import java.util.Optional;
 import java.util.function.Function;
 
 import org.apache.felix.schematizer.Node;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public class NodeImpl implements Node {
 

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/SchematizerImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/SchematizerImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/SchematizerImpl.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/SchematizerImpl.java
 Tue Oct 18 11:02:20 2016
@@ -38,8 +38,8 @@ import org.apache.felix.schematizer.Node
 import org.apache.felix.schematizer.Schema;
 import org.apache.felix.schematizer.Schematizer;
 import org.apache.felix.schematizer.TypeRule;
-import org.osgi.converter.TypeReference;
 import org.osgi.dto.DTO;
+import org.osgi.util.converter.TypeReference;
 
 public class SchematizerImpl implements Schematizer {
 

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/Util.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/Util.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/Util.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/schematizer/impl/Util.java
 Tue Oct 18 11:02:20 2016
@@ -25,7 +25,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public class Util {
     private static final Map<Class<?>, Class<?>> boxedClasses;

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -32,11 +32,11 @@ import java.util.Scanner;
 import org.apache.felix.schematizer.Node;
 import org.apache.felix.schematizer.Schema;
 import org.apache.felix.schematizer.impl.Util;
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
-import org.osgi.converter.TypeReference;
 import org.osgi.dto.DTO;
 import org.osgi.service.serializer.Deserializing;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.TypeReference;
 
 public class JsonDeserializingImpl<T> implements Deserializing<T> {
     private final Object target;

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
 Tue Oct 18 11:02:20 2016
@@ -24,11 +24,11 @@ import java.nio.charset.StandardCharsets
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
 import org.osgi.service.serializer.Serializer;
 import org.osgi.service.serializer.Serializing;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 public class JsonSerializerImpl implements Serializer {
     private final Map<String, Object> configuration = new 
ConcurrentHashMap<>();

Modified: 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -28,10 +28,10 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
 import org.osgi.dto.DTO;
 import org.osgi.service.serializer.Serializing;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
 
 public class JsonSerializingImpl implements Serializing {
     private volatile Converter converter;

Modified: 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/schematizer/impl/SchematizerServiceTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/test/java/org/apache/felix/schematizer/impl/SchematizerServiceTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/schematizer/impl/SchematizerServiceTest.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/schematizer/impl/SchematizerServiceTest.java
 Tue Oct 18 11:02:20 2016
@@ -24,9 +24,9 @@ import org.apache.felix.schematizer.Sche
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;

Modified: 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/impl/json/JsonDeserializationTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/impl/json/JsonDeserializationTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/impl/json/JsonDeserializationTest.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/impl/json/JsonDeserializationTest.java
 Tue Oct 18 11:02:20 2016
@@ -26,9 +26,9 @@ import org.apache.felix.serializer.impl.
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;

Modified: 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ComplexManagerService.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ComplexManagerService.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ComplexManagerService.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ComplexManagerService.java
 Tue Oct 18 11:02:20 2016
@@ -28,7 +28,7 @@ import org.apache.felix.serializer.test.
 import org.apache.felix.serializer.test.prevayler.AggregateTypeReference;
 import 
org.apache.felix.serializer.test.prevayler.MockPrevaylerBackedRepository;
 import org.apache.felix.serializer.test.prevayler.Repository;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public class ComplexManagerService
        implements ComplexManager

Modified: 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ObjectFactory.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ObjectFactory.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ObjectFactory.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/ObjectFactory.java
 Tue Oct 18 11:02:20 2016
@@ -18,8 +18,8 @@ package org.apache.felix.serializer.test
 
 import java.util.Collection;
 
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
 
 public class ObjectFactory
 {

Modified: 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/SimpleManagerService.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/SimpleManagerService.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/SimpleManagerService.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/objects/provider/SimpleManagerService.java
 Tue Oct 18 11:02:20 2016
@@ -27,7 +27,7 @@ import org.apache.felix.serializer.test.
 import org.apache.felix.serializer.test.prevayler.AggregateTypeReference;
 import 
org.apache.felix.serializer.test.prevayler.MockPrevaylerBackedRepository;
 import org.apache.felix.serializer.test.prevayler.Repository;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 public class SimpleManagerService
        implements SimpleManager

Modified: 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/prevayler/DTOSerializer.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/prevayler/DTOSerializer.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/prevayler/DTOSerializer.java
 (original)
+++ 
felix/trunk/converter/schematizer/src/test/java/org/apache/felix/serializer/test/prevayler/DTOSerializer.java
 Tue Oct 18 11:02:20 2016
@@ -31,9 +31,9 @@ import org.apache.felix.schematizer.Sche
 import org.apache.felix.schematizer.TypeRule;
 import org.apache.felix.schematizer.impl.SchematizerImpl;
 import org.apache.felix.serializer.impl.json.JsonSerializerImpl;
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 public class DTOSerializer<C extends CommandDTO<?>>
 {

Modified: 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonDeserializingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -25,9 +25,9 @@ import java.util.Map;
 import java.util.Scanner;
 
 import org.apache.felix.converter.impl.Util;
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
 import org.osgi.service.serializer.Deserializing;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
 
 public class JsonDeserializingImpl<T> implements Deserializing<T> {
     private final Type type;

Modified: 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java
 Tue Oct 18 11:02:20 2016
@@ -24,12 +24,12 @@ import java.nio.charset.StandardCharsets
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
 import org.osgi.service.serializer.Deserializing;
 import org.osgi.service.serializer.Serializer;
 import org.osgi.service.serializer.Serializing;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 public class JsonSerializerImpl implements Serializer {
     private final Map<String, Object> configuration = new 
ConcurrentHashMap<>();

Modified: 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -28,10 +28,10 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
 import org.osgi.dto.DTO;
 import org.osgi.service.serializer.Serializing;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
 
 public class JsonSerializingImpl implements Serializing {
     private volatile Converter converter;

Modified: 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlDeserializingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlDeserializingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlDeserializingImpl.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlDeserializingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -24,9 +24,9 @@ import java.nio.charset.StandardCharsets
 import java.util.Scanner;
 
 import org.apache.felix.converter.impl.Util;
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
 import org.osgi.service.serializer.Deserializing;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
 import org.yaml.snakeyaml.Yaml;
 
 public class YamlDeserializingImpl<T> implements Deserializing<T> {

Modified: 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializerImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializerImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializerImpl.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializerImpl.java
 Tue Oct 18 11:02:20 2016
@@ -20,12 +20,12 @@ import java.lang.reflect.Type;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
 import org.osgi.service.serializer.Deserializing;
 import org.osgi.service.serializer.Serializer;
 import org.osgi.service.serializer.Serializing;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 public class YamlSerializerImpl implements Serializer {
     private final Map<String, Object> configuration = new 
ConcurrentHashMap<>();

Modified: 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializingImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializingImpl.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializingImpl.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/apache/felix/serializer/impl/yaml/YamlSerializingImpl.java
 Tue Oct 18 11:02:20 2016
@@ -28,9 +28,9 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.osgi.converter.ConversionException;
-import org.osgi.converter.Converter;
 import org.osgi.service.serializer.Serializing;
+import org.osgi.util.converter.ConversionException;
+import org.osgi.util.converter.Converter;
 
 public class YamlSerializingImpl implements Serializing {
     private volatile Converter converter;

Modified: 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Deserializing.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Deserializing.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Deserializing.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Deserializing.java
 Tue Oct 18 11:02:20 2016
@@ -19,7 +19,7 @@ import java.io.InputStream;
 import java.nio.charset.Charset;
 
 import org.osgi.annotation.versioning.ProviderType;
-import org.osgi.converter.Converter;
+import org.osgi.util.converter.Converter;
 
 /**
  * Interface to specify the source of the decoding operation

Modified: 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializer.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializer.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializer.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializer.java
 Tue Oct 18 11:02:20 2016
@@ -18,7 +18,7 @@ package org.osgi.service.serializer;
 import java.lang.reflect.Type;
 
 import org.osgi.annotation.versioning.ProviderType;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.TypeReference;
 
 /**
  * The Codec service can be used to encode a given object in a certain

Modified: 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializing.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializing.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializing.java
 (original)
+++ 
felix/trunk/converter/serializer/src/main/java/org/osgi/service/serializer/Serializing.java
 Tue Oct 18 11:02:20 2016
@@ -20,7 +20,7 @@ import java.io.OutputStream;
 import java.nio.charset.Charset;
 
 import org.osgi.annotation.versioning.ProviderType;
-import org.osgi.converter.Converter;
+import org.osgi.util.converter.Converter;
 
 /**
  * Interface to specify the target of the encoding operation.
@@ -30,67 +30,67 @@ import org.osgi.converter.Converter;
  */
 @ProviderType
 public interface Serializing {
-    /**
-     * Specify that keys with a {@code null} value must not appear in the
-     * result. If not specified {@code null} values will be included in the
-     * result.
-     *
-     * @return This Serializing object to allow further invocations on it.
-     */
-    Serializing ignoreNull();
-
-    /**
-     * Specify that the encoded output should be formatted to look 'pretty',
-     * which may make it easier for humans to read. If not specified, the
-     * encoded output should be formatted to be compact, so save space.
-     *
-     * @return This Serializing object to allow further invocations on it.
-     */
-    Serializing pretty();
-
-    /**
-     * Use an output stream as the target of the encoding operation. UTF-8 will
-     * be used if applicable, the character set may not apply to binary
-     * encodings.
-     *
-     * @param out The output stream to use.
-     * @throws IOException If an I/O error occurred.
-     */
-    void to(OutputStream out) throws IOException;
-
-    /**
-     * Use an output stream as the target of the encoding operation.
-     *
-     * @param out The output stream to use.
-     * @param charset The character set to use, if applicable, the character 
set
-     *            may not apply to binary encodings.
-     * @throws IOException If an I/O error occurred.
-     */
-    void to(OutputStream out, Charset charset) throws IOException;
-
-    /**
-     * Encode the object and append the result to an appendable.
-     *
-     * @param out The appendable object to use.
-     * @return The appendable object provided in, which allows further appends
-     *         to it be done in a fluent programming style.
-     */
-    Appendable to(Appendable out);
-
-    /**
-     * Encode the object and return the result as a string.
-     *
-     * @return The encoded object.
-     */
-    @Override
-    String toString();
-
-    /**
-     * Specify the converter to be used by the code, if an alternative, 
adapted,
-     * converter is to be used.
-     *
-     * @param converter The converter to use.
-     * @return This Serializing object to allow further invocations on it.
-     */
-    Serializing with(Converter converter);
+       /**
+        * Specify that keys with a {@code null} value must not appear in the
+        * result. If not specified {@code null} values will be included in the
+        * result.
+        *
+        * @return This Serializing object to allow further invocations on it.
+        */
+       Serializing ignoreNull();
+
+       /**
+        * Specify that the encoded output should be formatted to look 'pretty',
+        * which may make it easier for humans to read. If not specified, the
+        * encoded output should be formatted to be compact, so save space.
+        *
+        * @return This Serializing object to allow further invocations on it.
+        */
+       Serializing pretty();
+
+       /**
+        * Use an output stream as the target of the encoding operation. UTF-8 
will
+        * be used if applicable, the character set may not apply to binary
+        * encodings.
+        *
+        * @param out The output stream to use.
+        * @throws IOException If an I/O error occurred.
+        */
+       void to(OutputStream out) throws IOException;
+
+       /**
+        * Use an output stream as the target of the encoding operation.
+        *
+        * @param out The output stream to use.
+        * @param charset The character set to use, if applicable, the 
character set
+        *            may not apply to binary encodings.
+        * @throws IOException If an I/O error occurred.
+        */
+       void to(OutputStream out, Charset charset) throws IOException;
+
+       /**
+        * Encode the object and append the result to an appendable.
+        *
+        * @param out The appendable object to use.
+        * @return The appendable object provided in, which allows further 
appends
+        *         to it be done in a fluent programming style.
+        */
+       Appendable to(Appendable out);
+
+       /**
+        * Encode the object and return the result as a string.
+        *
+        * @return The encoded object.
+        */
+       @Override
+       String toString();
+
+       /**
+        * Specify the converter to be used by the code, if an alternative, 
adapted,
+        * converter is to be used.
+        *
+        * @param converter The converter to use.
+        * @return This Serializing object to allow further invocations on it.
+        */
+       Serializing with(Converter converter);
 }

Modified: 
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
 (original)
+++ 
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
 Tue Oct 18 11:02:20 2016
@@ -26,9 +26,9 @@ import org.apache.sling.commons.json.JSO
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;

Modified: 
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java?rev=1765413&r1=1765412&r2=1765413&view=diff
==============================================================================
--- 
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java
 (original)
+++ 
felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java
 Tue Oct 18 11:02:20 2016
@@ -22,9 +22,9 @@ import java.util.Map;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.osgi.converter.Converter;
-import org.osgi.converter.StandardConverter;
-import org.osgi.converter.TypeReference;
+import org.osgi.util.converter.Converter;
+import org.osgi.util.converter.StandardConverter;
+import org.osgi.util.converter.TypeReference;
 
 import static org.junit.Assert.assertEquals;
 


Reply via email to