code: public static Object getValue(Object object, Field field) throws VisitorException {
  		boolean reprotect = false;
  		if(object == null) {
  			return null;
  		}
  		try {
  			if(!field.isAccessible()) {
  				field.setAccessible(true);
  				reprotect = true;
  			}
  			Object value = field.get(object);
  			logger.trace("field '{}' has value '{}'", field.getName(), value);
  			return value;
  		} catch (IllegalArgumentException e) {
  			logger.error("Trying to access field '{}' on invalid object of class '{}'", field.getName(), object.getClass().getSimpleName());
  			throw new VisitorException("Trying to access field on invalid object", e);
  		} catch (IllegalAccessException e) {
  			logger.error("Illegal access to class '{}'", object.getClass().getSimpleName());
  			throw new VisitorException("Illegal access to class", e);
  		} finally {
  			if(reprotect) {
  				field.setAccessible(false);
  			}
  		}
  	}
docs: Returns the value of the given field on the given object.
  
  @param object
  the object whose field is to be retrieved.
  @param field
  the field being retrieved.
  @return
  the value of the field.
  @throws VisitorException
  if an error occurs while evaluating the node's value.