...
Flex uses metadata tags to define elements of a component. ASDoc recognizes these metadata tags and treats them as if there were properties or method definitions. The metadata tags recognized by ASDoc include:
\[Bindable]unmigrated-wiki-markupWiki Markup - \[DefaultProperty]
\[Effect]Wiki Markup Wiki Markup - \[Event]unmigrated-wiki-markup
- \[Style]
Documenting bindable properties
unmigrated-wiki-markupA bindable property is any property that can be used as the source of a data binding expression. To mark a property as bindable, you insert the \ [Bindable] metadata tag before the property definition, or before the class definition to make all properties defined within the class bindable.
When a property is defined as bindable, ASDoc automatically adds the following line to the output for the property:
...
Documenting default properties
unmigrated-wiki-markupThe \ [DefaultProperty] metadata tag defines the name of the default property of the component when you use the component in an MXML file.unmigrated-wiki-markup
When ASDoc encounters the \ [DefaultProperty] metadata tag, it automatically adds a line to the class description that specifies the default property. For example, see the List control in Apache Flex Language Reference.
Documenting effects, events, and styles
unmigrated-wiki-markupYou use metadata tags to add information about effects, events, and styles in a class definition. The \ [Effect], \ [Event], and \ [Style] metadata tags typically appear at the top of the class definition file. To document the metadata tags, insert an ASDoc comment before the metadata tag, as the following example shows:
Code Block | ||||
---|---|---|---|---|
| ||||
/** * Defines the name style. */ [Style "name"] |
...
The ASDoc tool does several things for this event:
...
- In the output for the mx.controls.Button class, ASDoc creates a link to the event class that is specified by the type argument of the \ [Event] metadata tag.
- ASDoc copies the description of the mx.events.FlexEvent.BUTTON_DOWN constant to the description of the buttonDown event in the Button class.
...