// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/AnnotationUtils.java
// public static DetailAST getAnnotation(DetailAST ast, String fullAnnotation) {
//   DetailAST simpleAnnotationAst =
//       AnnotationUtil.getAnnotation(ast, CommonUtils.getSimpleName(fullAnnotation));
//   return nonNull(simpleAnnotationAst) ? simpleAnnotationAst
//       : AnnotationUtil.getAnnotation(ast, fullAnnotation);
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/AnnotationUtils.java
// public static Boolean hasAnnotation(DetailAST ast, String fullAnnotation) {
//   return CommonUtils.getSimpleAndFullNames(fullAnnotation).stream()
//                     .anyMatch(annotation -> AnnotationUtil.containsAnnotation(ast, annotation));
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/ClassUtils.java
// public static Boolean isEntity(DetailAST classAst, String fullEntityAnnotation) {
//   return AnnotationUtils.hasAnnotation(classAst, fullEntityAnnotation);
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/CommonUtils.java
// public static String getSimpleName(String fullName) {
//   String[] packageNames = fullName.split("\\.");
//   return packageNames[packageNames.length - 1];
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/VariableUtils.java
// public static Map<String, DetailAST> getVariableNameAstMap(DetailAST classAst) {
//   List<DetailAST> variables = getVariables(classAst);
//   return variables.stream().collect(toMap(VariableUtils::getVariableName,
//                                           Function.identity(), (v1, v2) -> null,
//                                           LinkedHashMap::new));
// }


import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import static es.startuphero.checkstyle.util.AnnotationUtils.getAnnotation;
import static es.startuphero.checkstyle.util.AnnotationUtils.hasAnnotation;
import static es.startuphero.checkstyle.util.ClassUtils.isEntity;
import static es.startuphero.checkstyle.util.CommonUtils.getSimpleName;
import static es.startuphero.checkstyle.util.VariableUtils.getVariableNameAstMap;
    // assign value and annotation value not exists.
    if (assignAst == null && annotationAst == null) {
      return;
    }
    // assign value exists but annotation value not exists.
    if (annotationAst == null) {
      log(variableAst.getLineNo(), NOT_MATCHING_MSG_KEY, variable, getAssignValue(assignAst), null);
      return;
    }
    // annotation value param not allowed.
    DetailAST annotationExpressionAst = annotationAst.findFirstToken(TokenTypes.EXPR);
    if (annotationExpressionAst == null) {
      log(variableAst.getLineNo(), ANNOTATION_DIRECT_EXPRESSION_MSG_KEY, variable);
      return;
    }
    // skip assign value check if annotation value excluded.
    if (isExcludedVariable(getAnnotationValue(annotationAst, true))) {
      return;
    }
    // annotation value exists but assign value not exists.
    if (assignAst == null) {
      log(variableAst.getLineNo(), NOT_MATCHING_MSG_KEY, variable, null,
          getAnnotationValue(annotationAst, true));
      return;
    }
    // require single quote on string, char, enum variables
    if (requireSingleQuoteOnAnnotationValue(assignAst) &&
        !(getAnnotationValue(annotationAst, false).startsWith(SINGLE_QUOTE) &&
          getAnnotationValue(annotationAst, false).endsWith(SINGLE_QUOTE))) {
      log(variableAst.getLineNo(), ANNOTATION_VALUE_REQUIRE_SINGLE_QUOTE_MSG_KEY,
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/AnnotationUtils.java
// public static DetailAST getAnnotation(DetailAST ast, String fullAnnotation) {
//   DetailAST simpleAnnotationAst =
//       AnnotationUtil.getAnnotation(ast, CommonUtils.getSimpleName(fullAnnotation));
//   return nonNull(simpleAnnotationAst) ? simpleAnnotationAst
//       : AnnotationUtil.getAnnotation(ast, fullAnnotation);
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/AnnotationUtils.java
// public static Boolean hasAnnotation(DetailAST ast, String fullAnnotation) {
//   return CommonUtils.getSimpleAndFullNames(fullAnnotation).stream()
//                     .anyMatch(annotation -> AnnotationUtil.containsAnnotation(ast, annotation));
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/ClassUtils.java
// public static Boolean isEntity(DetailAST classAst, String fullEntityAnnotation) {
//   return AnnotationUtils.hasAnnotation(classAst, fullEntityAnnotation);
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/CommonUtils.java
// public static String getSimpleName(String fullName) {
//   String[] packageNames = fullName.split("\\.");
//   return packageNames[packageNames.length - 1];
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/VariableUtils.java
// public static Map<String, DetailAST> getVariableNameAstMap(DetailAST classAst) {
//   List<DetailAST> variables = getVariables(classAst);
//   return variables.stream().collect(toMap(VariableUtils::getVariableName,
//                                           Function.identity(), (v1, v2) -> null,
//                                           LinkedHashMap::new));
// }


// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/checks/annotation/ColumnDefaultCheck.java
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import static es.startuphero.checkstyle.util.AnnotationUtils.getAnnotation;
import static es.startuphero.checkstyle.util.AnnotationUtils.hasAnnotation;
import static es.startuphero.checkstyle.util.ClassUtils.isEntity;
import static es.startuphero.checkstyle.util.CommonUtils.getSimpleName;
import static es.startuphero.checkstyle.util.VariableUtils.getVariableNameAstMap;

    // assign value and annotation value not exists.
    if (assignAst == null && annotationAst == null) {
      return;
    }
    // assign value exists but annotation value not exists.
    if (annotationAst == null) {
      log(variableAst.getLineNo(), NOT_MATCHING_MSG_KEY, variable, getAssignValue(assignAst), null);
      return;
    }
    // annotation value param not allowed.
    DetailAST annotationExpressionAst = annotationAst.findFirstToken(TokenTypes.EXPR);
    if (annotationExpressionAst == null) {
      log(variableAst.getLineNo(), ANNOTATION_DIRECT_EXPRESSION_MSG_KEY, variable);
      return;
    }
    // skip assign value check if annotation value excluded.
    if (isExcludedVariable(getAnnotationValue(annotationAst, true))) {
      return;
    }
    // annotation value exists but assign value not exists.
    if (assignAst == null) {
      log(variableAst.getLineNo(), NOT_MATCHING_MSG_KEY, variable, null,
          getAnnotationValue(annotationAst, true));
      return;
    }
    // require single quote on string, char, enum variables
    if (requireSingleQuoteOnAnnotationValue(assignAst) &&
        !(getAnnotationValue(annotationAst, false).startsWith(SINGLE_QUOTE) &&
          getAnnotationValue(annotationAst, false).endsWith(SINGLE_QUOTE))) {
      log(variableAst.getLineNo(), ANNOTATION_VALUE_REQUIRE_SINGLE_QUOTE_MSG_KEY,
          getSimpleName(columnDefaultAnnotation),