public final SgMethod findMethodByName(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("The argument 'name' cannot be null!");
        }
        for (int i = 0; i < methods.size(); i++) {
            final SgMethod method = methods.get(i);
            if (method.getName().equals(name)) {
                return method;
            }
        }
        return null;
    }
public final SgMethod findMethodByName ( final String name ) { if ( name == null ) { throw new IllegalArgumentException ( "The argument 'name' cannot be null!" ) ; } for ( int i = 0 ; i < methods . size ( ) ; i ++ ) { final SgMethod method = methods . get ( i ) ; if ( method . getName ( ) . equals ( name ) ) { return method ; } } return null ; }
Find a method by it's name.

@param name
Name of the method to find - Cannot be null.

@return Method or null if it's not found.