Re: How to get the type of the variable?
Lars Kühne <[email protected]> Thu, 19 Mar 2009 20:24:57 +0100
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Please make sure you at least CC the list, that way others will be able to chime in and help you while I have other things on my todo list. Is it possible to traverse through the whole tree?For Example > A > B > C > > B is C's parent > A is B's parent > > I am at C.I can get B,by calling C.getParent(); // assuming C is of type > DetailAst > But when i try to call getParent() for B ,i am getting > NullPointerException. > What to do?I have to reach A and may be even parent of A and so on. > Please Help. > Thanks a lot. > That should not happen, and checkstyle's own code does this everywhere. Examples are in ScopeUtils, or in DoubleCheckedLockingCheck.getLowestParent(). Can you post an example input file and tell us which nodes you are talking about? Regards, Lars ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user