Annotation Type Generator.RunsLocal
- Enclosing class:
Generator
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
invalid reference
#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).
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
The list of names of properties which will be accessed by this Generator. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A special value forrequiresProperties()
to indicate that any property can affect this generator's output.
-
Field Details
-
ALL
A special value forrequiresProperties()
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.- See Also:
-
-
Element Details
-
requiresProperties
String[] requiresPropertiesThe list of names of properties which will be accessed by this Generator. It is assumed that any change in the values of these properties will affect the content of Generator output.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.- Default:
{}
-