org.apache.commons.convert.conversion
Class ClassToStringConversion

java.lang.Object
  extended by org.apache.commons.convert.conversion.AbstractConversion
      extended by org.apache.commons.convert.conversion.ClassToStringConversion
All Implemented Interfaces:
Conversion

public class ClassToStringConversion
extends AbstractConversion

Conversion from Class to String using getName().

Since:
1.0
Version:
$Id: ClassToStringConversion.java 155441 2005-02-26 13:19:22Z dirkv $
Author:
Stephen Colebourne

Field Summary
static Conversion INSTANCE
          Singleton instance of this factory
 
Fields inherited from class org.apache.commons.convert.conversion.AbstractConversion
STRING_CLASS
 
Constructor Summary
protected ClassToStringConversion()
          Constructor.
 
Method Summary
protected  Object convertValue(Object value, Converter converter)
          Convert the non-null Class to a String using getName().
 
Methods inherited from class org.apache.commons.convert.conversion.AbstractConversion
convert, getFromType, getToType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final Conversion INSTANCE
Singleton instance of this factory

Constructor Detail

ClassToStringConversion

protected ClassToStringConversion()
Constructor.

Method Detail

convertValue

protected Object convertValue(Object value,
                              Converter converter)
Convert the non-null Class to a String using getName().

Overrides:
convertValue in class AbstractConversion
Parameters:
value - the input value to be converted, pre-checked to not be null
converter - the converter being used, not null
Returns:
the converted value


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.