class JsonUtils {

    public static Set<String> getTransientFields(Class<?> aClass) {
        Set<String> transientFields = new HashSet<>();
        Class<?> superClass = aClass;
        while (superClass != null && superClass != Object.class) {
            for (Field field : superClass.getDeclaredFields()) {
                if (Modifier.isTransient(field.getModifiers()) || field.isAnnotationPresent(JsonTransient.class)) {
                    transientFields.add(field.getName());
                }
            }
            superClass = superClass.getSuperclass();
        }
        return transientFields;
    }

    private  JsonUtils();

}