Class PatternEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.beans.propertyeditors.PatternEditor
- All Implemented Interfaces:
PropertyEditor
public class PatternEditor extends PropertyEditorSupport
Editor forjava.util.regex.Pattern, to directly populate a Pattern property. Expects the same syntax as Pattern'scompilemethod.- Since:
- 2.0.1
- Author:
- Juergen Hoeller
- See Also:
Pattern,Pattern.compile(String)
Constructor Summary
Constructors Constructor Description PatternEditor()Create a new PatternEditor with default settings.PatternEditor(int flags)Create a new PatternEditor with the given settings.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAsText()voidsetAsText(String text)Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
Constructor Detail
PatternEditor
public PatternEditor()
Create a new PatternEditor with default settings.
PatternEditor
public PatternEditor(int flags)
Create a new PatternEditor with the given settings.- Parameters:
flags- thejava.util.regex.Patternflags to apply- See Also:
Pattern.compile(String, int),Pattern.CASE_INSENSITIVE,Pattern.MULTILINE,Pattern.DOTALL,Pattern.UNICODE_CASE,Pattern.CANON_EQ
Method Detail
setAsText
public void setAsText(String text)
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport
getAsText
public String getAsText()
- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport