How to use abstract methods linked with enforced call for other methods
===

I am facing the following problem:

I defined an abstract class that contains the public generate, clone, etc. methods that must be implemented by the subclass. However I would like to ensure that when these public methods are called certain other methods are also executed within the abstract class.

An obvious solution would be to make a protected abstract method to be implemented and a public non-abstract method that calls the abstract one and all the other methods that I need.

For example:

    abstract class Representation {
 
        public void generate(int variable) {
            myFunction();
            generateAbstract(variable);
        }

        protected abstract void generateAbstract(int variable);

        private void myFunction() {
            //do something
        }
    }

My question is how to solve it a nicer way, or if this is the way to go how to name the function in a user-friendly way.

Thanks!