{@inheritDoc}

If the base object is null, the property will be looked up in the context.
347188
@Override
  public Object getValue(ELContext context, Object base, Object property) {
    return getValue(context, base, property, true);
  }
1111269
public function propertyTypeOverride(Property $annot = null, \ReflectionProperty $property = null)
    {
        if ($annot || $annot = $this->getPropertyAnnotation($property)) {

            return $annot->getType();
        }

        return null;
    }
437395
public function lookup($context, $path, $require = false)
    {
        if (empty($path)) {
            throw new \InvalidArgumentException("Passed lookup path is empty.");
        }
        if (empty($context)) {
            throw new \InvalidArgumentException("Specified context is empty while resolving path " . json_encode($path));
        }
        return PropertyAccessor::getByPath($context, $this->path($path), $require);
    }
751296
public static <T> T getContext(ELContext context, Class<T> key, T defaultValue) {
        @SuppressWarnings("unchecked")
        final T result = (T) context.getContext(key);
        return result == null ? defaultValue : result;
    }
872292
@Override
    public Object getValue(final Object base, final Object property) throws EvaluationException,
        PropertyNotFoundException
    {
        if (base == null)
        {
            return null;
        }
        if (property == null)
        {
            return null;
        }
        return invokeResolver(new ResolverInvoker<Object>(base, property)
        {
            @Override
            public Object invoke(ELResolver resolver, ELContext context)
            {
                return getELResolver().getValue(getELContext(), base, property);
            }
        });
    }
1344159
function resolveContext (emitter, context, storageKey) {
  // TODO: clean up - try to use internal context resolve more on no
  // use the one from on (resolve)
  // figure out why we cant use resolveContextSet since thats what it is
  if (context) {
    // this is lame stuff! should be in observable in some way...
    let base = emitter.parent.parent
    let type = emitter.key
    let setObj = { on: {} }
    setObj.on[type] = {}
    // base = base.set(setObj) // .on[type]
    emitter = (base.set(setObj) || base)._on[type]
  }
  if (!emitter.hasOwnProperty(storageKey)) {
    emitter.setKey(storageKey, {}, false)
  }
  return emitter
}
221969
public function getContext($name = null)
    {
        if (is_null($name)) {
            $name = $this->context;
        }

        return isset($this->contexts[$name]) ? $this->contexts[$name] : null;
    }
835446
@Override
    @SuppressWarnings("unchecked")
    public <T> T get(Contextual<T> contextual) {
        Bean bean = (Bean) contextual;
        // you can store the bean somewhere
        if (somewhere.containsKey(bean.getName())) {
            return (T) somewhere.get(bean.getName());
        } else {
            return null;
        }
    }
818192
@SuppressWarnings("unchecked")
    @Override
    public Map getConstrainedProperties() {
        verifyContextIsInitialized();
        if(constrainedProperties == null) {
            ConstrainedDiscovery constrainedDiscovery = GrailsFactoriesLoader.loadFactory(ConstrainedDiscovery.class);
            if(constrainedDiscovery == null) {
                constrainedProperties = Collections.emptyMap();
            }
            else {
                constrainedProperties = constrainedDiscovery.findConstrainedProperties(persistentEntity);
            }
        }
        return constrainedProperties;
    }
295514
function baseMatchesProperty(key, value) {
  if (isStrictComparable(value)) {
    return function(object) {
      return object != null && object[key] === value &&
        (typeof value != 'undefined' || (key in toObject(object)));
    };
  }
  return function(object) {
    return object != null && baseIsEqual(value, object[key], null, true);
  };
}
144845
public function initializeContext(Context $context)
    {
        if ($context instanceof ResourceContext) {
            $reflector = new ReflectionClass(get_class($context));

            if ($this->builder->getLoader() instanceof FileResourceLoader) {
                if ($this->builder->getLoader()->getBasePath() == null) {
                    $this->builder->getLoader()->setBasePath(dirname($reflector->getFileName()));
                }
            }

            if ($context->getResourceFactory()) {
                $this->builder->setFactory($context->getResourceFactory());
            }

            $context->setResourceBuilder($this->builder);
        }
    }
778646
public function initializeContext(Context $context)
    {
        if (false === $context instanceof AliceContextInterface) {
            return;
        }

        /* @var AliceContextInterface $context */
        $fixturesBasePath = $this->fixturesBasePath;
        switch (true) {

            case $context instanceof AliceODMContext:
                $fixturesBasePath .= '/ODM';
                break;

            case $context instanceof AliceORMContext:
                $fixturesBasePath .= '/ORM';
                break;

            case $context instanceof AlicePHPCRContext:
                $fixturesBasePath .= '/PHPCR';
                break;
        }

        if (null === $context->getBasePath()) {
            $context->setBasePath($fixturesBasePath);
        }
    }
445972
PropertyMap getPrimaryParent() {
    if (parentSource == null) {
      return null;
    }
    ObjectType iProto = parentSource.getImplicitPrototype();
    return iProto == null ? null : iProto.getPropertyMap();
  }
1313487
function (contextModel, properties) {

                    var ret = [];

                    _.each(_.extend({}, properties), function (value, key) {
                        ret.push(key + "=" + value);
                    });

                    ret.sort();

                    if (contextModel) {
                        ret.unshift(Context.generateCacheIdFromEntity(contextModel));
                    }

                    if (ret.length === 0) {
                        return null;
                    }

                    return ret.join("&");
                }
1229667
private function getCurrentClassName(Context $context)
    {
        $class = null;
        /** @var PropertyMetadata $metadata */
        if (null !== ($metadata = $context->getMetadataStack()->top())) {
            if ($metadata->class) {
                $class = $metadata->class;
            }
        }

        return $class;
    }
988826
private Object getPropertyObject(String variable, EvaluationContext context, boolean ignoreWarnings, boolean useEnvironment) throws ConfigEvaluatorException {
        Object realValue = null;

        // checked if we already looked up the value
        if (context.containsValue(variable)) {
            // get it from cache
            realValue = context.getValue(variable);
        } else if (XMLConfigConstants.CFG_SERVICE_PID.equals(variable)) {
            try {
                realValue = configEvaluator.getPid(context.getConfigElement().getConfigID());
                context.putValue(XMLConfigConstants.CFG_SERVICE_PID, realValue);
            } catch (ConfigNotFoundException ex) {
                throw new ConfigEvaluatorException("Could not obtain PID for configID", ex);
            }
        } else {
            // evaluate the variable

            context.push(variable);

            realValue = lookupVariableFromRegistry(variable);

            if (realValue == null) {
                // Try checking the properties. This will pick up already evaluated attributes, including flattened config
                realValue = context.getProperties().get(variable);

                if (realValue == null) {
                    // check if this is an metatype attribute
                    ExtendedAttributeDefinition attributeDef = context.getAttributeDefinition(variable);
                    if (attributeDef != null) {

                        String currentAttribute = context.getAttributeName();
                        // Get the nested info here, then set it later so that evaluating the
                        // metatype attribute here doesn't affect it
                        Set<NestedInfo> nestedInfo = context.getNestedInfo();
                        String flatPrefix = "";
                        try {
                            realValue = configEvaluator.evaluateMetaTypeAttribute(variable, context, attributeDef, flatPrefix, ignoreWarnings);
                        } finally {
                            context.setAttributeName(currentAttribute);
                            context.setNestedInfo(nestedInfo);
                        }

                    } else {
                        // check if this is just an attribute
                        ConfigElement configElement = context.getConfigElement();
                        Object rawValue = configElement.getAttribute(variable);
                        if (rawValue != null) {

                            String currentAttribute = context.getAttributeName();
                            Set<NestedInfo> nestedInfo = context.getNestedInfo();
                            try {
                                realValue = configEvaluator.evaluateSimpleAttribute(variable, rawValue, context, "", ignoreWarnings);
                            } finally {
                                context.setAttributeName(currentAttribute);
                                context.setNestedInfo(nestedInfo);
                            }

                        }
                    }
                }

                if (realValue == null) {
                    // Check if this variable points to an unevaluated flattened config
                    Map<String, ExtendedAttributeDefinition> attributeMap = context.getAttributeMap();
                    if (attributeMap != null) {
                        for (Map.Entry<String, ExtendedAttributeDefinition> entry : attributeMap.entrySet()) {
                            if (!context.isProcessed(entry.getKey()) && entry.getValue().isFlat()) {
                                try {
                                    configEvaluator.evaluateMetaTypeAttribute(entry.getKey(), context, entry.getValue(), "", true);
                                } catch (ConfigEvaluatorException ex) {
                                    // Ignore -- errors should be generated during main line processing
                                }

                            }

                        }
                        // Try again now that everything should be evaluated
                        realValue = context.getProperties().get(variable);
                    }
                }

                // Try to get an environment variable ( env.MYVAR )
                if (realValue == null && useEnvironment) {
                    realValue = lookupEnvironmentVariable(variable);
                }

                // Try to get a default value (<variable name="var" default="defaultValue"/>)
                if (realValue == null) {
                    realValue = lookupDefaultVariable(variable);
                }

                if (realValue == null) {
                    // If the value is null, add it to the context so that we don't try to evaluate it again.
                    // If the value is not null here, this is a variable that points to a configuration attribute,
                    // so we don't want to add it to the variable registry.
                    context.addDefinedVariable(variable, null);
                }
            } else {
                // Only add the variable to the context if this is a user defined variable
                context.addDefinedVariable(variable, realValue);
            }

            context.pop();

            context.putValue(variable, realValue);
        }

        return realValue;
    }
1214432
static <K, V> void nullifyExpirable(ReferenceEntry<K, V> nulled) {
    ReferenceEntry<K, V> nullEntry = nullEntry();
    nulled.setNextExpirable(nullEntry);
    nulled.setPreviousExpirable(nullEntry);
  }