/** * Sets the type declaration of this local type declaration * statement (JLS2 API only). * * @param decl the type declaration 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> * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @deprecated In the JLS3 API, this method is replaced by * {@link #setDeclaration(AbstractTypeDeclaration)} which takes * <code>AbstractTypeDeclaration</code> instead of * <code>TypeDeclaration</code>. */ public void setTypeDeclaration(TypeDeclaration decl) { internalSetTypeDeclaration(decl); }
/** * Sets the type declaration of this local type declaration * statement (JLS2 API only). * * @param decl the type declaration 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> * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @deprecated In the JLS3 API, this method is replaced by * {@link #setDeclaration(AbstractTypeDeclaration)} which takes * <code>AbstractTypeDeclaration</code> instead of * <code>TypeDeclaration</code>. */ public void setTypeDeclaration(TypeDeclaration decl) { internalSetTypeDeclaration(decl); }
/** * Sets the type declaration of this local type declaration * statement (JLS2 API only). * * @param decl the type declaration 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> * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @deprecated In the JLS3 API, this method is replaced by * {@link #setDeclaration(AbstractTypeDeclaration)} which takes * <code>AbstractTypeDeclaration</code> instead of * <code>TypeDeclaration</code>. */ public void setTypeDeclaration(TypeDeclaration decl) { internalSetTypeDeclaration(decl); }
/** * Sets the type declaration of this local type declaration * statement (JLS2 API only). * * @param decl the type declaration 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> * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @deprecated In the JLS3 API, this method is replaced by * {@link #setDeclaration(AbstractTypeDeclaration)} which takes * <code>AbstractTypeDeclaration</code> instead of * <code>TypeDeclaration</code>. */ public void setTypeDeclaration(TypeDeclaration decl) { internalSetTypeDeclaration(decl); }
/** * Sets the type declaration of this local type declaration * statement (JLS2 API only). * * @param decl the type declaration 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> * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @deprecated In the JLS3 API, this method is replaced by * {@link #setDeclaration(AbstractTypeDeclaration)} which takes * <code>AbstractTypeDeclaration</code> instead of * <code>TypeDeclaration</code>. */ public void setTypeDeclaration(TypeDeclaration decl) { internalSetTypeDeclaration(decl); }
/** * Sets the type declaration of this local type declaration * statement (JLS2 API only). * * @param decl the type declaration 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> * @exception UnsupportedOperationException if this operation is used in * an AST later than JLS2 * @deprecated In the JLS3 API, this method is replaced by * {@link #setDeclaration(AbstractTypeDeclaration)} which takes * <code>AbstractTypeDeclaration</code> instead of * <code>TypeDeclaration</code>. */ public void setTypeDeclaration(TypeDeclaration decl) { internalSetTypeDeclaration(decl); }
/** * 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; }