@ Deprecated public void add ( String route , String acceptType , Object target ) { try { int singleQuoteIndex = route . indexOf ( SINGLE_QUOTE ) ; String httpMethod = route . substring ( 0 , singleQuoteIndex ) . trim ( ) . toLowerCase ( ) ; // NOSONAR String url = route . substring ( singleQuoteIndex + 1 , route . length ( ) - 1 ) . trim ( ) ; // NOSONAR // Use special enum stuff to get from value HttpMethod method ; try { method = HttpMethod . valueOf ( httpMethod ) ; } catch ( IllegalArgumentException e ) { LOG . error ( "The @Route value: " + route + " has an invalid HTTP method part: " + httpMethod + "." ) ; return ; } add ( method , url , acceptType , target ) ; } catch ( Exception e ) { LOG . error ( "The @Route value: " + route + " is not in the correct format" , e ) ; } }
Parse and validates a route and adds it