fix Issue 10144 - Using enum inside final class occurs weird errors

An enum and static variable declaration should not be affected by `synchronized`, `override`, `abstract`, and `final` attributes.