/* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   DeclareAtTypeDeclaration result = new DeclareAtTypeDeclaration(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc()));
   result.setPatternNode((PatternNode) ASTNode.copySubtree(target, getPatternNode()));
   result.setAnnotationName((SimpleName) ASTNode.copySubtree(target, getAnnotationName()));
   return result;
 }
 @Override
 ASTNode clone0(AST target) {
   final Expression className = ASTNode.copySubtree(target, getClassName());
   final Identifier constant = ASTNode.copySubtree(target, getConstant());
   final StaticConstantAccess result =
       new StaticConstantAccess(getStart(), getEnd(), target, className, constant);
   return result;
 }
Example #3
0
 @Override
 ASTNode clone0(AST target) {
   final VariableBase left = ASTNode.copySubtree(target, getLeftHandSide());
   final Expression right = ASTNode.copySubtree(target, getRightHandSide());
   final Assignment result =
       new Assignment(this.getStart(), this.getEnd(), target, left, this.getOperator(), right);
   return result;
 }
  @Override
  ASTNode clone0(AST target) {
    final Block body = ASTNode.copySubtree(target, getBody());
    final int modifier = getModifier();
    final Identifier name = ASTNode.copySubtree(target, getName());

    final TraitDeclaration result =
        new TraitDeclaration(
            getStart(), getEnd(), target, modifier, name, getName(), interfaces(), body);
    return result;
  }
Example #5
0
 @Override
 ASTNode clone0(AST target) {
   final Expression condition = ASTNode.copySubtree(target, this.getCondition());
   final Expression ifTrue = ASTNode.copySubtree(target, this.getIfTrue());
   final Expression ifFalse = ASTNode.copySubtree(target, this.getIfTrue());
   if (this.operatorType == OP_TERNARY) {
     return new ConditionalExpression(
         this.getStart(), this.getEnd(), target, condition, ifTrue, ifFalse);
   } else {
     return new ConditionalExpression(this.getStart(), this.getEnd(), target, condition, ifTrue);
   }
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   TypeDeclaration result = new TypeDeclaration(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.setJavadoc((JSdoc) ASTNode.copySubtree(target, getJavadoc()));
   if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
     result.internalSetModifiers(getModifiers());
     result.setSuperclass((Name) ASTNode.copySubtree(target, getSuperclass()));
   }
   result.setName((SimpleName) getName().clone(target));
   if (this.ast.apiLevel >= AST.JLS3) {
     result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
     result.setSuperclassType((Type) ASTNode.copySubtree(target, getSuperclassType()));
   }
   result.bodyDeclarations().addAll(ASTNode.copySubtrees(target, bodyDeclarations()));
   return result;
 }
Example #7
0
 @Override
 ASTNode clone0(AST target) {
   final Expression clone = ASTNode.copySubtree(target, this.getExpression());
   final CastExpression result =
       new CastExpression(this.getStart(), this.getEnd(), target, clone, this.getCastingType());
   return result;
 }
 @Override
 ASTNode clone0(AST target) {
   final Expression expr = ASTNode.copySubtree(target, getExpression());
   final ContinueStatement result =
       new ContinueStatement(this.getStart(), this.getEnd(), target, expr);
   return result;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   ClassInstanceCreation result = new ClassInstanceCreation(target);
   result.setSourceRange(getStartPosition(), getLength());
   result.setExpression((Expression) ASTNode.copySubtree(target, getExpression()));
   if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
     result.setName((Name) getName().clone(target));
   }
   if (this.ast.apiLevel >= AST.JLS3) {
     result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
     result.setType((Type) getType().clone(target));
   }
   result.arguments().addAll(ASTNode.copySubtrees(target, arguments()));
   result.setAnonymousClassDeclaration(
       (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration()));
   return result;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   BreakStatement result = new BreakStatement(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.copyLeadingComment(this);
   result.setLabel((SimpleName) ASTNode.copySubtree(target, getLabel()));
   return result;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   SuperMethodReference result = new SuperMethodReference(target);
   result.setSourceRange(getStartPosition(), getLength());
   result.setName((SimpleName) getName().clone(target));
   result.setQualifier((Name) ASTNode.copySubtree(target, getQualifier()));
   result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
   return result;
 }
Example #12
0
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   TryStatement result = new TryStatement(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.copyLeadingComment(this);
   result.setBody((Block) getBody().clone(target));
   result.catchClauses().addAll(ASTNode.copySubtrees(target, catchClauses()));
   result.setFinally((Block) ASTNode.copySubtree(target, getFinally()));
   return result;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   InvariantDeclaration result = new InvariantDeclaration(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.preDDocs.addAll(ASTNode.copySubtrees(target, preDDocs()));
   result.modifiers.addAll(ASTNode.copySubtrees(target, modifiers()));
   result.setBody((Block) getBody().clone(target));
   result.setPostDDoc((DDocComment) ASTNode.copySubtree(target, getPostDDoc()));
   return result;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   SuperMethodInvocation result = new SuperMethodInvocation(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.setName((SimpleName) getName().clone(target));
   result.setQualifier((Name) ASTNode.copySubtree(target, getQualifier()));
   if (this.ast.apiLevel >= AST.JLS3) {
     result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
   }
   result.arguments().addAll(ASTNode.copySubtrees(target, arguments()));
   return result;
 }
Example #15
0
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   Initializer result = new Initializer(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
     result.internalSetModifiers(getModifiers());
   }
   if (this.ast.apiLevel >= AST.JLS3) {
     result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
   }
   result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc()));
   result.setBody((Block) getBody().clone(target));
   return result;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   PointcutDeclaration result = new PointcutDeclaration(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc()));
   if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
     result.internalSetModifiers(getModifiers());
   }
   if (this.ast.apiLevel >= AST.JLS3) {
     result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
   }
   result.setName((SimpleName) getName().clone(target));
   if (getDesignator() != null) {
     result.setDesignator((PointcutDesignator) getDesignator().clone(target));
   }
   result.parameters().addAll(ASTNode.copySubtrees(target, parameters()));
   return result;
 }