Author: adrianc
Date: Tue Nov 24 05:35:18 2009 New Revision: 883589 URL: http://svn.apache.org/viewvc?rev=883589&view=rev Log: JavaDoc updates in the conversion framework. No functional changes. Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractConverter.java ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractLocalizedConverter.java ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/CollectionConverters.java ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converter.java ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/ConverterLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/LocalizedConverter.java Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractConverter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractConverter.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractConverter.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractConverter.java Tue Nov 24 05:35:18 2009 @@ -21,7 +21,8 @@ import org.ofbiz.base.util.ObjectType; /** Abstract Converter class. This class handles converter registration - * and it implements the <code>canConvert</code> method. + * and it implements the <code>canConvert</code>, <code>getSourceClass</code>, + * and <code>getTargetClass</code> methods. */ public abstract class AbstractConverter<S, T> implements Converter<S, T> { private final Class<? super S> sourceClass; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractLocalizedConverter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractLocalizedConverter.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractLocalizedConverter.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/AbstractLocalizedConverter.java Tue Nov 24 05:35:18 2009 @@ -20,8 +20,9 @@ import org.ofbiz.base.util.ObjectType; -/** Abstract LocalizedConverter class. This class handles converter registration - * and it implements the <code>canConvert</code> method. +/** Abstract LocalizedConverter class. This class handles converter registration + * and it implements the <code>canConvert</code>, <code>getSourceClass</code>, + * and <code>getTargetClass</code> methods. */ public abstract class AbstractLocalizedConverter<S, T> implements LocalizedConverter<S, T> { private final Class<S> sourceClass; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/CollectionConverters.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/CollectionConverters.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/CollectionConverters.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/CollectionConverters.java Tue Nov 24 05:35:18 2009 @@ -25,7 +25,6 @@ import org.ofbiz.base.util.ObjectType; import org.ofbiz.base.util.StringUtil; -import org.ofbiz.base.util.UtilGenerics; import javolution.util.FastList; import javolution.util.FastSet; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converter.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converter.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converter.java Tue Nov 24 05:35:18 2009 @@ -18,7 +18,8 @@ *******************************************************************************/ package org.ofbiz.base.conversion; -/** Converter interface. +/** Converter interface. Classes implement this interface to convert one + * Java object type to another. * * @param <S> The source object type * @param <T> The target object type Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/ConverterLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/ConverterLoader.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/ConverterLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/ConverterLoader.java Tue Nov 24 05:35:18 2009 @@ -18,9 +18,9 @@ *******************************************************************************/ package org.ofbiz.base.conversion; -/** Converter loader interface. Components implement this - * interface to load their object class converters. - * +/** Converter loader interface. Applications implement this + * interface to load their Java object converters. + * */ public interface ConverterLoader { /** Create and register converters with the Java object type Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java Tue Nov 24 05:35:18 2009 @@ -38,7 +38,12 @@ protected static final String DELIMITER = "->"; protected static final Map<String, Converter<?, ?>> converterMap = FastMap.newInstance(); protected static final Set<String> noConversions = FastSet.newInstance(); - protected static final Converter<Object, Object> nullConverter = new NullConverter(); + /** Null converter used when the source and target java object + * types are the same. The <code>convert</code> method returns the + * source object. + * + */ + public static final Converter<Object, Object> nullConverter = new NullConverter(); static { ClassLoader loader = Thread.currentThread().getContextClassLoader(); @@ -137,6 +142,11 @@ } } + /** Null converter used when the source and target java object + * types are the same. The <code>convert</code> method returns the + * source object. + * + */ protected static class NullConverter implements Converter<Object, Object> { public NullConverter() { Converters.registerConverter(this); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/LocalizedConverter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/LocalizedConverter.java?rev=883589&r1=883588&r2=883589&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/LocalizedConverter.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/LocalizedConverter.java Tue Nov 24 05:35:18 2009 @@ -21,7 +21,10 @@ import java.util.Locale; import java.util.TimeZone; -/** Localized converter interface. */ +/** Localized converter interface. Classes implement this interface + * to convert one object type to another. Methods are provided to + * localize the conversion. + */ public interface LocalizedConverter<S, T> extends Converter<S, T> { /** Converts <code>obj</code> to <code>T</code>. * |
Free forum by Nabble | Edit this page |