1 11 12 package org.eclipse.jdt.core.dom; 13 14 28 public abstract class Name extends Expression implements IDocElement { 29 30 34 static final int BASE_NAME_NODE_SIZE = BASE_NODE_SIZE + 1 * 4; 35 36 39 int index; 40 41 49 Name(AST ast) { 50 super(ast); 51 } 52 53 60 public final boolean isSimpleName() { 61 return (this instanceof SimpleName); 62 } 63 64 71 public final boolean isQualifiedName() { 72 return (this instanceof QualifiedName); 73 } 74 75 85 public final IBinding resolveBinding() { 86 return this.ast.getBindingResolver().resolveName(this); 87 } 88 89 99 public final String getFullyQualifiedName() { 100 if (isSimpleName()) { 101 return ((SimpleName) this).getIdentifier(); 103 } else { 104 StringBuffer buffer = new StringBuffer (50); 105 appendName(buffer); 106 return new String (buffer); 107 } 108 } 109 110 117 abstract void appendName(StringBuffer buffer); 118 } 119 | Popular Tags |