If open up the Activity in Designer Studio : then use the 'Actions > View Java'.
If you look at the generated code - you will see the individual steps are translated into Java Methods; for instance 'step1' typically becomes "step1_circum0".
If you compare a couple of different methods (say 'step2_circum0' with 'step1_circum0') you should be able to factor out the standard 'plumbing' code for each step - and pick out the specific Java for the step. (Its usually in the middle of the step-method in a 'try' block).
This Java code will only work within the context of a PRPC Activity though: if you are looking for a way of producing a 'standalone' Java program; this won't work. (Without substantial other work at least).
Consider using the 'Pega API' to in that case: write your standalone Java Client as a 'Rest Client' that calls into PRPC functionality this way ?