public class DelegateMethodGenerator
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static TypeSpecDataHolder |
generateDelegates(SpecModel specModel,
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,DelegateMethodDescription> delegateMethodsMap,
java.util.EnumSet<RunMode> runMode)
Generate all delegates defined on this
SpecModel . |
static CodeBlock |
getDelegationCode(SpecModel specModel,
SpecMethodModel<DelegateMethod,java.lang.Void> delegateMethod,
DelegateMethodDescription methodDescription,
java.lang.String contextParamName,
java.lang.String interStagePropsParamName,
java.util.EnumSet<RunMode> runMode) |
static boolean |
isOutputType(TypeName type) |
static boolean |
shouldIncludeOptionalParameter(MethodParamModel methodParamModel,
MethodParamModel extraOptionalParameter)
We consider an optional parameter as something that comes immediately after the allowed
parameters and are not a special litho parameter (like a prop, state, etc...).
|
public static TypeSpecDataHolder generateDelegates(SpecModel specModel, java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,DelegateMethodDescription> delegateMethodsMap, java.util.EnumSet<RunMode> runMode)
SpecModel
.public static CodeBlock getDelegationCode(SpecModel specModel, SpecMethodModel<DelegateMethod,java.lang.Void> delegateMethod, DelegateMethodDescription methodDescription, java.lang.String contextParamName, java.lang.String interStagePropsParamName, java.util.EnumSet<RunMode> runMode)
public static boolean shouldIncludeOptionalParameter(MethodParamModel methodParamModel, MethodParamModel extraOptionalParameter)
public static boolean isOutputType(TypeName type)