Generate refresh.

@param sharedPreferenceName
the shared preference name
@param className
the class name
347939
private static void generateRefresh(String sharedPreferenceName, String className) {
		MethodSpec.Builder method = MethodSpec.methodBuilder("refresh").addModifiers(Modifier.PUBLIC).addJavadoc("force to refresh values\n").returns(className(className));

		method.addStatement("createPrefs()");
		method.addStatement("return this");
		builder.addMethod(method.build());
	}
480675
private static void initLookAndFeelIntern(final String className) {
        try {
            UIManager.setLookAndFeel(className);
        } catch (final Exception e) {
            throw new RuntimeException("Error initializing the Look And Feel!", e);
        }
    }
1066432
private void initializeDynamicPreferenceButton() {
        Button dynamicPreferenceButton = findViewById(R.id.dynamic_preference_button);
        dynamicPreferenceButton.setOnClickListener(createDynamicPreferenceButtonListener());
    }
1348447
public void refreshSignature () {
    if (postStartTimestamp == 0 || (System.nanoTime() - postStartTimestamp) > Duration.ofMinutes(sigExpireInMinute).toNanos()) {
      // generate signature
      try {
        signature = SharedAccessSignatureTokenProvider
            .generateSharedAccessSignature(sasKeyName, sasKey, namespaceName, Duration.ofMinutes(sigExpireInMinute));
        postStartTimestamp = System.nanoTime();
        LOG.info ("Signature is refreshing: " + signature);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
284069
public void refresh() {
        if (credentialFile.lastModified() > credentialFileLastModified) {
            credentialFileLastModified = credentialFile.lastModified();
            credentials = loadCredentials(credentialFile);
        }
        credentialProvider = new JsonStaticCredentialsProvider(credentials);
    }
9239
private void cacheClass(ClassSource classSource, String outerClassName) {
        if (classCacheMode != UserCodeDeploymentConfig.ClassCacheMode.OFF) {
            classSourceMap.put(outerClassName, classSource);
        } else {
            ThreadLocalClassCache.store(outerClassName, classSource);
        }
    }
753365
private OnPreferenceChangeListener createThemeChangeListener() {
        return new OnPreferenceChangeListener() {

            @Override
            public boolean onPreferenceChange(final Preference preference, final Object newValue) {
                getActivity().recreate();
                return true;
            }

        };
    }
1197188
public synchronized void refresh(File cacheRoot) {
        monitorState.set(MonitorState.INIT.ordinal());
        stop();
        initProperties(monitorRef);
        init();
    }
382137
private void writePreferences() {
    boolean runOnStartup = getRunOnStartupCheckBox().isSelected();
    pref.putBoolean("runOnStartup", runOnStartup);

    if (getLimitCpusCheckBox().isSelected()) {
      int maxCpus = ((Number) getMaxCpusTextField().getValue()).intValue();
      pref.putInt("maxCpus", maxCpus);
    } else {
      pref.putInt("maxCpus", 0);
    }

    boolean requireAC = getRequireACCheckBox().isSelected();
    int minBattLife = getMinBatteryLifeSlider().getValue();
    int minBattLifeWhileChg = getMinBatteryLifeWhileChargingSlider().getValue();
    pref.putBoolean("requireAC", requireAC);
    pref.putInt("minBattLife", minBattLife);
    pref.putInt("minBattLifeWhileChg", minBattLifeWhileChg);

    boolean cacheClassDefinitions = getCacheClassDefinitionsCheckBox().isSelected();
    pref.putBoolean("cacheClassDefinitions", cacheClassDefinitions);
  }
1243265
public function Refresh() {
      $LocalName = $this->Current();
      
      $ApplicationWhiteList = Gdn::ApplicationManager()->EnabledApplicationFolders();
      $PluginWhiteList = Gdn::PluginManager()->EnabledPluginFolders();

      $ForceRemapping = TRUE;

      $this->Set($LocalName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
   }
698536
private void refreshDrawable() {
        if (isWeakReferenceValid()) {
            TextView textView = getTextView().get();
            textView.setBackgroundDrawable(getBadgeDrawable(textView.getContext()));
        }
    }
2197
@Override
    protected void createSharedPreferences() {
        super.createSharedPreferences();

        this.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);

        // problem that the first call to getAll() returns nothing, apparently the
        // following two calls have to be made to read all the values correctly
        // http://stackoverflow.com/questions/9310479/how-to-iterate-through-all-keys-of-shared-preferences
        this.sharedPreferences.edit().clear();
        PreferenceManager.setDefaultValues(this, R.xml.preferences, true);

        this.sharedPreferences.registerOnSharedPreferenceChangeListener(this);
    }
123116
@Override
    void findReferencedClassNames(final Set<String> classNameListOut) {
        classNameListOut.add(className);
        classNameListOut.add(getFullyQualifiedClassName());
        for (final TypeArgument typeArgument : typeArguments) {
            typeArgument.findReferencedClassNames(classNameListOut);
        }
    }
32794
@Override
	public synchronized void refresh() {
	
		IntervalProperty[] properties = getProperties();
		
		for(IntervalProperty p : properties ) {
			
			p.refresh();
		}
		
	}
479470
public final synchronized void refresh( HttpServletRequest request, HttpServletResponse response )
    {
        PerRequestState prevState = setPerRequestState( new PerRequestState( request, response, null ) );

        try
        {
            onRefresh();
        }
        finally
        {
            setPerRequestState( prevState );
        }
    }
547256
private void chkSameAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkSameAsActionPerformed
        preference.put(OntopOBDASettings.SAME_AS, String.valueOf(chkSameAs.isSelected()));

    }
1245842
public final void lazyRefresh() {
    if(plot == null) {
      LOG.warning("'lazyRefresh' called before initialized!");
      return;
    }
    LOG.debug("Scheduling refresh.");
    Runnable pr = new Runnable() {
      @Override
      public void run() {
        if(OverviewPlot.this.pendingRefresh.compareAndSet(this, null)) {
          OverviewPlot.this.refresh();
        }
      }
    };
    OverviewPlot.this.pendingRefresh.set(pr);
    plot.scheduleUpdate(pr);
  }