/**
* Adds a property to the definition
*
* @param ClassProperty $property
* @throws CompilerException
*/
public function addProperty(ClassProperty $property)
{
if (isset($this->properties[$property->getName()])) {
throw new CompilerException("Property '" . $property->getName() . "' was defined more than one time", $property->getOriginal());
}
$this->properties[$property->getName()] = $property;
}