code: public int getMethodOrProperty(char[] array, int currentIndex, StringBuffer velocityBlock,
          VelocityParserContext context) throws InvalidVelocityException
      {
          int i = currentIndex + 1;
  
          // A Velocity method starts with [a-zA-Z]
          if (i < array.length && Character.isLetter(array[i])) {
              for (; i < array.length; ++i) {
                  if (array[i] == '(') {
                      i = getMethodParameters(array, i, null, context);
                      break;
                  } else if (!Character.isLetterOrDigit(array[i])) {
                      break;
                  }
              }
          } else {
              throw new InvalidVelocityException();
          }
  
          if (velocityBlock != null) {
              velocityBlock.append(array, currentIndex, i - currentIndex);
          }
  
          return i;
      }
docs: Get a velocity method call or a property starting with a <code>.</code>.
  
  @param array the source to parse
  @param currentIndex the current index in the <code>array</code>
  @param velocityBlock the buffer where to append matched velocity block
  @param context the parser context to put some informations
  @return the index in the <code>array</code> after the matched block
  @throws InvalidVelocityException not a valid velocity block