Java Preference Get getUserPreferences()

Here you can find the source of getUserPreferences()

Description

Retrieves the preference package based on the specified preferenceClass

License

Open Source License

Declaration

public static Preferences getUserPreferences() 

Method Source Code

//package com.java2s;

import java.util.prefs.Preferences;

public class Main {
    private static Class<?> mainAppClass;

    /**//from w w w.  j  a  v a  2  s .c om
     * Retrieves the preference package based on the specified preferenceClass
     */
    public static Preferences getUserPreferences() {
        return Preferences.userNodeForPackage(mainAppClass);
    }
}

Related

  1. getPreferences()
  2. getPreferences(final Class preferencesClass)
  3. getPrefs(Class cls)
  4. getPrefsStrings(Preferences prefs, String key)
  5. getStringArray(final String key, final String[] defaultValue)
  6. getUserPreferences()
  7. getUserPreferences(final String preferenceGroup)
  8. getUserPrefsNode(Object mainClassInstance)