Class InetAddressEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.apache.mina.integration.beans.AbstractPropertyEditor
-
- org.apache.mina.integration.beans.InetAddressEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor
public class InetAddressEditor extends AbstractPropertyEditor
APropertyEditorwhich converts aStringinto anInetAddress. This editor simply callsInetAddress.getByName(java.lang.String)when converting from aString, andInetAddress.getHostAddress()when converting to aString.- Author:
- Apache MINA Project
- See Also:
InetAddress
-
-
Constructor Summary
Constructors Constructor Description InetAddressEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringdefaultText()protected java.lang.ObjectdefaultValue()protected java.lang.StringtoText(java.lang.Object value)Returns a String representation of the given valueprotected java.lang.ObjecttoValue(java.lang.String text)Returns an instance from a String representation of an object-
Methods inherited from class org.apache.mina.integration.beans.AbstractPropertyEditor
getAsText, getValue, setAsText, setTrimText, setValue
-
-
-
-
Method Detail
-
toText
protected java.lang.String toText(java.lang.Object value)
Description copied from class:AbstractPropertyEditorReturns a String representation of the given value- Specified by:
toTextin classAbstractPropertyEditor- Parameters:
value- The value- Returns:
- A String representation of the value
-
toValue
protected java.lang.Object toValue(java.lang.String text) throws java.lang.IllegalArgumentExceptionDescription copied from class:AbstractPropertyEditorReturns an instance from a String representation of an object- Specified by:
toValuein classAbstractPropertyEditor- Parameters:
text- The String representation to convert- Returns:
- A instance of an object
- Throws:
java.lang.IllegalArgumentException
-
defaultText
protected java.lang.String defaultText()
- Overrides:
defaultTextin classAbstractPropertyEditor- Returns:
- The default text
-
defaultValue
protected java.lang.Object defaultValue()
- Overrides:
defaultValuein classAbstractPropertyEditor- Returns:
- The default value
-
-