/** * Sets or clears the doc comment node. * * @param docComment the doc comment node, or <code>null</code> if none * @exception IllegalArgumentException if the doc comment string is invalid */ public void setJavadoc(Javadoc docComment) { ChildPropertyDescriptor p = JAVADOC_PROPERTY; ASTNode oldChild = this.optionalDocComment; preReplaceChild(oldChild, docComment, p); this.optionalDocComment = docComment; postReplaceChild(oldChild, docComment, p); }
/** * Sets or clears the doc comment node. * * @param docComment the doc comment node, or <code>null</code> if none * @exception IllegalArgumentException if the doc comment string is invalid */ public void setJavadoc(Javadoc docComment) { ChildPropertyDescriptor p = JAVADOC_PROPERTY; ASTNode oldChild = this.optionalDocComment; preReplaceChild(oldChild, docComment, p); this.optionalDocComment = docComment; postReplaceChild(oldChild, docComment, p); }
/** * Sets the module name in to the given name. * * @param name the new module name * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public void setName(Name name) { if (name == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.name; preReplaceChild(oldChild, name, NAME_PROPERTY); this.name = name; postReplaceChild(oldChild, name, NAME_PROPERTY); }
/** * Sets the module name in to the given name. * * @param name the new module name * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * </ul> */ public void setName(Name name) { if (name == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.name; preReplaceChild(oldChild, name, NAME_PROPERTY); this.name = name; postReplaceChild(oldChild, name, NAME_PROPERTY); }