Examples of LombokPsiElementFactory


Examples of de.plushnikov.intellij.lombok.psi.LombokPsiElementFactory

  private PsiMethod createImplementingMethod(CandidateInfo candidateInfo, PsiClass psiClass, PsiAnnotation psiAnnotation) {
    final PsiMethod methodToImplement = (PsiMethod) candidateInfo.getElement();
    final PsiSubstitutor substitutor = candidateInfo.getSubstitutor();
    if (null != methodToImplement && null != substitutor) {
      final LombokPsiElementFactory lombokPsiElementFactory = LombokPsiElementFactory.getInstance();
      final String methodName = methodToImplement.getName();
      LombokLightMethodBuilder method = lombokPsiElementFactory.createLightMethod(psiClass.getManager(), methodName)
          .withMethodReturnType(substitutor.substitute(methodToImplement.getReturnType()))
          .withContainingClass(psiClass)
          .withNavigationElement(psiAnnotation);
      addModifier(methodToImplement, method, PsiModifier.PUBLIC);
      addModifier(methodToImplement, method, PsiModifier.PACKAGE_LOCAL);
View Full Code Here

Examples of de.plushnikov.intellij.lombok.psi.LombokPsiElementFactory

  private <Psi extends PsiElement> PsiMethod createImplementingMethod(CandidateInfo candidateInfo, PsiClass psiClass, PsiAnnotation psiAnnotation) {
    final PsiMethod methodToImplement = (PsiMethod) candidateInfo.getElement();
    final PsiSubstitutor substitutor = candidateInfo.getSubstitutor();
    if (null != methodToImplement && null != substitutor) {
      final LombokPsiElementFactory lombokPsiElementFactory = LombokPsiElementFactory.getInstance();
      final String methodName = methodToImplement.getName();
      LombokLightMethodBuilder method = lombokPsiElementFactory.createLightMethod(psiClass.getManager(), methodName)
          .withMethodReturnType(substitutor.substitute(methodToImplement.getReturnType()))
          .withContainingClass(psiClass)
          .withNavigationElement(psiAnnotation);
      addModifier(methodToImplement, method, PsiModifier.PUBLIC);
      addModifier(methodToImplement, method, PsiModifier.PACKAGE_LOCAL);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.