1 /* 2 VisibilityModifier 3 packageAllowed = (default)false 4 protectedAllowed = (default)false 5 publicMemberPattern = (default)^serialVersionUID$ 6 allowPublicFinalFields = (default)false 7 allowPublicImmutableFields = true 8 immutableClassCanonicalNames = (default)java.io.File, java.lang.Boolean, java.lang.Byte, \ 9 java.lang.Character, java.lang.Double, java.lang.Float, \ 10 java.lang.Integer, java.lang.Long, java.lang.Short, \ 11 java.lang.StackTraceElement, java.lang.String, \ 12 java.math.BigDecimal, java.math.BigInteger, \ 13 java.net.Inet4Address, java.net.Inet6Address, \ 14 java.net.InetSocketAddress, java.net.URI, java.net.URL, \ 15 java.util.Locale, java.util.UUID 16 ignoreAnnotationCanonicalNames = (default)com.google.common.annotations.VisibleForTesting, \ 17 org.junit.ClassRule, org.junit.Rule 18 19 20 */ 21 22 package com.puppycrawl.tools.checkstyle.checks.design.visibilitymodifier; 23 24 /** Shows that sealed enum is good as final. */ 25 public enum InputVisibilityModifiersEnumIsSealed { 26 SOME_VALUE; 27 28 static class Hole { 29 } 30 31 /** Normally disallowed if final enclosing class is required. */ 32 public final int someField = Integer.MAX_VALUE; 33 34 /** Disallowed because mutable. */ 35 public final Hole hole = null; // violation 36 }