# Declaration

Declare a symbol in the program. Declaring classes, interfaces, enums, etc. Should also pass in access modifier so we can manage access

* jsx

  ```tsx
  import { Declaration } from "@alloy-js/java";


  <Declaration
    name={string | Namekey}
    nameKind={JavaElements}
    refkey={Refkey}
   />
  ```

* stc

  ```ts
  import { Declaration } from "@alloy-js/java/stc";


  Declaration({
    name: string | Namekey,
    nameKind: JavaElements,
    refkey: Refkey,
  }).children(children)
  ```

## Props

|          |                                                    |                                                   |
| -------- | -------------------------------------------------- | ------------------------------------------------- |
| children | optional [Children](../../../core/types/children/) |                                                   |
| name     | string \| [Namekey](../../../core/types/namekey/)  |                                                   |
| nameKind | optional [JavaElements](../../types/javaelements/) | The name policy kind to apply to the declaration. |
| refkey   | optional [Refkey](../../../core/types/refkey/)     |                                                   |
