src/share/classes/com/sun/tools/javac/tree/TreeCopier.java

Print this page




 318 
 319     public JCTree visitThrow(ThrowTree node, P p) {
 320         JCThrow t = (JCThrow) node;
 321         JCTree expr = copy(t.expr, p);
 322         return M.at(t.pos).Throw(expr);
 323     }
 324 
 325     public JCTree visitCompilationUnit(CompilationUnitTree node, P p) {
 326         JCCompilationUnit t = (JCCompilationUnit) node;
 327         List<JCAnnotation> packageAnnotations = copy(t.packageAnnotations, p);
 328         JCExpression pid = copy(t.pid, p);
 329         List<JCTree> defs = copy(t.defs, p);
 330         return M.at(t.pos).TopLevel(packageAnnotations, pid, defs);
 331     }
 332 
 333     public JCTree visitTry(TryTree node, P p) {
 334         JCTry t = (JCTry) node;
 335         JCBlock body = copy(t.body, p);
 336         List<JCCatch> catchers = copy(t.catchers, p);
 337         JCBlock finalizer = copy(t.finalizer, p);
 338         return M.at(t.pos).Try(body, catchers, finalizer);

 339     }
 340 
 341     public JCTree visitParameterizedType(ParameterizedTypeTree node, P p) {
 342         JCTypeApply t = (JCTypeApply) node;
 343         JCExpression clazz = copy(t.clazz, p);
 344         List<JCExpression> arguments = copy(t.arguments, p);
 345         return M.at(t.pos).TypeApply(clazz, arguments);
 346     }
 347 
 348     public JCTree visitDisjointType(DisjointTypeTree node, P p) {
 349         JCTypeDisjoint t = (JCTypeDisjoint) node;
 350         List<JCExpression> components = copy(t.components, p);
 351         return M.at(t.pos).TypeDisjoint(components);
 352     }
 353 
 354     public JCTree visitArrayType(ArrayTypeTree node, P p) {
 355         JCArrayTypeTree t = (JCArrayTypeTree) node;
 356         JCExpression elemtype = copy(t.elemtype, p);
 357         return M.at(t.pos).TypeArray(elemtype);
 358     }




 318 
 319     public JCTree visitThrow(ThrowTree node, P p) {
 320         JCThrow t = (JCThrow) node;
 321         JCTree expr = copy(t.expr, p);
 322         return M.at(t.pos).Throw(expr);
 323     }
 324 
 325     public JCTree visitCompilationUnit(CompilationUnitTree node, P p) {
 326         JCCompilationUnit t = (JCCompilationUnit) node;
 327         List<JCAnnotation> packageAnnotations = copy(t.packageAnnotations, p);
 328         JCExpression pid = copy(t.pid, p);
 329         List<JCTree> defs = copy(t.defs, p);
 330         return M.at(t.pos).TopLevel(packageAnnotations, pid, defs);
 331     }
 332 
 333     public JCTree visitTry(TryTree node, P p) {
 334         JCTry t = (JCTry) node;
 335         JCBlock body = copy(t.body, p);
 336         List<JCCatch> catchers = copy(t.catchers, p);
 337         JCBlock finalizer = copy(t.finalizer, p);
 338         List<JCTree> resources = copy(t.resources, p);
 339         return M.at(t.pos).Try(body, catchers, finalizer, resources);
 340     }
 341 
 342     public JCTree visitParameterizedType(ParameterizedTypeTree node, P p) {
 343         JCTypeApply t = (JCTypeApply) node;
 344         JCExpression clazz = copy(t.clazz, p);
 345         List<JCExpression> arguments = copy(t.arguments, p);
 346         return M.at(t.pos).TypeApply(clazz, arguments);
 347     }
 348 
 349     public JCTree visitDisjointType(DisjointTypeTree node, P p) {
 350         JCTypeDisjoint t = (JCTypeDisjoint) node;
 351         List<JCExpression> components = copy(t.components, p);
 352         return M.at(t.pos).TypeDisjoint(components);
 353     }
 354 
 355     public JCTree visitArrayType(ArrayTypeTree node, P p) {
 356         JCArrayTypeTree t = (JCArrayTypeTree) node;
 357         JCExpression elemtype = copy(t.elemtype, p);
 358         return M.at(t.pos).TypeArray(elemtype);
 359     }