code: @Override
      public R visitVariable(VariableElement e, P p) {
          ElementKind k = e.getKind();
          switch(k) {
          case ENUM_CONSTANT:
              return visitVariableAsEnumConstant(e, p);
  
          case EXCEPTION_PARAMETER:
              return visitVariableAsExceptionParameter(e, p);
  
          case FIELD:
              return visitVariableAsField(e, p);
  
          case LOCAL_VARIABLE:
              return visitVariableAsLocalVariable(e, p);
  
          case PARAMETER:
              return visitVariableAsParameter(e, p);
  
          case RESOURCE_VARIABLE:
              return visitVariableAsResourceVariable(e, p);
  
          default:
              throw new AssertionError("Bad kind " + k + " for VariableElement" + e);
          }
      }
docs: Visits a variable element, dispatching to the visit method for
  the specific {@linkplain ElementKind kind} of variable, {@code
  ENUM_CONSTANT}, {@code EXCEPTION_PARAMETER}, {@code FIELD},
  {@code LOCAL_VARIABLE}, {@code PARAMETER}, or {@code RESOURCE_VARIABLE}.
  
  @param e {@inheritDoc}
  @param p {@inheritDoc}
  @return  the result of the kind-specific visit method