public static EnumAttributeFactory getFactoryForClass ( Class cls ) { // Check that the requested class is actually an enum. if ( ! cls . isEnum ( ) ) { throw new IllegalArgumentException ( "Can only create enum attribute factories for classes that are enums." ) ; } return EnumClassImpl . getInstance ( cls ) ; }
Generates a factory for building enum attributes of the specified enum class .