protected function getIndexesAnnotation($type = 'Index')
    {
        $indices = array();
        foreach ($this->getTableIndices() as $index) {
            switch (true) {
                case $type === 'Index' && $index->isIndex():
                case $type === 'UniqueConstraint' && $index->isUnique():
                    $columns = array();
                    foreach ($index->getColumns() as $column) {
                        $columns[] = $this->quoteIdentifier($column->getColumnName());
                    }
                    $indices[] = $this->getAnnotation($type, array('name' => $index->getName(), 'columns' => $columns));
                    break;

                default:
                    break;
            }
        }

        return count($indices) ? $indices : null;
    }