java - Redirect input from annotation -


is there way can give annotation method input. use value returned pass annotation ?

public string fnc(string value){     //do    return ret; }  @target(elementtype.method) @retention(retentionpolicy.runtime) @interface manon{     string cond = fnc(cond); }  @manon(fnc("something")) //does not work @manon("something") public void foo(){ ... }  public void bar(){     //reflection call    manon = ...getdeclaredannotations()[0]    string foo = a; //may not same typed } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -