I have a simple marker annotation for methods (similar to the first example in Item 35 in Effective Java (2nd ed)):
/**
* Marker annotation for met
You should probably take a look at the open source Reflections library. With it you can easily achieve what you want with few lines of code:
Reflections reflections = new Reflections(
new ConfigurationBuilder().setUrls(
ClasspathHelper.forPackage( "com.acme.installer" ) ).setScanners(
new MethodAnnotationsScanner() ) );
Set methods = reflections.getMethodsAnnotatedWith(InstallerMethod.class);