public class CachedValueGenerator extends 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,Void> onCalculateCachedValueMethod,
List<CachedValueGenerator.CachedValueInput> inputParams,
String cachedValueName) |
static TypeSpec |
createInputsClass(List<CachedValueGenerator.CachedValueInput> inputParams,
String cachedValueName,
EnumSet<RunMode> runMode) |
static TypeSpecDataHolder |
generate(SpecModel specModel,
EnumSet<RunMode> runMode) |
static List<CachedValueGenerator.CachedValueInput> |
getCachedValueInputs(SpecMethodModel<DelegateMethod,Void> onCalculateCachedValueMethod) |
public static TypeSpecDataHolder generate(SpecModel specModel, EnumSet<RunMode> runMode)
public static List<CachedValueGenerator.CachedValueInput> getCachedValueInputs(SpecMethodModel<DelegateMethod,Void> onCalculateCachedValueMethod)
public static MethodSpec createGetterMethod(SpecModel specModel, SpecMethodModel<DelegateMethod,Void> onCalculateCachedValueMethod, List<CachedValueGenerator.CachedValueInput> inputParams, String cachedValueName)
public static TypeSpec createInputsClass(List<CachedValueGenerator.CachedValueInput> inputParams, String cachedValueName, EnumSet<RunMode> runMode)