Creating the First Entry Point
Note: This GIF is already outdated, but it is still a good example.
-
In your main method run
Starter#start
: -
Create a method with any named annotated by
@Entrypoint
: -
Run the application:
-
Now let's create even more entry points:
-
If the application is now run again, we will be asked at startup which entrypoint we want to start:
Attributes for @Entrypoint
@Entrypoint(value = "xyz") // value: display name of the entrypoint
@Entrypoint(loop = true) // loop: true = run the entrypoint again after it has finished
@Entrypoint(stopwatch = true) // stopwatch: true = print the time it took to run the entrypoint
@Entrypoint(verbose = true) // verbose: true = print debugging information
Last update:
2022-03-15