Have looked around a lot but am unable to figure out an approach or if it is even possible; here is the question, any directions/word of advice would be very helpful.
Is it possible to have a method annotation say, @TestAnnotation that could be used as follows?
@TestAnnotation(element="something" id="someId")
public void someMethod() {
AnObj anObj = id.getAnObj();
}
"someId"
is a wrapper around "AnObj"
class; 'id'
is an instance of "someId"
. And whatever is passed to 'element'
is to be accepted as a parameter or configuration element to be used in creating an instance of "someId"
and assigning it to 'id'
.
Thanks and regards