/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert a type declaration * (<code>TypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public TypeDeclarationStatement newTypeDeclarationStatement(TypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); result.setDeclaration(decl); return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert a type declaration * (<code>TypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public TypeDeclarationStatement newTypeDeclarationStatement(TypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); result.setDeclaration(decl); return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert a type declaration * (<code>TypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public TypeDeclarationStatement newTypeDeclarationStatement(TypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); result.setDeclaration(decl); return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert a type declaration * (<code>TypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public TypeDeclarationStatement newTypeDeclarationStatement(TypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); result.setDeclaration(decl); return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert a type declaration * (<code>TypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public TypeDeclarationStatement newTypeDeclarationStatement(TypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); result.setDeclaration(decl); return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert a type declaration * (<code>TypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public TypeDeclarationStatement newTypeDeclarationStatement(TypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); result.setDeclaration(decl); return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert any kind of type declaration * (<code>AbstractTypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> * @since 3.0 */ public TypeDeclarationStatement newTypeDeclarationStatement(AbstractTypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); if (this.apiLevel == AST.JLS2) { result.internalSetTypeDeclaration((TypeDeclaration) decl); } if (this.apiLevel >= AST.JLS3) { result.setDeclaration(decl); } return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert any kind of type declaration * (<code>AbstractTypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> * @since 3.0 */ public TypeDeclarationStatement newTypeDeclarationStatement(AbstractTypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); if (this.apiLevel == AST.JLS2) { result.internalSetTypeDeclaration((TypeDeclaration) decl); } if (this.apiLevel >= AST.JLS3) { result.setDeclaration(decl); } return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert any kind of type declaration * (<code>AbstractTypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> * @since 3.0 */ public TypeDeclarationStatement newTypeDeclarationStatement(AbstractTypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); if (this.apiLevel == AST.JLS2) { result.internalSetTypeDeclaration((TypeDeclaration) decl); } if (this.apiLevel >= AST.JLS3) { result.setDeclaration(decl); } return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert any kind of type declaration * (<code>AbstractTypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> * @since 3.0 */ public TypeDeclarationStatement newTypeDeclarationStatement(AbstractTypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); if (this.apiLevel == AST.JLS2) { result.internalSetTypeDeclaration((TypeDeclaration) decl); } if (this.apiLevel >= AST.JLS3) { result.setDeclaration(decl); } return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert any kind of type declaration * (<code>AbstractTypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> * @since 3.0 */ public TypeDeclarationStatement newTypeDeclarationStatement(AbstractTypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); if (this.apiLevel == AST.JLS2) { result.internalSetTypeDeclaration((TypeDeclaration) decl); } if (this.apiLevel >= AST.JLS3) { result.setDeclaration(decl); } return result; }
/** * Creates a new unparented local type declaration statement node * owned by this AST, for the given type declaration. * <p> * This method can be used to convert any kind of type declaration * (<code>AbstractTypeDeclaration</code>) into a statement * (<code>Statement</code>) by wrapping it. * </p> * * @param decl the type declaration * @return a new unparented local type declaration statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> * @since 3.0 */ public TypeDeclarationStatement newTypeDeclarationStatement(AbstractTypeDeclaration decl) { TypeDeclarationStatement result = new TypeDeclarationStatement(this); if (this.apiLevel == AST.JLS2) { result.internalSetTypeDeclaration((TypeDeclaration) decl); } if (this.apiLevel >= AST.JLS3) { result.setDeclaration(decl); } return result; }
ASTNode clone0(AST target) { TypeDeclarationStatement result = new TypeDeclarationStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setDeclaration( (AbstractTypeDeclaration) getDeclaration().clone(target)); return result; }
@Override ASTNode clone0(AST target) { TypeDeclarationStatement result = new TypeDeclarationStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setDeclaration( (AbstractTypeDeclaration) getDeclaration().clone(target)); return result; }
ASTNode clone0(AST target) { TypeDeclarationStatement result = new TypeDeclarationStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setDeclaration( (AbstractTypeDeclaration) getDeclaration().clone(target)); return result; }
ASTNode clone0(AST target) { TypeDeclarationStatement result = new TypeDeclarationStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setDeclaration( (AbstractTypeDeclaration) getDeclaration().clone(target)); return result; }
ASTNode clone0(AST target) { TypeDeclarationStatement result = new TypeDeclarationStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setDeclaration( (AbstractTypeDeclaration) getDeclaration().clone(target)); return result; }
ASTNode clone0(AST target) { TypeDeclarationStatement result = new TypeDeclarationStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setDeclaration( (AbstractTypeDeclaration) getDeclaration().clone(target)); return result; }
TypeDeclarationStatement typeDeclarationStatement = new TypeDeclarationStatement(this.ast); typeDeclarationStatement.setDeclaration(typeDeclaration); switch(this.ast.apiLevel) {
TypeDeclarationStatement typeDeclarationStatement = new TypeDeclarationStatement(this.ast); typeDeclarationStatement.setDeclaration(typeDeclaration); switch(this.ast.apiLevel) {