public int getVelocityIdentifier ( char [ ] array , int currentIndex , StringBuffer velocityBlock , VelocityParserContext context ) throws InvalidVelocityException { // The first character of an identifier must be a [a-zA-Z] if ( ! Character . isLetter ( array [ currentIndex ] ) ) { throw new InvalidVelocityException ( ) ; } int i = currentIndex + 1 ; while ( i < array . length && array [ i ] != ' ' && isValidVelocityIdentifierChar ( array [ i ] ) ) { ++ i ; } if ( velocityBlock != null ) { velocityBlock . append ( array , currentIndex , i - currentIndex ) ; } return i ; }
Get a valid Velocity identifier used for variable of macro .