public function setValue($value)
    {
        if (($value instanceof ValueGenerator) !== true) {
            $value = new ValueGenerator($value);
        }

        if ($value->isValidConstantType() !== true) {
            throw new InvalidArgumentException('Constant value is not valid (' . gettype($value->getValue()) . ' type given).');
        }

        $this->value = $value;

        return $this;
    }