public class GrailsBannerRuntimeHints extends java.lang.Object implements RuntimeHintsRegistrar
Keeps the banner's option enums usable in an image, including the ones an application has not turned on.
A Groovy enum builds its constants in a static initialiser that reaches its own constructor
through the metaclass rather than calling it. An image keeps a constructor only when something
has asked it to, so the enum initialises to
Could not find matching constructor for: ...OptionalVersionOption(String, Integer) --
thrown while printing the banner, before anything the application wrote has run.
Which enums are reached depends on configuration: the optional ones are touched only where
grails.banner.versions.include names something. So an image traced with nothing included
carries no record of them, and an application that later asks for the Tomcat version gets a
start-up failure out of a banner setting. They are registered here rather than left to a trace
for that reason -- all three are small, and the alternative is metadata that depends on which
options happened to be on the day it was collected.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
registerHints(RuntimeHints hints, java.lang.ClassLoader classLoader) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |