@Target(value={TYPE,CONSTRUCTOR})
public @interface AutoFactory
The visibility of the generated factories will always be either public
or default
visibility. The visibility of any given factory method is determined by the visibility of the
type being created. The generated factory is public
if any of the factory methods are.
Any method that implements an interface method is necessarily public and any method that
overrides an abstract method has the same visibility as that method.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
allowSubclasses
Whether or not the generated factory should be final.
|
java.lang.String |
className
The simple name of the generated factory; the factory is always generated in the same
package.
|
java.lang.Class<?> |
extending
The type that the generated factory is require to extend.
|
java.lang.Class<?>[] |
implementing
A list of interfaces that the generated factory is required to implement.
|
public abstract java.lang.String className
Factory
appended to the end. E.g.: The default name for a
factory for MyType
will be MyTypeFactory
.public abstract java.lang.Class<?>[] implementing