org.apache.mina.integration.beans
Class InetAddressEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.apache.mina.integration.beans.AbstractPropertyEditor
          extended by org.apache.mina.integration.beans.InetAddressEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class InetAddressEditor
extends AbstractPropertyEditor

A PropertyEditor which converts a String into an InetAddress. This editor simply calls InetAddress.getByName(java.lang.String) when converting from a String, and InetAddress.getHostAddress() when converting to a String.

Author:
Apache MINA Project
See Also:
InetAddress

Constructor Summary
InetAddressEditor()
           
 
Method Summary
protected  java.lang.String defaultText()
           
protected  java.lang.Object defaultValue()
           
protected  java.lang.String toText(java.lang.Object value)
           
protected  java.lang.Object toValue(java.lang.String text)
           
 
Methods inherited from class org.apache.mina.integration.beans.AbstractPropertyEditor
getAsText, getValue, setAsText, setTrimText, setValue
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InetAddressEditor

public InetAddressEditor()
Method Detail

toText

protected java.lang.String toText(java.lang.Object value)
Specified by:
toText in class AbstractPropertyEditor

toValue

protected java.lang.Object toValue(java.lang.String text)
                            throws java.lang.IllegalArgumentException
Specified by:
toValue in class AbstractPropertyEditor
Throws:
java.lang.IllegalArgumentException

defaultText

protected java.lang.String defaultText()
Overrides:
defaultText in class AbstractPropertyEditor

defaultValue

protected java.lang.Object defaultValue()
Overrides:
defaultValue in class AbstractPropertyEditor


Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.