// 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 Map<String, DetailAST> getKeyValueAstMap(DetailAST annotationAst) {
//   List<DetailAST> keyValuePairAstList =
//       CommonUtils.getChildsByType(annotationAst, TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
//   return keyValuePairAstList.stream()
//                             .collect(Collectors.toMap(keyValuePairAst -> keyValuePairAst.getFirstChild().getText(),
//                                                       Function.identity(), (v1, v2) -> null,
//                                                       LinkedHashMap::new));
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/AnnotationUtils.java
// public static Optional<String> getValueAsString(DetailAST annotationKeyValueAst) {
//   Optional<String> result = Optional.empty();
//   DetailAST annotationValueNode = getAnnotationValueNode(annotationKeyValueAst);
//   DetailAST literalValueAst = annotationValueNode.getFirstChild();
//   if (nonNull(literalValueAst)) {
//     result = Optional.of(literalValueAst.getText().replaceAll("\"", ""));
//   }
//   return result;
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/ClassUtils.java
// public static String getClassName(DetailAST classAst) {
//   DetailAST type = classAst.findFirstToken(TokenTypes.LITERAL_CLASS);
//   return type.getNextSibling().getText();
// }
// 
// 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/VariableUtils.java
// public static List<DetailAST> getNonStaticVariables(DetailAST classAst) {
//   DetailAST objBlock = classAst.findFirstToken(TokenTypes.OBJBLOCK);
//   return CommonUtils.getChildsByType(objBlock, TokenTypes.VARIABLE_DEF).stream()
//                     .filter(ast -> !CommonUtils.isStatic(ast))
//                     .collect(toList());
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/VariableUtils.java
// public static String getVariableName(DetailAST variableAst) {
//   DetailAST type = variableAst.findFirstToken(TokenTypes.TYPE);
//   return type.getNextSibling().getText();
// }


import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.utils.CommonUtil;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
import static es.startuphero.checkstyle.util.AnnotationUtils.getAnnotation;
import static es.startuphero.checkstyle.util.AnnotationUtils.getKeyValueAstMap;
import static es.startuphero.checkstyle.util.AnnotationUtils.getValueAsString;
import static es.startuphero.checkstyle.util.ClassUtils.getClassName;
import static es.startuphero.checkstyle.util.ClassUtils.isEntity;
import static es.startuphero.checkstyle.util.VariableUtils.getNonStaticVariables;
import static es.startuphero.checkstyle.util.VariableUtils.getVariableName;
import static java.util.Objects.nonNull;
            log(variableNode.getLineNo(), MSG_KEY, getVariableName(variableNode), limitLength);
          }
        }
      }
    }
  }

  public void setTypeAnnotation(String typeAnnotation) {
    this.typeAnnotation = typeAnnotation;
  }

  public void setAbstractTypeAnnotation(String abstractTypeAnnotation) {
    this.abstractTypeAnnotation = abstractTypeAnnotation;
  }

  public void setColumnAnnotation(String columnAnnotation) {
    this.columnAnnotation = columnAnnotation;
  }

  public void setLimitLength(Integer limitLength) {
    this.limitLength = limitLength;
  }

  /**
   * Set the format to the specified regular expression.
   *
   * @param format a {@code String} value
   */
  public void setClassNameFormat(String format) {
    this.classNameFormat = format;
// 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 Map<String, DetailAST> getKeyValueAstMap(DetailAST annotationAst) {
//   List<DetailAST> keyValuePairAstList =
//       CommonUtils.getChildsByType(annotationAst, TokenTypes.ANNOTATION_MEMBER_VALUE_PAIR);
//   return keyValuePairAstList.stream()
//                             .collect(Collectors.toMap(keyValuePairAst -> keyValuePairAst.getFirstChild().getText(),
//                                                       Function.identity(), (v1, v2) -> null,
//                                                       LinkedHashMap::new));
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/AnnotationUtils.java
// public static Optional<String> getValueAsString(DetailAST annotationKeyValueAst) {
//   Optional<String> result = Optional.empty();
//   DetailAST annotationValueNode = getAnnotationValueNode(annotationKeyValueAst);
//   DetailAST literalValueAst = annotationValueNode.getFirstChild();
//   if (nonNull(literalValueAst)) {
//     result = Optional.of(literalValueAst.getText().replaceAll("\"", ""));
//   }
//   return result;
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/ClassUtils.java
// public static String getClassName(DetailAST classAst) {
//   DetailAST type = classAst.findFirstToken(TokenTypes.LITERAL_CLASS);
//   return type.getNextSibling().getText();
// }
// 
// 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/VariableUtils.java
// public static List<DetailAST> getNonStaticVariables(DetailAST classAst) {
//   DetailAST objBlock = classAst.findFirstToken(TokenTypes.OBJBLOCK);
//   return CommonUtils.getChildsByType(objBlock, TokenTypes.VARIABLE_DEF).stream()
//                     .filter(ast -> !CommonUtils.isStatic(ast))
//                     .collect(toList());
// }
// 
// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/util/VariableUtils.java
// public static String getVariableName(DetailAST variableAst) {
//   DetailAST type = variableAst.findFirstToken(TokenTypes.TYPE);
//   return type.getNextSibling().getText();
// }


// Path: startupheroes-checks/src/main/java/es/startuphero/checkstyle/checks/design/LogDataTableCheck.java
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.utils.CommonUtil;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
import static es.startuphero.checkstyle.util.AnnotationUtils.getAnnotation;
import static es.startuphero.checkstyle.util.AnnotationUtils.getKeyValueAstMap;
import static es.startuphero.checkstyle.util.AnnotationUtils.getValueAsString;
import static es.startuphero.checkstyle.util.ClassUtils.getClassName;
import static es.startuphero.checkstyle.util.ClassUtils.isEntity;
import static es.startuphero.checkstyle.util.VariableUtils.getNonStaticVariables;
import static es.startuphero.checkstyle.util.VariableUtils.getVariableName;
import static java.util.Objects.nonNull;

            log(variableNode.getLineNo(), MSG_KEY, getVariableName(variableNode), limitLength);
          }
        }
      }
    }
  }

  public void setTypeAnnotation(String typeAnnotation) {
    this.typeAnnotation = typeAnnotation;
  }

  public void setAbstractTypeAnnotation(String abstractTypeAnnotation) {
    this.abstractTypeAnnotation = abstractTypeAnnotation;
  }

  public void setColumnAnnotation(String columnAnnotation) {
    this.columnAnnotation = columnAnnotation;
  }

  public void setLimitLength(Integer limitLength) {
    this.limitLength = limitLength;
  }

  /**
   * Set the format to the specified regular expression.
   *
   * @param format a {@code String} value
   */
  public void setClassNameFormat(String format) {
    this.classNameFormat = format;
    regexp = CommonUtil.createPattern(format);