@@ -0,0 +1,2748 @@
+/*%0A * Copyright (c) Facebook, Inc. and its affiliates.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.facebook.litho.specmodels.processor;%0A%0Aimport static com.facebook.litho.specmodels.processor.PsiMethodExtractorUtils.getMethodParams;%0A%0Aimport com.facebook.litho.annotations.OnBindDynamicValue;%0Aimport com.facebook.litho.annotations.Prop;%0Aimport com.facebook.litho.specmodels.internal.ImmutableList;%0Aimport com.facebook.litho.specmodels.model.BindDynamicValueMethod;%0Aimport com.facebook.litho.specmodels.model.MethodParamModel;%0Aimport com.facebook.litho.specmodels.model.SpecMethodModel;%0Aimport com.intellij.psi.PsiClass;%0Aimport com.intellij.psi.PsiMethod;%0Aimport com.intellij.psi.PsiType;%0Aimport java.lang.annotation.Annotation;%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Apublic class PsiBindDynamicValuesMethodExtractor %7B%0A  public static ImmutableList%3CSpecMethodModel%3CBindDynamicValueMethod, Void%3E%3E%0A      getOnBindDynamicValuesMethods(PsiClass psiClass) %7B%0A    final List%3CSpecMethodModel%3CBindDynamicValueMethod, Void%3E%3E methods = new ArrayList%3C%3E();%0A    for (PsiMethod psiMethod : psiClass.getAllMethods()) %7B%0A      final Annotation annotation =%0A          PsiAnnotationProxyUtils.findAnnotationInHierarchy(psiMethod, OnBindDynamicValue.class);%0A      if (annotation == null) %7B%0A        continue;%0A      %7D%0A      final List%3CMethodParamModel%3E methodParams =%0A          getMethodParams(%0A              psiMethod,%0A              Collections.singletonList(Prop.class),%0A              ImmutableList.of(),%0A              ImmutableList.of());%0A      final PsiType returnType = psiMethod.getReturnType();%0A      if (returnType == null) %7B%0A        continue;%0A      %7D%0A%0A      final SpecMethodModel%3CBindDynamicValueMethod, Void%3E methodModel =%0A          new SpecMethodModel%3C%3E(%0A              ImmutableList.of(annotation),%0A              PsiModifierExtractor.extractModifiers(psiMethod.getModifierList()),%0A              psiMethod.getName(),%0A              PsiTypeUtils.generateTypeSpec(returnType),%0A              ImmutableList.of(),%0A              ImmutableList.copyOf(methodParams),%0A              psiMethod,%0A              null);%0A      methods.add(methodModel);%0A    %7D%0A    return ImmutableList.copyOf(methods);%0A  %7D%0A%7D%0A

Create PsiBindDynamicValuesMethodExtractor