in litho-processor/src/main/java/com/facebook/litho/specmodels/model/SpecModelImpl.java [84:209]
private SpecModelImpl(
String qualifiedSpecClassName,
String componentClassName,
ClassName componentClass,
ClassName contextClassName,
ImmutableList<SpecMethodModel<DelegateMethod, Void>> delegateMethods,
ImmutableList<SpecMethodModel<EventMethod, EventDeclarationModel>> eventMethods,
ImmutableList<SpecMethodModel<EventMethod, EventDeclarationModel>> triggerMethods,
@Nullable SpecMethodModel<EventMethod, Void> workingRangeRegisterMethod,
ImmutableList<WorkingRangeMethodModel> workingRangeMethods,
ImmutableList<SpecMethodModel<UpdateStateMethod, Void>> updateStateMethods,
ImmutableList<SpecMethodModel<UpdateStateMethod, Void>> updateStateWithTransitionMethods,
ImmutableList<PropModel> props,
ImmutableList<InjectPropModel> injectProps,
ImmutableList<String> cachedPropNames,
ImmutableList<TypeVariableName> typeVariables,
ImmutableList<PropDefaultModel> propDefaults,
ImmutableList<EventDeclarationModel> eventDeclarations,
ImmutableList<BuilderMethodModel> implicitBuilderMethods,
ImmutableList<AnnotationSpec> classAnnotations,
ImmutableList<TagModel> tags,
ImmutableList<FieldModel> fields,
ImmutableList<SpecMethodModel<BindDynamicValueMethod, Void>> bindDynamicValueMethods,
String classJavadoc,
ImmutableList<PropJavadocModel> propJavadocs,
boolean isPublic,
@Nullable DependencyInjectionHelper dependencyInjectionHelper,
SpecElementType specElementType,
Object representedObject) {
mSpecName = getSpecName(qualifiedSpecClassName);
mSpecTypeName = ClassName.bestGuess(qualifiedSpecClassName);
mComponentClass = componentClass;
mContextClassName = contextClassName;
mComponentName = getComponentName(componentClassName, qualifiedSpecClassName);
mComponentTypeName = getComponentTypeName(componentClassName, qualifiedSpecClassName);
mDelegateMethods = delegateMethods;
mEventMethods = getCombinedEventMethods(delegateMethods, eventMethods);
mTriggerMethods = triggerMethods;
mWorkingRangeRegisterMethod = workingRangeRegisterMethod;
mWorkingRangeMethods = workingRangeMethods;
mUpdateStateMethods = updateStateMethods;
mUpdateStateWithTransitionMethods = updateStateWithTransitionMethods;
ImmutableList<PropModel> rawPropsWithoutDiffProps =
getRawPropsWithoutDiffProps(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods,
bindDynamicValueMethods);
mRawProps = getRawProps(rawPropsWithoutDiffProps, delegateMethods);
mProps =
props.isEmpty()
? getProps(rawPropsWithoutDiffProps, cachedPropNames, delegateMethods)
: props;
mRawInjectProps =
getRawInjectProps(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods);
mInjectProps =
injectProps.isEmpty()
? getInjectProps(mRawInjectProps, cachedPropNames, mRawProps.size())
: injectProps;
mPropDefaults = propDefaults;
mTypeVariables = typeVariables;
mStateValues =
getStateValues(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods);
mCachedValues =
getCachedValues(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods);
mInterStageInputs =
getInterStageInputs(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods);
mPrepareInterStageInputs =
getLayoutInterStageInputs(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods);
mTreeProps =
getTreeProps(
delegateMethods,
eventMethods,
triggerMethods,
workingRangeRegisterMethod,
workingRangeMethods,
updateStateMethods);
mEventDeclarations = eventDeclarations;
mImplicitBuilderMethods = implicitBuilderMethods;
mDiffs = getDiffs(delegateMethods);
mClassAnnotations = classAnnotations;
mTags = tags;
mFields = fields;
mBindDynamicValueMethods = bindDynamicValueMethods;
mClassJavadoc = classJavadoc;
mPropJavadocs = propJavadocs;
mIsPublic = isPublic;
mHasInjectedDependencies = dependencyInjectionHelper != null;
mDependencyInjectionHelper = dependencyInjectionHelper;
mSpecElementType = specElementType;
mRepresentedObject = representedObject;
}