
Originariamente Scritto da
andrea.paiola
informazioni che passi al compilatore
Ma non solo, sono informazioni che tramite reflection puoi leggere in qualsiasi punto del tuo applicativo.
Puoi ad esempio crearne di proprie per aggiungere informazioni aggiuntive sui POJO per descrivere come devono essere eseguite determinate operazioni.
Un esempio di alcune annotazioni test che sto usando:
Codice:
@MansydisDriverInfo(author = "Antonio", description = "TestDriver is a test driver to test annotations", version = "1.0")
public class TestDriver {
@MansydisDriverMethodInfo(author = "Antonio", description = "1 Test Methods to test annotations", sinceVersion = "1.0")
public void CMDtest() {
}
@MansydisDriverMethodInfo(author = "Antonio", description = "2 Test Methods to test annotations", sinceVersion = "1.0")
public void CMDtest(String a, int b, List<Integer> c) {
}
}
Segnalibri