Package org.apache.activemq.util
Class MemoryIntPropertyEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.apache.activemq.util.MemoryIntPropertyEditor
-
- All Implemented Interfaces:
PropertyEditor
public class MemoryIntPropertyEditor extends PropertyEditorSupport
Used by xbean to set integers. 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 int values in bytes.
-
-
Constructor Summary
Constructors Constructor Description MemoryIntPropertyEditor()
-
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
-
-