org.java.plugin.extension.converter
Interface Converter<Source,Target>

All Known Subinterfaces:
ExtendedConverter<Source,Target>
All Known Implementing Classes:
Converters.Image2Icon, Converters.Object2String, Converters.String2Boolean, Converters.String2Byte, Converters.String2Character, Converters.String2Class, Converters.String2Double, Converters.String2File, Converters.String2Float, Converters.String2Integer, Converters.String2Long, Converters.String2Short, Converters.String2Url, Converters.Url2Image, StringConverter, TypeConverter

public interface Converter<Source,Target>

Implementations convert from source to target type.

This interface is supported by an ExtensionPoint "PluginSystem@Converter". If you want to use the @Extension annotation, consider implementing ExtendedConverter otherwise you have to specify source and target parameters using data type Strings that can be parsed by the TypeConverter

Author:
Thasso Griebel (thasso.griebel@gmail.com)

Method Summary
 Target convert(Source source, java.lang.ClassLoader loader)
          Converts the given source object to target type using the given classloader to resolve any resources.
 

Method Detail

convert

Target convert(Source source,
               java.lang.ClassLoader loader)
Converts the given source object to target type using the given classloader to resolve any resources.

Parameters:
source - the source value
loader - the loader
Returns:
converted result


Copyright © 2010. All Rights Reserved.