KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > terracotta > dso > CompilationUnitVisitor


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
3  * notice. All rights reserved.
4  */

5 package org.terracotta.dso;
6
7 import org.eclipse.core.resources.IMarker;
8 import org.eclipse.core.resources.IProject;
9 import org.eclipse.core.resources.IResource;
10 import org.eclipse.core.resources.IResourceRuleFactory;
11 import org.eclipse.core.resources.IWorkspace;
12 import org.eclipse.core.resources.IWorkspaceRunnable;
13 import org.eclipse.core.resources.ResourcesPlugin;
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.core.runtime.jobs.ISchedulingRule;
17 import org.eclipse.jdt.core.ICompilationUnit;
18 import org.eclipse.jdt.core.IMethod;
19 import org.eclipse.jdt.core.IType;
20 import org.eclipse.jdt.core.JavaModelException;
21 import org.eclipse.jdt.core.dom.AST;
22 import org.eclipse.jdt.core.dom.ASTNode;
23 import org.eclipse.jdt.core.dom.ASTParser;
24 import org.eclipse.jdt.core.dom.ASTVisitor;
25 import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
26 import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;
27 import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
28 import org.eclipse.jdt.core.dom.ArrayAccess;
29 import org.eclipse.jdt.core.dom.ArrayCreation;
30 import org.eclipse.jdt.core.dom.ArrayInitializer;
31 import org.eclipse.jdt.core.dom.ArrayType;
32 import org.eclipse.jdt.core.dom.AssertStatement;
33 import org.eclipse.jdt.core.dom.Assignment;
34 import org.eclipse.jdt.core.dom.Block;
35 import org.eclipse.jdt.core.dom.BlockComment;
36 import org.eclipse.jdt.core.dom.BooleanLiteral;
37 import org.eclipse.jdt.core.dom.BreakStatement;
38 import org.eclipse.jdt.core.dom.CastExpression;
39 import org.eclipse.jdt.core.dom.CatchClause;
40 import org.eclipse.jdt.core.dom.CharacterLiteral;
41 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
42 import org.eclipse.jdt.core.dom.CompilationUnit;
43 import org.eclipse.jdt.core.dom.ConditionalExpression;
44 import org.eclipse.jdt.core.dom.ConstructorInvocation;
45 import org.eclipse.jdt.core.dom.ContinueStatement;
46 import org.eclipse.jdt.core.dom.DoStatement;
47 import org.eclipse.jdt.core.dom.EmptyStatement;
48 import org.eclipse.jdt.core.dom.EnhancedForStatement;
49 import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
50 import org.eclipse.jdt.core.dom.EnumDeclaration;
51 import org.eclipse.jdt.core.dom.ExpressionStatement;
52 import org.eclipse.jdt.core.dom.FieldAccess;
53 import org.eclipse.jdt.core.dom.FieldDeclaration;
54 import org.eclipse.jdt.core.dom.ForStatement;
55 import org.eclipse.jdt.core.dom.IMethodBinding;
56 import org.eclipse.jdt.core.dom.ITypeBinding;
57 import org.eclipse.jdt.core.dom.IVariableBinding;
58 import org.eclipse.jdt.core.dom.IfStatement;
59 import org.eclipse.jdt.core.dom.ImportDeclaration;
60 import org.eclipse.jdt.core.dom.InfixExpression;
61 import org.eclipse.jdt.core.dom.Initializer;
62 import org.eclipse.jdt.core.dom.InstanceofExpression;
63 import org.eclipse.jdt.core.dom.Javadoc;
64 import org.eclipse.jdt.core.dom.LabeledStatement;
65 import org.eclipse.jdt.core.dom.LineComment;
66 import org.eclipse.jdt.core.dom.MarkerAnnotation;
67 import org.eclipse.jdt.core.dom.MemberRef;
68 import org.eclipse.jdt.core.dom.MemberValuePair;
69 import org.eclipse.jdt.core.dom.MethodDeclaration;
70 import org.eclipse.jdt.core.dom.MethodInvocation;
71 import org.eclipse.jdt.core.dom.MethodRef;
72 import org.eclipse.jdt.core.dom.MethodRefParameter;
73 import org.eclipse.jdt.core.dom.Modifier;
74 import org.eclipse.jdt.core.dom.NormalAnnotation;
75 import org.eclipse.jdt.core.dom.NullLiteral;
76 import org.eclipse.jdt.core.dom.NumberLiteral;
77 import org.eclipse.jdt.core.dom.PackageDeclaration;
78 import org.eclipse.jdt.core.dom.ParameterizedType;
79 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
80 import org.eclipse.jdt.core.dom.PostfixExpression;
81 import org.eclipse.jdt.core.dom.PrefixExpression;
82 import org.eclipse.jdt.core.dom.PrimitiveType;
83 import org.eclipse.jdt.core.dom.QualifiedName;
84 import org.eclipse.jdt.core.dom.QualifiedType;
85 import org.eclipse.jdt.core.dom.ReturnStatement;
86 import org.eclipse.jdt.core.dom.SimpleName;
87 import org.eclipse.jdt.core.dom.SimpleType;
88 import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
89 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
90 import org.eclipse.jdt.core.dom.Statement;
91 import org.eclipse.jdt.core.dom.StringLiteral;
92 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
93 import org.eclipse.jdt.core.dom.SuperFieldAccess;
94 import org.eclipse.jdt.core.dom.SuperMethodInvocation;
95 import org.eclipse.jdt.core.dom.SwitchCase;
96 import org.eclipse.jdt.core.dom.SwitchStatement;
97 import org.eclipse.jdt.core.dom.SynchronizedStatement;
98 import org.eclipse.jdt.core.dom.TagElement;
99 import org.eclipse.jdt.core.dom.TextElement;
100 import org.eclipse.jdt.core.dom.ThisExpression;
101 import org.eclipse.jdt.core.dom.ThrowStatement;
102 import org.eclipse.jdt.core.dom.TryStatement;
103 import org.eclipse.jdt.core.dom.Type;
104 import org.eclipse.jdt.core.dom.TypeDeclaration;
105 import org.eclipse.jdt.core.dom.TypeLiteral;
106 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
107 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
108 import org.eclipse.jdt.core.dom.WhileStatement;
109 import org.eclipse.jdt.core.dom.WildcardType;
110 import org.eclipse.ui.texteditor.MarkerUtilities;
111
112 import java.util.HashMap JavaDoc;
113 import java.util.Iterator JavaDoc;
114 import java.util.List JavaDoc;
115 import java.util.Map JavaDoc;
116
117 /**
118  * An Abstract Syntax Tree (AST) visitor that is used for inspecting modules
119  * for the purpose of defining Terracotta-specific annotations as for creating
120  * type summaries for use in various chooser dialogs.
121  *
122  * @see org.eclipse.jdt.core.dom.ASTVisitor
123  * @see org.eclipse.jdt.core.ICompilationUnit
124  * @see org.terracotta.dso.ConfigurationHelper
125  */

126
127 public class CompilationUnitVisitor extends ASTVisitor {
128   private IProject m_project;
129   private IResource m_res;
130   private CompilationUnit m_ast;
131   private ConfigurationHelper m_configHelper;
132   private InspectionAction m_inspector;
133
134   private static final TcPlugin m_plugin = TcPlugin.getDefault();
135   
136   private static final boolean CHECK_SYNCHRONIZED = false;
137   
138   public CompilationUnitVisitor() {
139     super();
140     m_inspector = new InspectionAction();
141   }
142   
143   protected void setup(ICompilationUnit cu)
144     throws JavaModelException,
145            CoreException
146   {
147     m_res = cu.getBuffer().getUnderlyingResource();
148     m_project = cu.getJavaProject().getProject();
149     m_configHelper = m_plugin.getConfigurationHelper(m_project);
150     m_inspector = new InspectionAction();
151   }
152   
153   public void inspect(final ICompilationUnit cu) {
154     try {
155       IWorkspace workspace = ResourcesPlugin.getWorkspace();
156
157       if(!workspace.isTreeLocked()) {
158         IResourceRuleFactory ruleFactory = workspace.getRuleFactory();
159         ISchedulingRule rule = ruleFactory.markerRule(cu.getResource());
160
161         m_inspector.setTarget(cu);
162         ResourcesPlugin.getWorkspace().run(m_inspector, rule, IWorkspace.AVOID_UPDATE, null);
163       }
164     } catch(CoreException ce) {
165       m_plugin.openError("Problem inspecting '"+cu.getElementName()+"'", ce);
166     }
167   }
168   
169   class InspectionAction implements IWorkspaceRunnable {
170     private ICompilationUnit m_target;
171     
172     void setTarget(ICompilationUnit target) {
173       m_target = target;
174     }
175     
176     public void run(IProgressMonitor monitor) throws CoreException {
177       setup(m_target);
178         
179       clearTerracottaMarkers();
180
181       ASTParser parser = ASTParser.newParser(AST.JLS3);
182       parser.setSource(m_target);
183       parser.setResolveBindings(true);
184         
185       m_ast = (CompilationUnit)parser.createAST(monitor);
186       m_ast.accept(CompilationUnitVisitor.this);
187       
188       m_configHelper.validateAll();
189     }
190   }
191   
192   public boolean visit(CompilationUnit node) {
193     return true;
194   }
195
196   public boolean visit(TypeDeclaration node) {
197     if(node.isInterface()) {
198       return false;
199     }
200     else {
201       ITypeBinding binding = node.resolveBinding();
202     
203       if(binding != null) {
204         IType type = (IType)binding.getJavaElement();
205         
206         if(type != null) {
207           String JavaDoc fullName = PatternHelper.getFullyQualifiedName(type);
208   
209           if(m_configHelper.isAdaptable(fullName)) {
210             addMarker("adaptedTypeMarker", "DSO Adapted Type", node.getName());
211           } else if(m_configHelper.isExcluded(fullName)) {
212             addMarker("excludedTypeMarker", "DSO Excluded Type", node.getName());
213           }
214         }
215         
216         Type superType = node.getSuperclassType();
217         if(superType != null) {
218           binding = superType.resolveBinding();
219           
220           if(binding != null && !binding.isPrimitive() && !binding.isTypeVariable()) {
221             type = (IType)binding.getJavaElement();
222             
223             if(type != null) {
224               String JavaDoc fullName = PatternHelper.getFullyQualifiedName(type);
225           
226               if(m_plugin.isBootClass(fullName)) {
227                 addMarker("bootJarTypeMarker", "BootJar Type", superType);
228               } else if(m_configHelper.isAdaptable(fullName)) {
229                 addMarker("adaptedTypeReferenceMarker", "DSO Instrumented Type Reference", superType);
230               } else if(m_configHelper.isExcluded(fullName)) {
231                 addMarker("excludedTypeMarker", "DSO Excluded Type", superType);
232               }
233             }
234           }
235         }
236       }
237       
238       return true;
239     }
240   }
241
242   public boolean visit(FieldDeclaration node) {
243     Type typeNode = node.getType();
244     ITypeBinding binding = typeNode.resolveBinding();
245     
246     if(binding != null && !binding.isPrimitive() && !binding.isTypeVariable()) {
247       IType type = (IType)binding.getJavaElement();
248       
249       if(type != null) {
250         String JavaDoc fullName = PatternHelper.getFullyQualifiedName(type);
251   
252         if(m_plugin.isBootClass(fullName)) {
253           addMarker("bootJarTypeMarker", "BootJar Type", typeNode);
254         } else if(m_configHelper.isAdaptable(fullName)) {
255           addMarker("adaptedTypeReferenceMarker", "DSO Instrumented Type Reference", typeNode);
256         } else if(m_configHelper.isExcluded(fullName)) {
257           addMarker("excludedTypeMarker", "DSO Excluded Type", typeNode);
258         }
259       }
260     }
261     
262     return true;
263   }
264
265   public boolean visit(MethodDeclaration node) {
266     if(m_configHelper.isAutolocked(node)) {
267       addMarker("autolockedMarker", "DSO Auto-locked Method", node.getName());
268       
269       if(!isDeclaringTypeAdaptable(node)) {
270         addProblemMarker("DeclaringTypeNotInstrumentedMarker", "Declaring type not instrumented", node.getName());
271       }
272       if(CHECK_SYNCHRONIZED && hasSynchronization(node)) {
273         addProblemMarker("ConfigProblemMarker", "Autolocked method without synchronization", node.getName());
274       }
275     } else if(m_configHelper.isNameLocked(node)) {
276       addMarker("nameLockedMarker", "DSO Name-locked Method", node.getName());
277       
278       if(!isDeclaringTypeAdaptable(node)) {
279         addProblemMarker("DeclaringTypeNotInstrumentedMarker", "Declaring type not instrumented", node.getName());
280       }
281     }
282
283     if(m_configHelper.isDistributedMethod(node)) {
284       addMarker("distributedMethodMarker", "DSO Distributed Method", node.getName());
285
286       if(!isDeclaringTypeAdaptable(node)) {
287         addProblemMarker("DeclaringTypeNotInstrumentedMarker", "Declaring type not instrumented", node.getName());
288       }
289     }
290
291     return true;
292   }
293   
294   public boolean visit(MethodInvocation node) {
295     IMethodBinding binding = node.resolveMethodBinding();
296
297     if(binding != null && binding.isConstructor()) {
298       ITypeBinding declaringType = binding.getDeclaringClass();
299       String JavaDoc fullName = declaringType.getQualifiedName();
300
301       if(m_plugin.isBootClass(fullName)) {
302         addMarker("bootJarTypeMarker", "BootJar Type", node.getName());
303       } else if(m_configHelper.isAdaptable(fullName)) {
304         addMarker("adaptedTypeReferenceMarker", "DSO Instrumented Type Reference", node.getName());
305       }
306     }
307
308     return true;
309   }
310
311   public boolean visit(ClassInstanceCreation node) {
312     Type type = node.getType();
313     ITypeBinding binding = type.resolveBinding();
314     
315     if(binding != null) {
316       String JavaDoc fullName = binding.getQualifiedName();
317   
318       if(m_plugin.isBootClass(fullName)) {
319         addMarker("bootJarTypeMarker", "BootJar Type", type);
320       } else if(m_configHelper.isAdaptable(fullName)) {
321         addMarker("adaptedTypeReferenceMarker", "DSO Instrumented Type Reference", type);
322       }
323     }
324     
325     return true;
326   }
327
328   public boolean visit(Block node) {return true;}
329   public boolean visit(SynchronizedStatement node) {return true;}
330   public boolean visit(WhileStatement node) {return true;}
331   public boolean visit(TryStatement node) {return true;}
332   public boolean visit(ForStatement node) {return true;}
333   public boolean visit(IfStatement node) {return true;}
334   public boolean visit(SwitchStatement node) {return true;}
335   public boolean visit(LabeledStatement node) {return true;}
336   public boolean visit(InstanceofExpression node) {return true;}
337   public boolean visit(Initializer node) {return true;}
338
339   public boolean visit(SingleVariableDeclaration node) {
340     IVariableBinding binding = node.resolveBinding();
341     
342     if(binding != null) {
343       if(binding.isField()) {
344         String JavaDoc parentClass = getQualifiedName(binding.getDeclaringClass());
345         String JavaDoc fieldName = parentClass+"."+binding.getName();
346   
347         if(m_configHelper.isRoot(fieldName)) {
348           addMarker("rootMarker", "DSO Root Field", node.getName());
349         } else if(m_configHelper.isTransient(fieldName)) {
350           addMarker("transientFieldMarker", "DSO Transient Field", node.getName());
351           
352           if(!m_configHelper.isAdaptable(parentClass) && !m_configHelper.declaresRoot(parentClass)) {
353             addProblemMarker("DeclaringTypeNotInstrumentedMarker", "Declaring type not instrumented", node.getName());
354           }
355         }
356       }
357       
358       if(m_plugin.isBootClass(binding.getType().getQualifiedName())) {
359         addMarker("bootJarTypeMarker", "BootJar Type", node.getType());
360       }
361     }
362     
363     return true;
364   }
365   
366   private static String JavaDoc getQualifiedName(ITypeBinding binding) {
367     String JavaDoc qname = binding.getQualifiedName();
368     
369     if(binding.isMember()) {
370       int lastDot = qname.lastIndexOf('.');
371       qname = qname.substring(0, lastDot) + '$' + qname.substring(lastDot+1);
372     }
373     
374     return qname;
375   }
376   
377   public boolean visit(VariableDeclarationFragment node) {
378     IVariableBinding binding = node.resolveBinding();
379     
380     if(binding != null) {
381       if(binding.isField()) {
382         String JavaDoc parentClass = getQualifiedName(binding.getDeclaringClass());
383         String JavaDoc fieldName = parentClass+"."+binding.getName();
384   
385         if(m_configHelper.isRoot(fieldName)) {
386           addMarker("rootMarker", "DSO Root Field", node.getName());
387         } else if(m_configHelper.isTransient(fieldName)) {
388           addMarker("transientFieldMarker", "DSO Transient Field", node.getName());
389           
390           if(!m_configHelper.isAdaptable(parentClass) && !m_configHelper.declaresRoot(parentClass)) {
391             addProblemMarker("DeclaringTypeNotInstrumentedMarker", "Declaring type not instrumented", node);
392           }
393         }
394       }
395
396       String JavaDoc typeName = binding.getType().getQualifiedName();
397       
398       if(m_plugin.isBootClass(typeName)) {
399         addMarker("bootJarTypeMarker", "BootJar Type", getType(node));
400       } else if(m_configHelper.isAdaptable(typeName)) {
401         addMarker("adaptedTypeReferenceMarker", "DSO Instrumented Type Reference", getType(node));
402       }
403     }
404     
405     return true;
406   }
407   
408   private Type getType(VariableDeclarationFragment node) {
409     ASTNode parentNode = node.getParent();
410     
411     if(parentNode instanceof FieldDeclaration) {
412       return ((FieldDeclaration)node.getParent()).getType();
413     } else if(parentNode instanceof VariableDeclarationStatement) {
414       return ((VariableDeclarationStatement)node.getParent()).getType();
415     }
416     
417     return null;
418   }
419
420   private static boolean hasSynchronization(MethodDeclaration node) {
421     if(Modifier.isSynchronized(node.getModifiers())) {
422       return true;
423     }
424     
425     Block body = node.getBody();
426     if(body != null) {
427       return hasSynchronization(body);
428     }
429     
430     return false;
431   }
432
433   private static boolean hasSynchronization(Block block) {
434     List JavaDoc statements = block.statements();
435     
436     if(statements != null) {
437       Iterator JavaDoc iter = statements.iterator();
438       
439       while(iter.hasNext()) {
440         if(hasSynchronization((Statement)iter.next())) {
441           return true;
442         }
443       }
444     }
445
446     return false;
447   }
448   
449   private static boolean hasSynchronization(Statement statement) {
450     if(statement instanceof SynchronizedStatement) {
451       return true;
452     } else if(statement instanceof Block) {
453       return hasSynchronization((Block)statement);
454     } else if(statement instanceof ForStatement) {
455       return hasSynchronization(((ForStatement)statement).getBody());
456     } else if(statement instanceof EnhancedForStatement) {
457       return hasSynchronization(((EnhancedForStatement)statement).getBody());
458     } else if(statement instanceof IfStatement) {
459       return hasSynchronization((IfStatement)statement);
460     } else if(statement instanceof WhileStatement) {
461       return hasSynchronization((WhileStatement)statement);
462     } else if(statement instanceof DoStatement) {
463       return hasSynchronization((DoStatement)statement);
464     } else if(statement instanceof TryStatement) {
465       return hasSynchronization((TryStatement)statement);
466     } else if(statement instanceof SwitchStatement) {
467       return hasSynchronization((SwitchStatement)statement);
468     }
469
470     return false;
471   }
472   
473   private static boolean hasSynchronization(IfStatement statement) {
474     Statement thenStatement = statement.getThenStatement();
475     Statement elseStatement = statement.getElseStatement();
476
477     return hasSynchronization(thenStatement) ||
478       ((elseStatement != null) && hasSynchronization(elseStatement));
479   }
480
481   private static boolean hasSynchronization(WhileStatement statement) {
482     return hasSynchronization(statement.getBody());
483   }
484
485   private static boolean hasSynchronization(DoStatement statement) {
486     return hasSynchronization(statement.getBody());
487   }
488
489   // TODO: handle catchClauses and finallyBlock
490
private static boolean hasSynchronization(TryStatement statement) {
491     return hasSynchronization(statement.getBody());
492   }
493
494   private static boolean hasSynchronization(SwitchStatement statement) {
495     List JavaDoc statements = statement.statements();
496     
497     if(statements != null) {
498       Iterator JavaDoc iter = statements.iterator();
499       
500       while(iter.hasNext()) {
501         if(hasSynchronization((Statement)iter.next())) {
502           return true;
503         }
504       }
505     }
506
507     return false;
508   }
509
510   public boolean isDeclaringTypeAdaptable(MethodDeclaration node) {
511     IMethodBinding binding = node.resolveBinding();
512     
513     if(binding != null) {
514       IMethod method = (IMethod)binding.getJavaElement();
515       
516       if(method != null) {
517         IType type = method.getDeclaringType();
518         return m_configHelper.isAdaptable(type) ||
519                m_configHelper.declaresRoot(type);
520       }
521     }
522     
523     return false;
524   }
525
526   private void addMarker(String JavaDoc markerID, String JavaDoc msg, ASTNode node) {
527     HashMap JavaDoc map = new HashMap JavaDoc();
528     int startPos = node.getStartPosition();
529     int endPos = startPos + node.getLength();
530     int line = m_ast.lineNumber(startPos);
531       
532     MarkerUtilities.setMessage(map, msg);
533     MarkerUtilities.setCharStart(map, startPos);
534     MarkerUtilities.setCharEnd(map, endPos);
535     MarkerUtilities.setLineNumber(map, line);
536     
537     createMarker(m_res, map, markerID);
538   }
539   
540   private void addProblemMarker(String JavaDoc markerID, String JavaDoc msg, ASTNode node) {
541     HashMap JavaDoc<String JavaDoc, Integer JavaDoc> map = new HashMap JavaDoc<String JavaDoc, Integer JavaDoc>();
542     int startPos = node.getStartPosition();
543     int endPos = startPos + node.getLength();
544     int line = m_ast.lineNumber(startPos);
545       
546     MarkerUtilities.setMessage(map, msg);
547     MarkerUtilities.setCharStart(map, startPos);
548     MarkerUtilities.setCharEnd(map, endPos);
549     MarkerUtilities.setLineNumber(map, line);
550     map.put(IMarker.SEVERITY, new Integer JavaDoc(IMarker.SEVERITY_WARNING));
551     
552     createMarker(m_res, map, markerID);
553   }
554
555   private void createMarker(IResource resource, Map JavaDoc attributes, String JavaDoc markerType) {
556     try {
557       MarkerUtilities.createMarker(m_res, attributes, "org.terracotta.dso."+markerType);
558     } catch(CoreException ce) {
559       ce.printStackTrace();
560     }
561   }
562   
563   protected void clearTerracottaMarkers() {
564     try {
565       m_res.deleteMarkers("org.terracotta.dso.baseMarker", true, IResource.DEPTH_ZERO);
566     } catch(Exception JavaDoc e) {/**/}
567
568     try {
569       m_res.deleteMarkers("org.terracotta.dso.ConfigProblemMarker", true, IResource.DEPTH_ZERO);
570     } catch(Exception JavaDoc e) {/**/}
571   }
572
573   public boolean visit(AnnotationTypeDeclaration node) {return false;}
574   public boolean visit(AnnotationTypeMemberDeclaration node) {return false;}
575   public boolean visit(AnonymousClassDeclaration node) {return false;}
576   public boolean visit(ArrayAccess node) {return false;}
577   public boolean visit(ArrayCreation node) {return false;}
578   public boolean visit(ArrayInitializer node) {return false;}
579   public boolean visit(ArrayType node) {return false;}
580   public boolean visit(AssertStatement node) {return false;}
581   public boolean visit(Assignment node) {return true;}
582   public boolean visit(BlockComment node) {return false;}
583   public boolean visit(BooleanLiteral node) {return false;}
584   public boolean visit(BreakStatement node) {return false;}
585   public boolean visit(CastExpression node) {return true;}
586   public boolean visit(CatchClause node) {return false;}
587   public boolean visit(CharacterLiteral node) {return false;}
588   public boolean visit(ConditionalExpression node) {return false;}
589   public boolean visit(ConstructorInvocation node) {return true;}
590   public boolean visit(ContinueStatement node) {return false;}
591   public boolean visit(DoStatement node) {return true;}
592   public boolean visit(EmptyStatement node) {return false;}
593   public boolean visit(EnhancedForStatement node) {return true;}
594   public boolean visit(EnumConstantDeclaration node) {return false;}
595   public boolean visit(EnumDeclaration node) {return false;}
596   public boolean visit(ExpressionStatement node) {return true;}
597   public boolean visit(FieldAccess node) {return false;}
598   public boolean visit(ImportDeclaration node) {return false;}
599   public boolean visit(InfixExpression node) {return false;}
600   public boolean visit(Javadoc node) {return false;}
601   public boolean visit(LineComment node) {return false;}
602   public boolean visit(MarkerAnnotation node) {return false;}
603   public boolean visit(MemberRef node) {return false;}
604   public boolean visit(MemberValuePair node) {return false;}
605   public boolean visit(MethodRef node) {return false;}
606   public boolean visit(MethodRefParameter node) {return false;}
607   public boolean visit(Modifier node) {return false;}
608   public boolean visit(NormalAnnotation node) {return false;}
609   public boolean visit(NullLiteral node) {return false;}
610   public boolean visit(NumberLiteral node) {return false;}
611   public boolean visit(PackageDeclaration node) {return false;}
612   public boolean visit(ParameterizedType node) {return false;}
613   public boolean visit(ParenthesizedExpression node) {return false;}
614   public boolean visit(PostfixExpression node) {return false;}
615   public boolean visit(PrefixExpression node) {return false;}
616   public boolean visit(PrimitiveType node) {return false;}
617   public boolean visit(QualifiedName node) {return false;}
618   public boolean visit(QualifiedType node) {return false;}
619   public boolean visit(ReturnStatement node) {return false;}
620   public boolean visit(SimpleName node) {return false;}
621   public boolean visit(SimpleType node) {return false;}
622   public boolean visit(SingleMemberAnnotation node) {return false;}
623   public boolean visit(StringLiteral node) {return false;}
624   public boolean visit(SuperConstructorInvocation node) {return false;}
625   public boolean visit(SuperFieldAccess node) {return false;}
626   public boolean visit(SuperMethodInvocation node) {return false;}
627   public boolean visit(SwitchCase node) {return false;}
628   public boolean visit(TagElement node) {return false;}
629   public boolean visit(TextElement node) {return false;}
630   public boolean visit(ThisExpression node) {return false;}
631   public boolean visit(ThrowStatement node) {return false;}
632   public boolean visit(TypeLiteral node) {return false;}
633   public boolean visit(WildcardType node) {return false;}
634 }
635
Popular Tags