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

Print this page

        

*** 419,428 **** --- 419,436 ---- // compiler to load classes unnecessarily. This led // to regression 6180021. && (tsym.flags() & COMPOUND) != 0; } + public boolean isIntersection() { + return false; + } + + public boolean isUnion() { + return false; + } + public boolean isInterface() { return (tsym.flags() & INTERFACE) != 0; } public boolean isFinal() {
*** 968,977 **** --- 976,990 ---- public java.util.List<? extends TypeMirror> getAlternatives() { return Collections.unmodifiableList(alternatives_field); } @Override + public boolean isUnion() { + return true; + } + + @Override public TypeKind getKind() { return TypeKind.UNION; } @Override
*** 1001,1010 **** --- 1014,1028 ---- public List<Type> getComponents() { return interfaces_field.prepend(supertype_field); } + @Override + public boolean isIntersection() { + return true; + } + public List<Type> getExplicitComponents() { return allInterfaces ? interfaces_field : getComponents(); }