org.apache.xbean.server.propertyeditor
Class InetAddressEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.apache.xbean.server.propertyeditor.InetAddressEditor
- All Implemented Interfaces:
- PropertyEditor
public class InetAddressEditor
- extends PropertyEditorSupport
InetAddressEditor is a java beans property editor that can convert an InetAddreass to and from a String.
- Since:
- 2.0
- Author:
- Dain Sundstrom
Method Summary |
String |
getAsText()
Converts the stored InetAddress value into a String. |
void |
setAsText(String value)
Converts the specified string value into an InetAddress and stores the value in this instance. |
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InetAddressEditor
public InetAddressEditor()
setAsText
public void setAsText(String value)
throws IllegalArgumentException
- Converts the specified string value into an InetAddress and stores the value in this instance.
- Specified by:
setAsText
in interface PropertyEditor
- Overrides:
setAsText
in class PropertyEditorSupport
- Parameters:
value
- the string to convert into an InetAddress
- Throws:
IllegalArgumentException
- if the specified string value is not a valid InetAddress
getAsText
public String getAsText()
throws NullPointerException
- Converts the stored InetAddress value into a String.
- Specified by:
getAsText
in interface PropertyEditor
- Overrides:
getAsText
in class PropertyEditorSupport
- Returns:
- the string form of the current InetAddress value
- Throws:
NullPointerException
- if the current InetAddress is null
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.