|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.java.plugin.extension.util.PluginTypeConverter
public class PluginTypeConverter
Extend this class to provide costom type convertion from within a plugin. The loader will be set to the plugins class loader and you can use it in your convert method.
TypeConverter
Constructor Summary | |
---|---|
PluginTypeConverter(java.lang.ClassLoader loader,
ConverterGraph converters)
Create a new PluginTypeConverter with given loader |
Method Summary | |
---|---|
java.lang.Object |
convert(java.lang.String value,
com.google.inject.TypeLiteral<?> toType)
Convert given String to Object. |
protected java.lang.ClassLoader |
getLoader()
Get the plugin classloader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginTypeConverter(java.lang.ClassLoader loader, ConverterGraph converters)
loader
- the classloader used to resolve resourcesMethod Detail |
---|
public java.lang.Object convert(java.lang.String value, com.google.inject.TypeLiteral<?> toType)
getLoader()
to
resolve resources from within the current plugin.
convert
in interface com.google.inject.spi.TypeConverter
value
- the string to be convertedtoType
- the target type
protected java.lang.ClassLoader getLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |