public static function build(array $pointer, array $context)
    {
        if (array_key_exists('value', $pointer)) {
            return $pointer['value'];
        }
        if (!empty($pointer['classname'])) {
            $classname = NameResolver::resolve($pointer['classname'], $context);
            return self::buildByClassname($classname, $pointer, $context);
        }
        if (!empty($pointer['creator'])) {
            return Callback::call($pointer['creator'], [$pointer, $context]);
        }
        if (!empty($context['classname'])) {
            return self::buildByClassname($context['classname'], $pointer, $context);
        }
        if (!empty($context['creator'])) {
            return Callback::call($context['creator'], [$pointer, $context]);
        }
        throw new InvalidPointer('');
    }