public static List < Match > search ( Match m , Pattern pattern ) { assert pattern . getStartingClass ( ) . isAssignableFrom ( m . get ( 0 ) . getModelInterface ( ) ) ; return searchRecursive ( m , pattern . getConstraints ( ) , 0 ) ; }
Searches the pattern starting from the given match . The first element of the match should be assigned . Others are optional .