public class TestSpecModel extends Object implements SpecModel, HasEnclosedSpecModel
com.facebook.litho.annotations.TestSpec
.Constructor and Description |
---|
TestSpecModel(SpecModel specModel,
TestSpecGenerator generator,
SpecModel enclosedSpecModel) |
TestSpecModel(String qualifiedSpecClassName,
String componentClassName,
ImmutableList<PropModel> props,
ImmutableList<InjectPropModel> injectProps,
ImmutableList<BuilderMethodModel> builderMethodModels,
ImmutableList<PropJavadocModel> propJavadocs,
ImmutableList<TypeVariableName> typeVariables,
SpecModel enclosedSpecModel,
TestSpecGenerator testSpecGenerator,
String classJavadoc,
DependencyInjectionHelper dependencyInjectionHelper) |
public TestSpecModel(String qualifiedSpecClassName, String componentClassName, ImmutableList<PropModel> props, ImmutableList<InjectPropModel> injectProps, ImmutableList<BuilderMethodModel> builderMethodModels, ImmutableList<PropJavadocModel> propJavadocs, ImmutableList<TypeVariableName> typeVariables, SpecModel enclosedSpecModel, TestSpecGenerator testSpecGenerator, String classJavadoc, DependencyInjectionHelper dependencyInjectionHelper)
public TestSpecModel(SpecModel specModel, TestSpecGenerator generator, SpecModel enclosedSpecModel)
public String getSpecName()
getSpecName
in interface SpecModel
public ClassName getSpecTypeName()
getSpecTypeName
in interface SpecModel
TypeName
representing the name of the Spec.public String getComponentName()
getComponentName
in interface SpecModel
public TypeName getComponentTypeName()
getComponentTypeName
in interface SpecModel
TypeName
representing the name of the component that will be generated from
this model.public ImmutableList<FieldModel> getFields()
public ImmutableList<SpecMethodModel<DelegateMethod,Void>> getDelegateMethods()
getDelegateMethods
in interface SpecModel
public ImmutableList<SpecMethodModel<EventMethod,EventDeclarationModel>> getEventMethods()
getEventMethods
in interface SpecModel
public ImmutableList<SpecMethodModel<EventMethod,EventDeclarationModel>> getTriggerMethods()
getTriggerMethods
in interface SpecModel
public SpecMethodModel<EventMethod,Void> getWorkingRangeRegisterMethod()
getWorkingRangeRegisterMethod
in interface SpecModel
public ImmutableList<WorkingRangeMethodModel> getWorkingRangeMethods()
getWorkingRangeMethods
in interface SpecModel
public ImmutableList<SpecMethodModel<UpdateStateMethod,Void>> getUpdateStateMethods()
getUpdateStateMethods
in interface SpecModel
public ImmutableList<SpecMethodModel<UpdateStateMethod,Void>> getUpdateStateWithTransitionMethods()
getUpdateStateWithTransitionMethods
in interface SpecModel
public ImmutableList<PropModel> getRawProps()
getRawProps
in interface SpecModel
public ImmutableList<PropModel> getProps()
public ImmutableList<InjectPropModel> getRawInjectProps()
getRawInjectProps
in interface SpecModel
public ImmutableList<InjectPropModel> getInjectProps()
getInjectProps
in interface SpecModel
public ImmutableList<PropDefaultModel> getPropDefaults()
getPropDefaults
in interface SpecModel
public ImmutableList<TypeVariableName> getTypeVariables()
getTypeVariables
in interface SpecModel
public ImmutableList<StateParamModel> getStateValues()
getStateValues
in interface SpecModel
public ImmutableList<CachedValueParamModel> getCachedValues()
getCachedValues
in interface SpecModel
public ImmutableList<InterStageInputParamModel> getInterStageInputs()
getInterStageInputs
in interface SpecModel
public ImmutableList<TreePropModel> getTreeProps()
getTreeProps
in interface SpecModel
public ImmutableList<EventDeclarationModel> getEventDeclarations()
getEventDeclarations
in interface SpecModel
public ImmutableList<BuilderMethodModel> getExtraBuilderMethods()
getExtraBuilderMethods
in interface SpecModel
public ImmutableList<RenderDataDiffModel> getRenderDataDiffs()
getRenderDataDiffs
in interface SpecModel
public ImmutableList<AnnotationSpec> getClassAnnotations()
getClassAnnotations
in interface SpecModel
public ImmutableList<TagModel> getTags()
public String getClassJavadoc()
getClassJavadoc
in interface SpecModel
public ImmutableList<PropJavadocModel> getPropJavadocs()
getPropJavadocs
in interface SpecModel
public boolean isPublic()
public ClassName getContextClass()
getContextClass
in interface SpecModel
ClassName
of the context that is used in the generated class.public ClassName getComponentClass()
getComponentClass
in interface SpecModel
ClassName
of the component that is used in the generated class.public ClassName getStateContainerClass()
getStateContainerClass
in interface SpecModel
ClassName
of the state container class that is used in the generated class.public ClassName getTransitionClass()
getTransitionClass
in interface SpecModel
ClassName
of the transition that is used in the generated class.public ClassName getTransitionContainerClass()
getTransitionContainerClass
in interface SpecModel
ClassName
of the transition container class that is used in the generated
class.public String getScopeMethodName()
getScopeMethodName
in interface SpecModel
public boolean isStylingSupported()
isStylingSupported
in interface SpecModel
public boolean hasInjectedDependencies()
hasInjectedDependencies
in interface SpecModel
public boolean shouldCheckIdInIsEquivalentToMethod()
shouldCheckIdInIsEquivalentToMethod
in interface SpecModel
public boolean hasDeepCopy()
hasDeepCopy
in interface SpecModel
public boolean shouldGenerateHasState()
shouldGenerateHasState
in interface SpecModel
public boolean shouldGenerateCopyMethod()
shouldGenerateCopyMethod
in interface SpecModel
public DependencyInjectionHelper getDependencyInjectionHelper()
getDependencyInjectionHelper
in interface SpecModel
public SpecElementType getSpecElementType()
getSpecElementType
in interface SpecModel
public Object getRepresentedObject()
getRepresentedObject
in interface SpecModel
public List<SpecModelValidationError> validate(EnumSet<RunMode> runMode)
public SpecModel getEnclosedSpecModel()
HasEnclosedSpecModel
getEnclosedSpecModel
in interface HasEnclosedSpecModel
public boolean shouldGenerateIsEquivalentTo()
shouldGenerateIsEquivalentTo
in interface SpecModel