protected function getPluginAnnotationProperties($pluginAnnotationClass)
    {
        // Get a reflection class for the annotation class.
        // Each property of the annotation class describes a property for the
        // plugin annotation.
        $annotationReflection = new \ReflectionClass($pluginAnnotationClass);
        $propertiesReflection = $annotationReflection->getProperties(\ReflectionProperty::IS_PUBLIC);

        $pluginProperties = [];
        $annotationPropertyMetadata = [];

        foreach ($propertiesReflection as $propertyReflection) {
            $annotationPropertyMetadata['name'] = $propertyReflection->name;

            $propertyDocblock = $propertyReflection->getDocComment();
            $propertyDocblockLines = explode("\n", $propertyDocblock);
            foreach ($propertyDocblockLines as $line) {
                if (substr($line, 0, 3) == '/**') {
                    continue;
                }

                // Take the first actual docblock line to be the description.
                if (!isset($annotationPropertyMetadata['description']) && substr($line, 0, 5) == '   * ') {
                    $annotationPropertyMetadata['description'] = substr($line, 5);
                }

                // Look for a @var token, to tell us the type of the property.
                if (substr($line, 0, 10) == '   * @var ') {
                    $annotationPropertyMetadata['type'] = substr($line, 10);
                }
            }

            $pluginProperties[$propertyReflection->name] = $annotationPropertyMetadata;
        }

        return $pluginProperties;
    }