org.apache.activemq.util
Class MemoryPropertyEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.apache.activemq.util.MemoryPropertyEditor
- All Implemented Interfaces:
- PropertyEditor
public class MemoryPropertyEditor
- extends PropertyEditorSupport
Used by xbean to set longs.
Important: Do not use this for other purposes than xbean, as property editors
are not thread safe, and they are slow to use.
Converts string values like "20 Mb", "1024kb", and "1g" to long values in
bytes.
| 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 |
MemoryPropertyEditor
public MemoryPropertyEditor()
setAsText
public void setAsText(String text)
throws IllegalArgumentException
- Specified by:
setAsText in interface PropertyEditor- Overrides:
setAsText in class PropertyEditorSupport
- Throws:
IllegalArgumentException
getAsText
public String getAsText()
- Specified by:
getAsText in interface PropertyEditor- Overrides:
getAsText in class PropertyEditorSupport
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.