equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
49 /** |
49 /** |
50 * Returns the type for which to check. |
50 * Returns the type for which to check. |
51 * @return the type |
51 * @return the type |
52 */ |
52 */ |
53 Tree getType(); |
53 Tree getType(); |
|
54 |
|
55 /** |
|
56 * {@preview Associated with pattern matching for instanceof, a preview feature of |
|
57 * the Java language. |
|
58 * |
|
59 * This method is associated with <i>pattern matching for instanceof</i>, a preview |
|
60 * feature of the Java language. Preview features |
|
61 * may be removed in a future release, or upgraded to permanent |
|
62 * features of the Java language.} |
|
63 * |
|
64 * Returns the tested pattern, or null if this instanceof does not use |
|
65 * a pattern. |
|
66 * |
|
67 * <p>For instanceof with a pattern, i.e. in the following form: |
|
68 * <pre> |
|
69 * <em>expression</em> instanceof <em>type</em> <em>variable name</em> |
|
70 * </pre> |
|
71 * returns the pattern. |
|
72 * |
|
73 * <p>For instanceof without a pattern, i.e. in the following form: |
|
74 * <pre> |
|
75 * <em>expression</em> instanceof <em>type</em> |
|
76 * </pre> |
|
77 * returns null. |
|
78 * |
|
79 * @return the tested pattern, or null if this instanceof does not use a pattern. |
|
80 * @since 14 |
|
81 */ |
|
82 PatternTree getPattern(); |
54 } |
83 } |