Examples of RequiredArgsConstructorProcessor


Examples of de.plushnikov.intellij.lombok.processor.clazz.constructor.RequiredArgsConstructorProcessor

    // create required constructor only if there are no other constructor annotations
    if (PsiAnnotationUtil.isNotAnnotatedWith(psiClass, NoArgsConstructor.class, RequiredArgsConstructor.class, AllArgsConstructor.class)) {
      final PsiMethod[] definedConstructors = PsiClassUtil.collectClassConstructorIntern(psiClass);
      // and only if there are no any other constructors!
      if (0 == definedConstructors.length) {
        final RequiredArgsConstructorProcessor requiredArgsConstructorProcessor = new RequiredArgsConstructorProcessor();

        final String staticName = PsiAnnotationUtil.getAnnotationValue(psiAnnotation, "staticConstructor", String.class);
        final Collection<PsiField> requiredFields = requiredArgsConstructorProcessor.getRequiredFields(psiClass);

        if (requiredArgsConstructorProcessor.validateIsConstructorDefined(psiClass, staticName, requiredFields, ProblemEmptyBuilder.getInstance())) {
          target.addAll((Collection<? extends Psi>) requiredArgsConstructorProcessor.createRequiredArgsConstructor(
              psiClass, PsiModifier.PUBLIC, psiAnnotation, staticName));
        }
      }
    }
  }
View Full Code Here

Examples of de.plushnikov.intellij.lombok.processor.clazz.constructor.RequiredArgsConstructorProcessor

    }
    if (PsiAnnotationUtil.isNotAnnotatedWith(psiClass, ToString.class)) {
      target.addAll((Collection<? extends Psi>) new ToStringProcessor().createToStringMethod(psiClass, psiAnnotation));
    }
    if (PsiAnnotationUtil.isNotAnnotatedWith(psiClass, RequiredArgsConstructor.class)) {
      target.addAll((Collection<? extends Psi>) new RequiredArgsConstructorProcessor().createRequiredArgsConstructor(psiClass, PsiModifier.PUBLIC, psiAnnotation));
    }
  }
View Full Code Here

Examples of de.plushnikov.intellij.lombok.processor.clazz.constructor.RequiredArgsConstructorProcessor

    // create required constructor only if there are no other constructor annotations
    if (PsiAnnotationUtil.isNotAnnotatedWith(psiClass, NoArgsConstructor.class, RequiredArgsConstructor.class, AllArgsConstructor.class)) {
      final Collection<PsiMethod> definedConstructors = PsiClassUtil.collectClassConstructorIntern(psiClass);
      // and only if there are no any other constructors!
      if (definedConstructors.isEmpty()) {
        final RequiredArgsConstructorProcessor requiredArgsConstructorProcessor = new RequiredArgsConstructorProcessor();

        final String staticName = PsiAnnotationUtil.getAnnotationValue(psiAnnotation, "staticConstructor", String.class);
        final Collection<PsiField> requiredFields = requiredArgsConstructorProcessor.getRequiredFields(psiClass);

        if (requiredArgsConstructorProcessor.validateIsConstructorDefined(psiClass, staticName, requiredFields, ProblemEmptyBuilder.getInstance())) {
          target.addAll(requiredArgsConstructorProcessor.createRequiredArgsConstructor(
              psiClass, PsiModifier.PUBLIC, psiAnnotation, staticName));
        }
      }
    }
  }
View Full Code Here

Examples of de.plushnikov.intellij.lombok.processor.clazz.constructor.RequiredArgsConstructorProcessor

    // create required constructor only if there are no other constructor annotations
    if (PsiAnnotationUtil.isNotAnnotatedWith(psiClass, NoArgsConstructor.class, RequiredArgsConstructor.class, AllArgsConstructor.class)) {
      final PsiMethod[] definedConstructors = PsiClassUtil.collectClassConstructorIntern(psiClass);
      // and only if there are no any other constructors!
      if (0 == definedConstructors.length) {
        final RequiredArgsConstructorProcessor requiredArgsConstructorProcessor = new RequiredArgsConstructorProcessor();

        final String staticName = PsiAnnotationUtil.getAnnotationValue(psiAnnotation, "staticConstructor", String.class);
        final Collection<PsiField> requiredFields = requiredArgsConstructorProcessor.getRequiredFields(psiClass);

        if (requiredArgsConstructorProcessor.validateIsConstructorDefined(psiClass, staticName, requiredFields, ProblemEmptyBuilder.getInstance())) {
          target.addAll((Collection<? extends Psi>) requiredArgsConstructorProcessor.createRequiredArgsConstructor(
              psiClass, PsiModifier.PUBLIC, psiAnnotation, staticName));
        }
      }
    }
  }
View Full Code Here

Examples of de.plushnikov.intellij.plugin.processor.clazz.constructor.RequiredArgsConstructorProcessor

      final Collection<PsiMethod> definedConstructors = PsiClassUtil.collectClassConstructorIntern(psiClass);
      filterToleratedElements(definedConstructors);

      // and only if there are no any other constructors!
      if (definedConstructors.isEmpty()) {
        final RequiredArgsConstructorProcessor requiredArgsConstructorProcessor = new RequiredArgsConstructorProcessor();

        final String staticName = PsiAnnotationUtil.getAnnotationValue(psiAnnotation, "staticConstructor", String.class);
        final Collection<PsiField> requiredFields = requiredArgsConstructorProcessor.getRequiredFields(psiClass);

        if (requiredArgsConstructorProcessor.validateIsConstructorDefined(psiClass, staticName, requiredFields, ProblemEmptyBuilder.getInstance())) {
          target.addAll(requiredArgsConstructorProcessor.createRequiredArgsConstructor(
              psiClass, PsiModifier.PUBLIC, psiAnnotation, staticName));
        }
      }
    }
  }
View Full Code Here

Examples of de.plushnikov.intellij.plugin.processor.clazz.constructor.RequiredArgsConstructorProcessor

import de.plushnikov.intellij.plugin.processor.clazz.constructor.RequiredArgsConstructorProcessor;

public class DelombokConstructorAction extends BaseDelombokAction {

  public DelombokConstructorAction() {
    super(new BaseDelombokHandler(new AllArgsConstructorProcessor(), new NoArgsConstructorProcessor(), new RequiredArgsConstructorProcessor()));
  }
View Full Code Here

Examples of de.plushnikov.intellij.plugin.processor.clazz.constructor.RequiredArgsConstructorProcessor

    super(createHandler());
  }

  private static BaseDelombokHandler createHandler() {
    return new BaseDelombokHandler(
        new RequiredArgsConstructorProcessor(), new AllArgsConstructorProcessor(), new NoArgsConstructorProcessor(),
        new DataProcessor(), new GetterProcessor(), new ValueProcessor(), new WitherProcessor(),
        new SetterProcessor(), new EqualsAndHashCodeProcessor(), new ToStringProcessor(),
        new CommonsLogProcessor(), new Log4jProcessor(), new Log4j2Processor(), new LogProcessor(), new Slf4jProcessor(), new XSlf4jProcessor(),
        new GetterFieldProcessor(), new SetterFieldProcessor(), new WitherFieldProcessor(), new DelegateFieldProcessor(),
        new DelegateMethodProcessor()
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.