[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Get default value of field without using AST

Michael Pradel wrote:
Is there a way to get the default value of an IField using JDT Core only, i.e. without using an AST?
E.g. for
private int n = 4;
I'd like to have the "4".


Thanks,
Michael
Only if the field is a constant (IField#getConstant()).
Otherwise you will have to use an AST.