Package de.plushnikov.intellij.lombok.psi

Examples of de.plushnikov.intellij.lombok.psi.LombokLightMethodBuilder.withModifier()


  protected void processIntern(@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull List<? super PsiElement> target) {
    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiClass.getManager(), METHOD_NAME)
        .withMethodReturnType(PsiTypesUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withNavigationElement(psiAnnotation);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add(method);
  }
}
View Full Code Here


    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiClass.getManager(), METHOD_NAME)
        .withMethodReturnType(PsiTypesUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withNavigationElement(psiAnnotation);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add(method);
  }
}
View Full Code Here

  protected <Psi extends PsiElement> void processIntern(@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull List<Psi> target) {
    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiClass.getManager(), METHOD_NAME)
        .withMethodReturnType(PsiClassUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withNavigationElement(psiAnnotation);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add((Psi) method);
  }
}
View Full Code Here

    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiClass.getManager(), METHOD_NAME)
        .withMethodReturnType(PsiClassUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withNavigationElement(psiAnnotation);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add((Psi) method);
  }
}
View Full Code Here

    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiField.getManager(), methodName)
        .withMethodReturnType(psiReturnType)
        .withContainingClass(psiClass)
        .withNavigationElement(psiField);
    if (StringUtil.isNotEmpty(methodModifier)) {
      method.withModifier(methodModifier);
    }
    if (psiField.hasModifierProperty(PsiModifier.STATIC)) {
      method.withModifier(PsiModifier.STATIC);
    }
View Full Code Here

        .withNavigationElement(psiField);
    if (StringUtil.isNotEmpty(methodModifier)) {
      method.withModifier(methodModifier);
    }
    if (psiField.hasModifierProperty(PsiModifier.STATIC)) {
      method.withModifier(PsiModifier.STATIC);
    }

    PsiModifierList methodParameterModifierList = method.getModifierList();
    final Collection<String> annotationsToCopy = PsiAnnotationUtil.collectAnnotationsToCopy(psiField,
        LombokUtils.NON_NULL_PATTERN, LombokUtils.NULLABLE_PATTERN);
View Full Code Here

    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiField.getManager(), methodName)
        .withMethodReturnType(PsiClassUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withParameter(fieldName, psiFieldType)
        .withNavigationElement(psiField);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add((Psi)method);
  }
View Full Code Here

        .withMethodReturnType(PsiClassUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withParameter(fieldName, psiFieldType)
        .withNavigationElement(psiField);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add((Psi)method);
  }

  protected String getFindByName(PsiField psiField) {
View Full Code Here

  protected <Psi extends PsiElement> void processIntern(@NotNull PsiClass psiClass, @NotNull PsiAnnotation psiAnnotation, @NotNull List<Psi> target) {
    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiClass.getManager(), METHOD_NAME)
        .withMethodReturnType(PsiClassUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withNavigationElement(psiAnnotation);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add((Psi) method);
  }
}
View Full Code Here

    LombokLightMethodBuilder method = LombokPsiElementFactory.getInstance().createLightMethod(psiClass.getManager(), METHOD_NAME)
        .withMethodReturnType(PsiClassUtil.getClassType(psiClass))
        .withContainingClass(psiClass)
        .withNavigationElement(psiAnnotation);
    method.withModifier(PsiModifier.STATIC);
    method.withModifier(PsiModifier.PUBLIC);

    target.add((Psi) method);
  }
}
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.