public class SpecModelUtils
extends java.lang.Object
SpecModel
s.Constructor and Description |
---|
SpecModelUtils() |
Modifier and Type | Method and Description |
---|---|
static TypeSpec |
generateTypeSpec(javax.lang.model.type.TypeMirror type)
This method will "expand" the typeArguments of the given type, only if the type is a
ClassNames.DIFF or a Collection . |
static SpecMethodModel<BindDynamicValueMethod,java.lang.Void> |
getBindDelegateMethodForDynamicProp(SpecModel specModel,
PropModel prop) |
static java.util.List<PropModel> |
getDynamicProps(SpecModel specModel) |
static java.util.List<SpecMethodModel<DelegateMethod,java.lang.Void>> |
getMethodModelsWithAnnotation(SpecModel specModel,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) |
static SpecMethodModel<DelegateMethod,java.lang.Void> |
getMethodModelWithAnnotation(SpecModel specModel,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) |
static PropModel |
getPropWithName(SpecModel specModel,
java.lang.String name) |
static MethodParamModel |
getReferencedParamModelForDiff(SpecModel specModel,
RenderDataDiffModel diffModel) |
static java.lang.String |
getSpecAccessor(SpecModel specModel) |
static StateParamModel |
getStateValueWithName(SpecModel specModel,
java.lang.String name) |
static boolean |
hasAnnotation(MethodParamModel methodParam,
java.lang.Class<?> annotationClass) |
static boolean |
hasAnnotation(SpecMethodModel<?,?> method,
java.lang.Class<?> annotationClass) |
static boolean |
hasLazyState(SpecModel specModel) |
static boolean |
isPropOutput(SpecModel specModel,
MethodParamModel methodParamModel) |
static boolean |
isStateOutput(SpecModel specModel,
MethodParamModel methodParamModel) |
static boolean |
isStateValue(SpecModel specModel,
MethodParamModel methodParamModel) |
static boolean |
isTypeElement(SpecModel specModel) |
public static java.lang.String getSpecAccessor(SpecModel specModel)
public static StateParamModel getStateValueWithName(SpecModel specModel, java.lang.String name)
public static SpecMethodModel<DelegateMethod,java.lang.Void> getMethodModelWithAnnotation(SpecModel specModel, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
public static java.util.List<SpecMethodModel<DelegateMethod,java.lang.Void>> getMethodModelsWithAnnotation(SpecModel specModel, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
public static boolean isPropOutput(SpecModel specModel, MethodParamModel methodParamModel)
public static boolean isStateOutput(SpecModel specModel, MethodParamModel methodParamModel)
public static boolean isStateValue(SpecModel specModel, MethodParamModel methodParamModel)
public static MethodParamModel getReferencedParamModelForDiff(SpecModel specModel, RenderDataDiffModel diffModel)
public static boolean hasAnnotation(SpecMethodModel<?,?> method, java.lang.Class<?> annotationClass)
public static boolean hasAnnotation(MethodParamModel methodParam, java.lang.Class<?> annotationClass)
public static boolean hasLazyState(SpecModel specModel)
public static TypeSpec generateTypeSpec(javax.lang.model.type.TypeMirror type)
ClassNames.DIFF
or a Collection
. Otherwise the typeArguments won't be
traversed and recorded.public static boolean isTypeElement(SpecModel specModel)
public static SpecMethodModel<BindDynamicValueMethod,java.lang.Void> getBindDelegateMethodForDynamicProp(SpecModel specModel, PropModel prop)