FreeStyleProject extends Project<FreeStyleProject, FreeStyleBuild>

Project<P extends Project<P, B>, B extends Build<P, B>> extends AbstractProject<P, B>

AbstractProject<P extends AbstractProject<P, R>, R extends AbstractBuild<P, R>> extends Job<P, R>

Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, RunT>> extends AbstractItem

AbstractItem extends Actionable

Actionable extends ModelObject

There's a matching inheritance from Builds. I'm sure this could probably be rationalised, but we're now in a place where any change to this would break lots and lots of plugins, and people would whinge horribly.

Generally, you don't need to worry about all this - you'll work with AbstractProject and AbstractBuild. Occasionally, you'll need a Project and, if you define your own Project and Build classes, you'll want to upcast to those.

So, to record something to our build we add a BuildAction, and to add something to our Project we add a ProjectAction. Action here is a bit of a misnomer. Actions generally don't really do anything, they show something.

If we go back to our GStats publisher for a moment ...