# Annotation Interface DeclareRoles

@Documented @Target(TYPE) @Retention(RUNTIME) public @interface DeclareRoles
Declares that role names used in security constraints for the annotated enterprise bean should be treated as declared roles. When this annotation is present, the container must create any roles referenced in security constraints that are not explicitly defined in the deployment descriptor.

Since:
  Common Annotations 1.0

## Required Element Summary

Required Elements
Modifier and Type
Required Element
Description
`String[]`
`value`
Specifies the declared role names that should be recognized by the container.

## Element Details

### value

String[] value
Specifies the declared role names that should be recognized by the container. These roles may be referenced in security constraints without being explicitly defined in the deployment descriptor.

Returns:
  the array of declared role names