public MatcherController add ( MatcherPattern matcherPattern ) { int patternCode = matcherPattern . getPatternCode ( ) ; if ( this . lastAddTableInfo == null ) { throw new IllegalStateException ( "There is a problem with the order of function call." ) ; } if ( findMatcherPattern ( patternCode ) != null ) { throw new IllegalArgumentException ( "patternCode has been specified already exists." ) ; } this . matcherPatterns . add ( matcherPattern ) ; return this ; }
Registers a pattern for UriMatcher . To register you have to create an instance of MatcherPattern .