/* (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) {
   TypeParameter result = new TypeParameter(target);
   result.setSourceRange(getStartPosition(), getLength());
   if (this.ast.apiLevel >= AST.JLS8) {
     result.annotations().addAll(ASTNode.copySubtrees(target, annotations()));
   }
   result.setName((SimpleName) ((ASTNode) getName()).clone(target));
   result.typeBounds().addAll(ASTNode.copySubtrees(target, typeBounds()));
   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;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   VariableDeclarationExpression result = new VariableDeclarationExpression(target);
   result.setSourceRange(getStartPosition(), getLength());
   if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
     result.setModifiers(getModifiers());
   }
   if (this.ast.apiLevel >= AST.JLS3_INTERNAL) {
     result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
   }
   result.setType((Type) getType().clone(target));
   result.fragments().addAll(ASTNode.copySubtrees(target, fragments()));
   return result;
 }
 /* (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;
 }
 /* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   TagElement result = new TagElement(target);
   result.setSourceRange(getStartPosition(), getLength());
   result.setTagName(getTagName());
   result.fragments().addAll(ASTNode.copySubtrees(target, fragments()));
   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;
 }
示例#8
0
 /*
  * (omit javadoc for this method) Method declared on ASTNode.
  */
 protected ASTNode clone0(AST target) {
   final List segments = ASTNode.copySubtrees(target, segments());
   final boolean global = isGlobal();
   final boolean current = isCurrent();
   final NamespaceName result =
       new NamespaceName(this.getStart(), this.getEnd(), target, segments, global, current);
   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;
 }
 /* (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;
 }
示例#11
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) {
   InfixExpression result = new InfixExpression(target);
   result.setSourceRange(getStartPosition(), getLength());
   result.setOperator(getOperator());
   result.setLeftOperand((Expression) getLeftOperand().clone(target));
   result.setRightOperand((Expression) getRightOperand().clone(target));
   if (this.extendedOperands != null) {
     // be careful not to trigger lazy creation of list
     result.extendedOperands().addAll(ASTNode.copySubtrees(target, extendedOperands()));
   }
   return result;
 }
示例#13
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;
 }
 /* (non-Javadoc)
  * @see org.eclipse.wst.jsdt.core.dom.ASTNode#clone0(org.eclipse.wst.jsdt.core.dom.AST)
  */
 @Override
 ASTNode clone0(AST target) {
   ExportDeclaration result = new ExportDeclaration(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.setDefault(isDefault());
   result.setAll(isAll());
   if (getDeclaration() != null) {
     result.setDeclaration((ProgramElement) getDeclaration().clone(target));
   }
   result.setSource((StringLiteral) getSource().clone(target));
   result.specifiers.addAll(ASTNode.copySubtrees(target, specifiers()));
   return result;
 }