1 11 package org.eclipse.jdt.core.dom; 12 13 30 public abstract class Comment extends ASTNode { 31 32 36 private ASTNode alternateRoot = null; 37 38 46 Comment(AST ast) { 47 super(ast); 48 } 49 50 57 public final boolean isBlockComment() { 58 return (this instanceof BlockComment); 59 } 60 61 68 public final boolean isLineComment() { 69 return (this instanceof LineComment); 70 } 71 72 79 public final boolean isDocComment() { 80 return (this instanceof Javadoc); 81 } 82 83 102 public final ASTNode getAlternateRoot() { 103 return this.alternateRoot; 104 } 105 106 116 public final void setAlternateRoot(ASTNode root) { 117 checkModifiable(); 120 this.alternateRoot = root; 121 } 122 123 126 int memSize() { 127 return BASE_NODE_SIZE + 1 * 4; 128 } 129 } 130 | Popular Tags |