The premain is a mechanism associated with the java.lang.instrument package, used for loading “Agents” which make byte-code changes in Java programs.
The mechanism is explained in the java.lang.instrument documentation.
The gist of it is that the “agent” is deployed in a jar, and that jar has a special entry in its manifest, that tells the instrumentation package where to look for the premain method. The source you quoted is supposed to be a simple agent.