private static void parseLine ( Class < ? > parent , char [ ] line , int begin , int end ) { while ( begin < end && line [ begin ] == ' ' ) { begin ++ ; } if ( begin >= end || line [ begin ] == ' ' ) { return ; // Empty/comment lines are okay, continue } // Find end of class name: int cend = begin + 1 ; while ( cend < end && line [ cend ] != ' ' ) { cend ++ ; } // Class name: String cname = new String ( line , begin , cend - begin ) ; ELKIServiceRegistry . register ( parent , cname ) ; for ( int abegin = cend + 1 , aend = - 1 ; abegin < end ; abegin = aend + 1 ) { // Skip whitespace: while ( abegin < end && line [ abegin ] == ' ' ) { abegin ++ ; } // Find next whitespace: aend = abegin + 1 ; while ( aend < end && line [ aend ] != ' ' ) { aend ++ ; } ELKIServiceRegistry . registerAlias ( parent , new String ( line , abegin , aend - abegin ) , cname ) ; } return ; }
Parse a single line from a service registry file .