Class StaticFactoryConverter
java.lang.Object
java.beans.PropertyEditorSupport
org.apache.xbean.propertyeditor.AbstractConverter
org.apache.xbean.propertyeditor.StaticFactoryConverter
- All Implemented Interfaces:
PropertyEditor, Converter
Of the javax and java packages in the Java 8 JVM, there are roughly
10 static factory patterns in use.
Here they are listed in the order they are preferred by this library
64 valueOf
7 new
6 decode
5 for
4 of
1 parse
1 from
1 create
1 compile
40 get
Though get* has the second most usage in the JVM, it is also the least
consistent and in classes that have multiple factories, it is the least
preferred.
For each of these prefixes there is a sub order of preference, using
"create" as an example, this is the preferred usage:
- create
- create
- create*
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StaticFactoryConverterprotected ObjecttoObjectImpl(String text) Converts the supplied text in to an instance of the editor type.Methods inherited from class AbstractConverter
getAsText, getType, getValue, setAsText, setValue, toObject, toString, toStringImplMethods inherited from class PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyEditor
addPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
-
Constructor Details
-
StaticFactoryConverter
-
-
Method Details
-
toObjectImpl
Description copied from class:AbstractConverterConverts the supplied text in to an instance of the editor type. The text will never be null, and trim() will already have been called.- Specified by:
toObjectImplin classAbstractConverter- Parameters:
text- the text to convert- Returns:
- an instance of the editor type
-
editor
-