question: private void check ( ) { boolean star = types == null ; int len = name . length ( ) ; if ( len == 0 ) { throw new IllegalArgumentException ( "method name cannot be empty" ) ; } char c = name . charAt ( 0 ) ; if ( ! Character . isJavaIdentifierStart ( c ) && ! ( star && c == '*' && len > 1 ) ) { throw new IllegalArgumentException ( "invalid method name" ) ; } if ( star && c != '*' && name . charAt ( len - 1 ) == '*' ) { len -- ; } while ( -- len >= 1 ) { if ( ! Character . isJavaIdentifierPart ( name . charAt ( len ) ) ) { throw new IllegalArgumentException ( "invalid method name" ) ; } } if ( types != null ) { for ( int i = types . length ; -- i >= 0 ; ) { if ( types [ i ] == null ) { throw new NullPointerException ( "class cannot be null" ) ; } } } }
target:  Verifies that the name is a syntactically valid method name, or (if types is null) if the name is a syntactically valid method name with a '*' appended or could be constructed from some syntactically valid method name containing more than two characters by replacing the first character of that name with '*', and verifies that none of the elements of types are null.