private static void findMethodSignatures ( String code , Set < String > signatures ) { if ( code == null ) { return ; } Matcher matcher = OBJC_METHOD_DECL_PATTERN . matcher ( code ) ; while ( matcher . find ( ) ) { StringBuilder signature = new StringBuilder ( ) ; signature . append ( matcher . group ( 1 ) ) ; if ( matcher . group ( 2 ) != null ) { signature . append ( ' ' ) ; String additionalParams = matcher . group ( 3 ) ; if ( additionalParams != null ) { Matcher paramsMatcher = ADDITIONAL_PARAM_PATTERN . matcher ( additionalParams ) ; while ( paramsMatcher . find ( ) ) { signature . append ( paramsMatcher . group ( 1 ) ) . append ( ' ' ) ; } } } signatures . add ( signature . toString ( ) ) ; } }
Finds the signatures of methods defined in the native code .