public static DataType lookupForField(Element variableElement,Messager messager,Types types){
  Element fieldTypeElement=types.asElement(variableElement.asType());
  boolean isTypeElement=false;
  if (fieldTypeElement instanceof TypeElement) {
    isTypeElement=true;
    TypeElement typeElement=(TypeElement)fieldTypeElement;
    TypeMirror superclass=typeElement.getSuperclass();
    if (superclass instanceof DeclaredType) {
      DeclaredType superclassDeclaredType=(DeclaredType)superclass;
      if (JAVA_LANG_ENUM.equals(getCanonicalTypeName(superclassDeclaredType))) {
        return DataType.ENUM_STRING;
      }
    }
  }
  String fieldClassName=findFieldClassname(variableElement);
  DataType dataType=builtInMap.get(fieldClassName);
  if (dataType != null) {
    return dataType;
  }
  throw new RuntimeException("Couldn't find data type for " + fieldClassName + "/"+ variableElement.getKind()+ "/isTypeElement: "+ isTypeElement);
}

public static DataType lookupForField ( Element variableElement , Messager messager , Types types ) { Element fieldTypeElement = types . asElement ( variableElement . asType ( ) ) ; boolean isTypeElement = false ; if ( fieldTypeElement instanceof TypeElement ) { isTypeElement = true ; TypeElement typeElement = ( TypeElement ) fieldTypeElement ; TypeMirror superclass = typeElement . getSuperclass ( ) ; if ( superclass instanceof DeclaredType ) { DeclaredType superclassDeclaredType = ( DeclaredType ) superclass ; if ( JAVA_LANG_ENUM . equals ( getCanonicalTypeName ( superclassDeclaredType ) ) ) { return DataType . ENUM_STRING ; } } } String fieldClassName = findFieldClassname ( variableElement ) ; DataType dataType = builtInMap . get ( fieldClassName ) ; if ( dataType != null ) { return dataType ; } throw new RuntimeException ( "Couldn't find data type for " + fieldClassName + "/" + variableElement . getKind ( ) + "/isTypeElement: " + isTypeElement ) ; }
lookup the data - type associated with the class .
