public <T> T getInformalParameter(String name, Class<T> type) { Binding binding = getBinding(name); Object value = binding == null ? null : binding.get(); return elementResources.coerce(value, type); }
public Messages getMessages() { if (messages == null) { // This kind of lazy loading pattern is acceptable without locking. // Changes to the messages field are atomic; in some race conditions, the call to // getMessages() may occur more than once (but it caches the value anyway). messages = elementResources.getMessages(componentModel); } return messages; }
private void createRenderVariablesPerThreadValue() { try { upgradeReadLockToWriteLock(); if (renderVariables == null) { renderVariables = elementResources.createPerThreadValue(); } } finally { downgradeWriteLockToReadLock(); } }