private static Token createPlainToken ( final String placeholder ) { int splitIndex = placeholder . indexOf ( ' ' ) ; Token token ; if ( splitIndex == - 1 ) { token = createPlainToken ( placeholder . trim ( ) , null ) ; } else { String name = placeholder . substring ( 0 , splitIndex ) . trim ( ) ; String configuration = placeholder . substring ( splitIndex + 1 ) . trim ( ) ; token = createPlainToken ( name , configuration ) ; } return token == null ? new PlainTextToken ( placeholder ) : token ; }
Creates a new token for a given placeholder .