class_exists(Attributes::
class);
class_exists(NamedArgumentConstructor::
class);
} $class =
new ReflectionClass($name);
$docComment =
$class->
getDocComment();
// Sets default values for annotation metadata
$constructor =
$class->
getConstructor();
$metadata =
[ 'default_property' => null,
'has_constructor' =>
$constructor !== null &&
$constructor->
getNumberOfParameters() > 0,
'constructor_args' =>
[],
'properties' =>
[],
'property_types' =>
[],
'attribute_types' =>
[],
'targets_literal' => null,
'targets' => Target::TARGET_ALL,
'is_annotation' =>
strpos($docComment, '@Annotation'
) !== false,
];
$metadata['has_named_argument_constructor'
] =
$metadata['has_constructor'
] &&
$class->
implementsInterface(NamedArgumentConstructorAnnotation::
class);