org.netbeans.modules.settings/1 1.38.2

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.
 

Element Detail

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.


org.netbeans.modules.settings/1 1.38.2

Built on June 6 2013.  |  Portions Copyright 1997-2013 Oracle. All rights reserved.