src/share/classes/com/sun/tools/javac/tree/JCTree.java

changeset 969
8cc5b440fdde
parent 904
4baab658f357
child 1089
0f3da6af9799
equal deleted inserted replaced
960:26b065bb4ee7 969:8cc5b440fdde
234 234
235 /** Parameterized types, of type TypeApply. 235 /** Parameterized types, of type TypeApply.
236 */ 236 */
237 public static final int TYPEAPPLY = TYPEARRAY + 1; 237 public static final int TYPEAPPLY = TYPEARRAY + 1;
238 238
239 /** Disjunction types, of type TypeDisjunction 239 /** Union types, of type TypeUnion
240 */ 240 */
241 public static final int TYPEDISJUNCTION = TYPEAPPLY + 1; 241 public static final int TYPEUNION = TYPEAPPLY + 1;
242 242
243 /** Formal type parameters, of type TypeParameter. 243 /** Formal type parameters, of type TypeParameter.
244 */ 244 */
245 public static final int TYPEPARAMETER = TYPEDISJUNCTION + 1; 245 public static final int TYPEPARAMETER = TYPEUNION + 1;
246 246
247 /** Type argument. 247 /** Type argument.
248 */ 248 */
249 public static final int WILDCARD = TYPEPARAMETER + 1; 249 public static final int WILDCARD = TYPEPARAMETER + 1;
250 250
1879 return TYPEAPPLY; 1879 return TYPEAPPLY;
1880 } 1880 }
1881 } 1881 }
1882 1882
1883 /** 1883 /**
1884 * A disjunction type, T1 | T2 | ... Tn (used in multicatch statements) 1884 * A union type, T1 | T2 | ... Tn (used in multicatch statements)
1885 */ 1885 */
1886 public static class JCTypeDisjunction extends JCExpression implements DisjunctiveTypeTree { 1886 public static class JCTypeUnion extends JCExpression implements UnionTypeTree {
1887 1887
1888 public List<JCExpression> alternatives; 1888 public List<JCExpression> alternatives;
1889 1889
1890 protected JCTypeDisjunction(List<JCExpression> components) { 1890 protected JCTypeUnion(List<JCExpression> components) {
1891 this.alternatives = components; 1891 this.alternatives = components;
1892 } 1892 }
1893 @Override 1893 @Override
1894 public void accept(Visitor v) { v.visitTypeDisjunction(this); } 1894 public void accept(Visitor v) { v.visitTypeUnion(this); }
1895 1895
1896 public Kind getKind() { return Kind.DISJUNCTIVE_TYPE; } 1896 public Kind getKind() { return Kind.UNION_TYPE; }
1897 1897
1898 public List<JCExpression> getTypeAlternatives() { 1898 public List<JCExpression> getTypeAlternatives() {
1899 return alternatives; 1899 return alternatives;
1900 } 1900 }
1901 @Override 1901 @Override
1902 public <R,D> R accept(TreeVisitor<R,D> v, D d) { 1902 public <R,D> R accept(TreeVisitor<R,D> v, D d) {
1903 return v.visitDisjunctiveType(this, d); 1903 return v.visitUnionType(this, d);
1904 } 1904 }
1905 @Override 1905 @Override
1906 public int getTag() { 1906 public int getTag() {
1907 return TYPEDISJUNCTION; 1907 return TYPEUNION;
1908 } 1908 }
1909 } 1909 }
1910 1910
1911 /** 1911 /**
1912 * A formal class parameter. 1912 * A formal class parameter.
2225 public void visitIdent(JCIdent that) { visitTree(that); } 2225 public void visitIdent(JCIdent that) { visitTree(that); }
2226 public void visitLiteral(JCLiteral that) { visitTree(that); } 2226 public void visitLiteral(JCLiteral that) { visitTree(that); }
2227 public void visitTypeIdent(JCPrimitiveTypeTree that) { visitTree(that); } 2227 public void visitTypeIdent(JCPrimitiveTypeTree that) { visitTree(that); }
2228 public void visitTypeArray(JCArrayTypeTree that) { visitTree(that); } 2228 public void visitTypeArray(JCArrayTypeTree that) { visitTree(that); }
2229 public void visitTypeApply(JCTypeApply that) { visitTree(that); } 2229 public void visitTypeApply(JCTypeApply that) { visitTree(that); }
2230 public void visitTypeDisjunction(JCTypeDisjunction that) { visitTree(that); } 2230 public void visitTypeUnion(JCTypeUnion that) { visitTree(that); }
2231 public void visitTypeParameter(JCTypeParameter that) { visitTree(that); } 2231 public void visitTypeParameter(JCTypeParameter that) { visitTree(that); }
2232 public void visitWildcard(JCWildcard that) { visitTree(that); } 2232 public void visitWildcard(JCWildcard that) { visitTree(that); }
2233 public void visitTypeBoundKind(TypeBoundKind that) { visitTree(that); } 2233 public void visitTypeBoundKind(TypeBoundKind that) { visitTree(that); }
2234 public void visitAnnotation(JCAnnotation that) { visitTree(that); } 2234 public void visitAnnotation(JCAnnotation that) { visitTree(that); }
2235 public void visitModifiers(JCModifiers that) { visitTree(that); } 2235 public void visitModifiers(JCModifiers that) { visitTree(that); }

mercurial