src/share/classes/com/sun/tools/javac/code/Symbol.java

changeset 2390
b06c2db45ddb
parent 2384
327122b01a9e
child 2427
a3ad6e2ede44
equal deleted inserted replaced
2389:f1fbe29e36d1 2390:b06c2db45ddb
390 } 390 }
391 391
392 /** A class is an inner class if it it has an enclosing instance class. 392 /** A class is an inner class if it it has an enclosing instance class.
393 */ 393 */
394 public boolean isInner() { 394 public boolean isInner() {
395 return type.getEnclosingType().hasTag(CLASS); 395 return kind == TYP && type.getEnclosingType().hasTag(CLASS);
396 } 396 }
397 397
398 /** An inner class has an outer instance if it is not an interface 398 /** An inner class has an outer instance if it is not an interface
399 * it has an enclosing instance class which might be referenced from the class. 399 * it has an enclosing instance class which might be referenced from the class.
400 * Nested classes can see instance members of their enclosing class. 400 * Nested classes can see instance members of their enclosing class.

mercurial