Package 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.
-
-
Constructor Summary
Constructors Constructor Description MemoryPropertyEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAsText()
void
setAsText(String text)
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
-
-
-
Method Detail
-
setAsText
public void setAsText(String text) throws IllegalArgumentException
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Throws:
IllegalArgumentException
-
getAsText
public String getAsText()
- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-
-