Root resource class is a POJO annotated with @Path. Root resource class MUST have atleast one resource method -
method annotated with @Path or with @HttpMethod (@GET, @POST, etc).
Root resource classes are instantiated by the JAX-RS runtime and MUST have a public constructor for which
the JAX-RS runtime can provide all parameter values. Note that a zero argument constructor is permissible
under this rule.
A public constructor MAY include parameters annotated with one of the following: @Context, @HeaderParam,
@CookieParam, @MatrixParam, @QueryParam or @PathParam. However, depending on the
resource class lifecycle and concurrency, per-request information may not make sense in a constructor. If
more than one public constructor is suitable then an implementation MUST use the one with the most
parameters.
The validation works in Java files.