In TestNG, you can specify a class (or classes) that implements IMethodSelector with a priority. The class is then used to accept or reject test methods before any test execution occurs. You must specify method selectors in the testng.xml file.
Here is an example element that is a child of the 'test' element:
<method-selectors>
<method-selector>
<selector-class name="classLevelFacts.withAttributes.SpecialTypeMethodSelector" priority="15"/>
</method-selector>
</method-selectors>
Ideally I would be able to specify a selector-class and priority for my default TestNG run configuration. (I can imagine choosing it from IMethodSelectors in my project.) It would be used in any automatically-generated TestNG run configuration, which would then put the necessary bits in the temporary testng.xml file created. For my uses, a single selector-class would suffice. Note that TestNG accepts any number of selector-classes, as well as beanshell script fragments as method-selectors.
Another way to support this and other TestNG xml-only configurations is to allow users to specify or define an xml template. The plugin would then only replace the relevant bits when generating the temp XML file for each run.