@Inherited @Retention(value=RUNTIME) public static @interface Generator.RunsLocal
When this annotation is applied, the generator cannot access global level type information
(e.g. JClassType#getSubTypes
or TypeOracle#getTypes
) and also accesses to
property values are restricted to the ones defined by #requiredProperties
.
This information is used by Generator invocation during incremental compilation to run Generators as early as possible in the compile tree (and thus as parallelized and cached as possible).
Modifier and Type | Fields and Description |
---|---|
static String |
ALL
A special value for
requiresProperties() to indicate that any property can affect this
generator's output. |
Modifier and Type | Optional Element and Description |
---|---|
String[] |
requiresProperties
The list of names of properties which will be accessed by this Generator.
|
public static final String ALL
requiresProperties()
to indicate that any property can affect this
generator's output. While this gives access to any property value, this may slowdown the
compilation speed to precompute all property values.public abstract String[] requiresProperties
Any Generator that depends on properties will have its execution delayed to the point in the compile tree where it is known that the properties it cares about have stopped changing. In general this result of pushing Generator execution towards the root of the tree has negative performance consequences on incremental compile performance.
Generators that want to be as fast as possible should strive not to read any properties.
Can be set to RunsLocal.ALL
to indicate a need to arbitrarily access any property.
Copyright © 2018. All rights reserved.