code: private static String getEnumAnnotationFieldName(IAnnotationBinding annotation, String varName) {
          if (annotation == null) {
              throw new NullPointerException();
          }
          if (varName == null) {
              throw new NullPointerException();
          }
          for (IMemberValuePairBinding value : annotation.getDeclaredMemberValuePairs()) {
              if (value.getName() != null && value.getName().equals(varName)) {
                  assert value.getValue() != null; // annotation value cannot be null
                  assert value.getValue() instanceof IVariableBinding;
                  IVariableBinding varBinding = (IVariableBinding) value.getValue();
                  assert varBinding.isEnumConstant();
                  return varBinding.getName();
              }
          }
          return null;
      }
docs: returns null if specified varName annotation is not found