private static List<String> extractEnumValues(MethodScope method) {
        ResolvedType declaringType = method.getDeclaringType();
        if (EnumModule.isEnum(declaringType)) {
            ResolvedType enumType = declaringType.getTypeParameters().stream().findFirst().orElse(null);
            if (enumType != null) {
                return EnumModule.extractEnumValues(enumType, Enum::name);
            }
        }
        return null;
    }
Look-up the given enum type's constant values.

@param method targeted method
@return collection containing constant enum values
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/EnumModule.java