Javac Tree API suggestions to more closely model source code

Jonathan Gibbons jonathan.gibbons at
Tue Sep 30 18:24:57 UTC 2014

On 09/29/2014 06:19 PM, Harry Terkelsen wrote:
> Cannot tell if an argument VariableTree is varargs. This required 
> casting to JCTree, which feels hacky:
>       JCModifiers mods = (JCModifiers) node.getModifiers();
>       return (mods.flags & VARARGS) != 0;

varargs-ness is a property of an executable element, not of a variable 

The method you are looking for is

-- Jon

More information about the compiler-dev mailing list