org.java.plugin.extension.converter
Class Converters.String2Url
java.lang.Object
org.java.plugin.extension.converter.StringConverter<java.net.URL>
org.java.plugin.extension.converter.Converters.String2Url
- All Implemented Interfaces:
- Converter<java.lang.String,java.net.URL>, ExtendedConverter<java.lang.String,java.net.URL>
- Enclosing class:
- Converters
public static class Converters.String2Url
- extends StringConverter<java.net.URL>
Converts a String to an URL. If the string contains the protocol (identified by
searching for "://"), this just creates the URL. Otherwise this uses the given loader
to resolve the string as resoruce in the classpath.
Method Summary |
java.net.URL |
convert(java.lang.String s,
java.lang.ClassLoader loader)
Converts the given source object to target type using the given classloader
to resolve any resources. |
java.lang.reflect.Type |
getTarget()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Converters.String2Url
public Converters.String2Url()
convert
public java.net.URL convert(java.lang.String s,
java.lang.ClassLoader loader)
- Description copied from interface:
Converter
- Converts the given source object to target type using the given classloader
to resolve any resources.
- Parameters:
s
- the source valueloader
- the loader
- Returns:
- converted result
getTarget
public java.lang.reflect.Type getTarget()
- Returns:
- target type
Copyright © 2010. All Rights Reserved.