org.netbeans.api.settings
Annotation Type FactoryMethod
@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface FactoryMethod
Specifies an alternative factory method to use (rather than constructor)
to create the instance. Use in orchestration with
ConvertAsProperties or on any class that is processed by serializing
Convertors.
- Since:
- 1.40
|
Required Element Summary |
String |
value
Name of factory method to use instead of default constructor. |
value
public abstract String value
- Name of factory method to use instead of default constructor. Sometimes, for
example when dealing with singletons, it may be desirable to control how
an instance of given class is created. In such case one can create a
factory method (takes no arguments and returns instance of desired type)
in the class annotated by
ConvertAsProperties annotation.