public class CachedValueGenerator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
CachedValueGenerator.CachedValueInput
This represents a field on the Inputs class: it exists because we need to add the global key as
a field, want to share code with the rest of generation in this class, but don't want to create
a MethodParamModel because the globalKey isn't a method param.
|
Modifier and Type | Method and Description |
---|---|
static MethodSpec |
createGetterMethod(SpecModel specModel,
SpecMethodModel<DelegateMethod,java.lang.Void> onCalculateCachedValueMethod,
java.util.List<CachedValueGenerator.CachedValueInput> inputParams,
java.lang.String cachedValueName) |
static TypeSpec |
createInputsClass(java.util.List<CachedValueGenerator.CachedValueInput> inputParams,
java.lang.String cachedValueName,
java.util.EnumSet<RunMode> runMode) |
static TypeSpecDataHolder |
generate(SpecModel specModel,
java.util.EnumSet<RunMode> runMode) |
static java.util.List<CachedValueGenerator.CachedValueInput> |
getCachedValueInputs(SpecMethodModel<DelegateMethod,java.lang.Void> onCalculateCachedValueMethod) |
public static TypeSpecDataHolder generate(SpecModel specModel, java.util.EnumSet<RunMode> runMode)
public static java.util.List<CachedValueGenerator.CachedValueInput> getCachedValueInputs(SpecMethodModel<DelegateMethod,java.lang.Void> onCalculateCachedValueMethod)
public static MethodSpec createGetterMethod(SpecModel specModel, SpecMethodModel<DelegateMethod,java.lang.Void> onCalculateCachedValueMethod, java.util.List<CachedValueGenerator.CachedValueInput> inputParams, java.lang.String cachedValueName)
public static TypeSpec createInputsClass(java.util.List<CachedValueGenerator.CachedValueInput> inputParams, java.lang.String cachedValueName, java.util.EnumSet<RunMode> runMode)