java - Display tooltip with object name and method associated using reflection? -


i'd add feature debug mode of programme i've taken over.

what want able add tooltips buttons, tables on gui display in them:

class:  jbutton name:   myshineybutton method: myshineybuttonactivatemethod 

i know general form using reflection of so:

for(fields bits: this.getclass().getdeclaredfields){     if(bits instanceof component){         string methodname = bits.getmethod().tostring();         ....     } } 

but how add tooltip each item on gui?

you may want aspect-oriented programming (aop) tool, such aspectj. can examine/modify object after returning call constructor. concrete example, aspect, cited here, detects edt rule violations. more examples may found here.


Comments