public function updateMethod(ClassMethod $method, $statement = null)
{
$methodName = strtolower($method->getName());
if (!isset($this->methods[$methodName])) {
throw new CompilerException("Method '" . $method->getName() . "' does not exist", $statement);
}
$this->methods[$methodName] = $method;
}