public function setValue($value){

        $returnValue = false;

        if(!is_null($value)){
            try{
                $value = new static::$type($value);
                if(!is_null($value)){
                    $this->value = $value;
                    $returnValue = true;
                }
            }catch(DatatypeException $de){
                $type = '('.gettype($value).')';
                if($type == 'object'){
                    $type .= '('.get_class($value).')';
                }
                throw new AttributeException('Cannot assign the value to attribute: '.static::$name.' -> '.$type.' '.$value);
            }
        }

        return $returnValue;
    }