Skip to content

Instantly share code, notes, and snippets.

@ThomasBurleson
Created April 18, 2011 16:22
Show Gist options
  • Save ThomasBurleson/925645 to your computer and use it in GitHub Desktop.
Save ThomasBurleson/925645 to your computer and use it in GitHub Desktop.
Swiz Metadata XML - Adapted for use in FB4 SWCs
<?xml version="1.0" encoding="utf-8"?>
<annotations version="1.0">
<metadata name="Dispatcher" description="Used to request injection of the root Swiz dispatcher (default) or the dispatcher for containing Swiz instance." >
<context name="variable" />
<context name="setter" />
<attribute name="scope" type="String" defaultValue="global" required="false" values="global,local," hint="string" />
</metadata>
<metadata name="Inject" description="Marks a dependency that should be injected by Swiz" >
<context name="variable" />
<context name="setter" />
<attribute name="source" type="String" defaultValue="" required="false" />
<attribute name="destination" type="String" defaultValue="" required="false" />
<attribute name="twoWay" type="Boolean" defaultValue="false" required="false" />
<attribute name="required" type="Boolean" defaultValue="true" required="false" />
<attribute name="bind" type="Boolean" defaultValue="true" required="false" />
</metadata>
<metadata name="EventHandler" description="Marks a method as a system event handler" >
<context name="method" />
<attribute name="event" type="Class" defaultValue="" required="true" />
<attribute name="properties" type="String" defaultValue="" required="false" />
<attribute name="priority" type="Number" defaultValue="" required="false" />
<attribute name="useCapture" type="Boolean" defaultValue="false" required="false" />
<attribute name="scope" type="String" defaultValue="global" required="false" values="global,local," hint="string" />
<attribute name="stopPropagation" type="Boolean" defaultValue="false" required="false" />
<attribute name="stopImmediatePropagation" type="Boolean" defaultValue="false" required="false" />
</metadata>
<metadata name="PostConstruct" description="Decorated method will be called once all injections have been made" >
<context name="method" />
</metadata>
<metadata name="PreDestroy" description="Decorated method will be called in response to tearDownEvent as specified in SwizConfig" >
<context name="method" />
</metadata>
<metadata name="Log" description="Marks a property in which an ILogger reference should be injected" >
<context name="variable" />
<context name="setter" />
</metadata>
<metatag name="DeepLink" description="Marks a method that should be invoked with the Browser URL changes" >
<context name="method" />
<attribute name="title" type="String" defaultValue="" required="false" />
<attribute name="url" type="String" defaultValue="" required="true" />
</metatag>
</annotations>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment