public static GradsAttribute parseAttribute ( String attrSpec ) { String [ ] toks = attrSpec . split ( "\\s+" ) ; StringBuffer buf = new StringBuffer ( ) ; for ( int i = 4 ; i < toks . length ; i ++ ) { buf . append ( toks [ i ] ) ; buf . append ( " " ) ; } // toks[0] is "@" return new GradsAttribute ( toks [ 1 ] , toks [ 2 ] , toks [ 3 ] , buf . toString ( ) . trim ( ) ) ; }
Parse an attribute spec