Theme activation hook in php class

It looks like you are adding the hook just inside the body of the class. Try adding it into an init() method and calling it after it is instantiated or at the very least in the constructor.

I think the issues is that the hook is being registered before the class has been fully read by PHP?

Try this:

final class My_Class_Name {

    function init() {
        add_action('after_switch_theme', array( $this, 'activate' ));
    }

    function activate() {
    }
}

$class = new My_Class_Name();
$class->init();

Hope this helps!