Class TypeConverters.InetAddressConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.config.plugins.convert.TypeConverters.InetAddressConverter
-
- All Implemented Interfaces:
TypeConverter<java.net.InetAddress>
- Enclosing class:
- TypeConverters
@Plugin(name="InetAddress", category="TypeConverter") public static class TypeConverters.InetAddressConverter extends java.lang.Object implements TypeConverter<java.net.InetAddress>
Converts aString
into anInetAddress
.
-
-
Constructor Summary
Constructors Constructor Description InetAddressConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.InetAddress
convert(java.lang.String s)
Converts a String to a given type.
-
-
-
Method Detail
-
convert
public java.net.InetAddress convert(java.lang.String s) throws java.lang.Exception
Description copied from interface:TypeConverter
Converts a String to a given type.- Specified by:
convert
in interfaceTypeConverter<java.net.InetAddress>
- Parameters:
s
- the String to convert. Cannot benull
.- Returns:
- the converted object.
- Throws:
java.lang.Exception
- thrown when a conversion error occurs
-
-