You can resolve() the argument to find out the type. 

ie. ResolvedNode resolved = context.resolve(arg);
Then look at the type of the ResolvedNode to find out more about the 
constant. i.e the packagename and the type information can be looked up. 
In this case, it could be a ResolvedField. You can check this with an 
instanceof and then ensure that it matches a certain expected field.

-- Nagesh

On Friday, November 6, 2015 at 1:23:58 PM UTC-8, Jing Sun wrote:
>
> Hi All,
>
>
> I got getApplicableConstructorTypes  and visitConstructor pair working to 
> catch the the constructor usages.
>
> How can I check the String value passed in a constructor as an argument is 
> a certain String constant?
>
> Is Detector.JavaScanner the right one to use or the ClassScanner?
>
>
> Thanks,
> Jing 
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to