@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.
|
String |
className
The simple name of the generated factory; the factory is always generated in the same
package.
|
Class<?> |
extending
The type that the generated factory is require to extend.
|
Class<?>[] |
implementing
A list of interfaces that the generated factory is required to implement.
|
public abstract String className
Factory
appended to the end. E.g.: The default name for a
factory for MyType
will be MyTypeFactory
.public abstract Class<?>[] implementing
public abstract Class<?> extending
Copyright © 2017 Google, Inc.. All rights reserved.