com.planetalia.dynject.conversion
Class StringAssigner

java.lang.Object
  extended by com.planetalia.dynject.conversion.StringAssigner
All Implemented Interfaces:
IConverter
Direct Known Subclasses:
StringBufferAssigner, StringBuilderAssigner

public class StringAssigner
extends java.lang.Object
implements IConverter

Converts from different types to String

Author:
Alexander Hristov

Constructor Summary
StringAssigner()
           
 
Method Summary
 java.lang.Object convert(Configuration config, Environment env, java.lang.Object data, java.lang.Class targetClass)
          Main processing method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringAssigner

public StringAssigner()
Method Detail

convert

public java.lang.Object convert(Configuration config,
                                Environment env,
                                java.lang.Object data,
                                java.lang.Class targetClass)
Description copied from interface: IConverter
Main processing method. Performs whatever conversion the Converter wants to do. All parameters including data are guaranteed to be non-null.

Specified by:
convert in interface IConverter
Parameters:
config - The compile-time configuration of the field, specified through annotation values.
env - The runtime environment of the conversion process Runtime environment values override compile-time configuration.

data - The data value that must be processed
targetClass - - The required destination class.
Returns:
The conversion result. The returned object MUST either be of the targetClass if the conversion was possible, or it must be null if conversion was not possible.