Package org.jboss.common.beans.property
Class InetAddressEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.jboss.common.beans.property.PropertyEditorSupport<java.net.InetAddress>
-
- org.jboss.common.beans.property.InetAddressEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor
,PropertyEditor<java.net.InetAddress>
public class InetAddressEditor extends PropertyEditorSupport<java.net.InetAddress>
A property editor forInetAddress
.
-
-
Constructor Summary
Constructors Constructor Description InetAddressEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAsText()
Gets the property value as text.void
setAsText(java.lang.String text)
Set the property value by parsing a given String.-
Methods inherited from class org.jboss.common.beans.property.PropertyEditorSupport
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getType, getValue, removePropertyChangeListener, removePropertyChangeListener, setValue
-
-
-
-
Method Detail
-
setAsText
public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
Description copied from interface:PropertyEditor
Set the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.- Specified by:
setAsText
in interfacejava.beans.PropertyEditor
- Specified by:
setAsText
in interfacePropertyEditor<java.net.InetAddress>
- Specified by:
setAsText
in classPropertyEditorSupport<java.net.InetAddress>
- Parameters:
text
- The string to be parsed.- Throws:
java.lang.IllegalArgumentException
-
getAsText
public java.lang.String getAsText()
Description copied from interface:PropertyEditor
Gets the property value as text.- Specified by:
getAsText
in interfacejava.beans.PropertyEditor
- Specified by:
getAsText
in interfacePropertyEditor<java.net.InetAddress>
- Overrides:
getAsText
in classPropertyEditorSupport<java.net.InetAddress>
- Returns:
- The property value as a human editable string.
Returns null if the value can't be expressed as an editable string.
If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().
-
-