Create an implicit getter that caches its `getter()`
lookup value
356352
function (scope, key, getter) {
      var value = null, args = Array.prototype.slice.call(arguments);
      var params = (args.length > 3) ? args.slice(3) : [];

      Object.defineProperty(scope, key, {
        get: function () {
          if (value === null) value = getter.apply(scope, params);
          return value;
        }
      });
    }
646592
Method getSetter(Method getter) {
        synchronized (setterCache) {
            if ( !setterCache.containsKey(getter) ) {
                String fieldName = ReflectionUtils.getFieldNameByGetter(getter, false);
                String setterName = "set" + fieldName;
                Method setter = null;
                try {
                    setter = getter.getDeclaringClass().getMethod(setterName, getter.getReturnType());
                } catch ( NoSuchMethodException e ) {
                    throw new DynamoDBMappingException("Expected a public, one-argument method called " + setterName
                            + " on " + getter.getDeclaringClass(), e);
                } catch ( SecurityException e ) {
                    throw new DynamoDBMappingException("No access to public, one-argument method called " + setterName
                            + " on " + getter.getDeclaringClass(), e);
                }
                setterCache.put(getter, setter);
            }
            return setterCache.get(getter);
        }
    }
951400
def simple_cache(func):
    
    saved_results = {}

    def wrapper(cls, module):
        if module in saved_results:
            return saved_results[module]
        saved_results[module] = func(cls, module)
        return saved_results[module]
    return wrapper
805905
private static <T> SimonType getValue(Class<? extends T> type, SimonTypeMatcher<T> typeMatcher) {
		SimonType simonType = SIMON_TYPE_CACHE.get(type);
		if (simonType == null) {
			for (SimonType lSimonType : SimonType.values()) {
				if (typeMatcher.matches(type, lSimonType)) {
					simonType = lSimonType;
					if (!Proxy.isProxyClass(type)) {
						SIMON_TYPE_CACHE.put(type, simonType);
					}
					break;
				}
			}
		}
		return simonType;
	}
613887
function lazy(key, get) {
  const uninitialized = {};
  let _val = uninitialized;
  Object.defineProperty(exports, key, {
    get() {
      if (_val === uninitialized) {
        _val = get();
      }
      return _val;
    },
  });
}
565284
private V dereferenceValue(Future<CacheReference<V>> futureValue) {
        try {
            return dereferenceValue(futureValue.get());
        } catch (final Throwable e) {
            return null;
        }
    }
1272659
function getter (value, properties) {
  // Most calculations happen within the typecast and the value passed is typically the value we want to use.
  // Typically, the getter just returns the value.
  // Modifications to the value within the getter are not written to the object.

  // Getter can transform value after typecast.
  if (properties.get) {
    value = properties.get.call(this, value)
  }

  return value
}
1337934
Map<String, Vertex> getVertexCache(boolean includeUserDefined, boolean includeAutoGenerated) {
    return getCache(userVertexCache, autoVertexCache, includeUserDefined, includeAutoGenerated);
  }
899732
function makeFindQuery(getter) {
  return (container, text, options, waitForElementOptions) =>
    waitForElement(
      () => getter(container, text, options),
      waitForElementOptions,
    )
}
638615
function(_context) {
        if(this.is_object(_context)) {
          return _context;
        } else {
          var iterator = ".";
          if(this.pragmas["IMPLICIT-ITERATOR"]) {
            iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
          }
          var ctx = {};
          ctx[iterator] = _context;
          return ctx;
        }
      }
885486
private CacheEntry toCacheEntry(final StackTraceElement stackTraceElement, final Class<?> callerClass,
                                    final boolean exact) {
        String location = "?";
        String version = "?";
        ClassLoader lastLoader = null;
        if (callerClass != null) {
            try {
                Bundle bundle = FrameworkUtil.getBundle(callerClass);
                if (bundle != null) {
                    location = bundle.getBundleId() + ":" + bundle.getSymbolicName();
                    version = bundle.getVersion().toString();
                }
            } catch (final Exception ex) {
                // Ignore the exception.
            }
            lastLoader = callerClass.getClassLoader();
        }
        return new CacheEntry(new ExtendedClassInfo(exact, location, version), lastLoader);
    }
1246470
def _get_getter_fun(object_type,           # type: Type
                    parameter,             # type: Parameter
                    private_property_name  # type: str
                    ):
    

    property_name = parameter.name

    # -- check overridden getter for this property name
    overridden_getters = getmembers(object_type, predicate=_has_annotation(__GETTER_OVERRIDE_ANNOTATION, property_name))

    if len(overridden_getters) > 0:
        if len(overridden_getters) > 1:
            raise DuplicateOverrideError('Getter is overridden more than once for attribute name : ' + property_name)

        # --use the overridden getter
        getter_fun = overridden_getters[0][1]

        # --check its signature
        s = signature(getter_fun)
        if not ('self' in s.parameters.keys() and len(s.parameters.keys()) == 1):
            raise IllegalGetterSignatureException('overridden getter must only have a self parameter, found ' +
                                                  str(len(s.parameters.items()) - 1) + ' for function ' + str(
                getter_fun.__qualname__))

        # --use the overridden getter ?
        property_obj = property(getter_fun)
    else:
        # -- generate the getter :
        def autoprops_generated_getter(self):
            return getattr(self, private_property_name)

        # -- use the generated getter
        getter_fun = autoprops_generated_getter

        try:
            annotations = getter_fun.__annotations__
        except AttributeError:
            # python 2
            pass
        else:
            annotations['return'] = parameter.annotation  # add type hint to output declaration

    return getter_fun
1311059
function creareSetGet( classProto ) {
			// Storing key:value in separate variable as using original object will
			// create infinit loop.
			var valueStorage = {};
			// Static is not supported.... will not support ie < 9;
			// Adding setter and getter
			classProto.prototype.$add = function( obj, key, val, isConst ) {

				// val has a value for it's original object.
				if (val != undefined) {
					valueStorage[key] = val;
				}

				function setter( newval ) {
					if (isConst) {
						throw this + "." + key + " can not be changed.";
					}
					valueStorage[key] = newval;
				}

				function getter( ) {
					return valueStorage[key];
				}
				/// ie dont include key created by setter getter if not intialized before
				obj[key] = null;
				if (Object.defineProperty && isGetterSetterSupported) {
					Object.defineProperty(obj, key, {
					    get : getter,
					    set : setter
					});
				}
				else if (obj.__defineGetter__) {
					obj.__defineGetter__(key, getter);
					obj.__defineSetter__(key, setter);
				}
				else {
					obj[key] == undefined && (obj[key] = valueStorage[key]);
				}
			};
		}
1219786
function useStateWithGetter(initial) {
  const ref = useRef();
  const [state, setState] = useState(initial);
  ref.current = state;
  const set = (value) => {
    ref.current = value;
    setState(value);
  };
  const get = () => {
    return ref.current;
  };
  return [state, set, get];
}
774533
function createGetter$1(namespace, mapping) {
        if (namespace) {
            return function () {
                var state = resolveObjectPath(this.$store.state, namespace, '/');

                return resolveObjectPath(state, mapping.key, '.');
            };
        }

        return function () {
            return resolveObjectPath(this.$store.state, mapping.key, '.');
        };
    }
1325669
def _getter(self, obj):
        
        result = None

        if self._fget_ is not None:
            result = self._fget_(obj)

        if result is None:
            result = getattr(obj, self._attrname(), self._default_)

        # notify parent schema about returned value
        if isinstance(obj, Schema):
            obj._getvalue(self, result)

        return result
185577
function CachedPromiseProxy(target, context, cache = new WeakMap(), factory = PromiseProxy) {
  const cached = cache.get(target)
  if (cached) {
    return cached
  }
  const obj = factory(target, context,
    (target, context) => CachedPromiseProxy(target, context, cache))
  cache.set(target, obj)
  return obj
}