Interface ASTPattern

  • All Superinterfaces:
    JavaNode, Node, ScopedNode
    All Known Implementing Classes:
    ASTTypeTestPattern

    @Experimental
    public interface ASTPattern
    extends JavaNode
    A pattern (for pattern matching constructs like InstanceOfExpression). This is a JDK 14 preview feature and is subject to change.

    This interface will be implemented by all forms of patterns. For now, only type test patterns are supported. Record deconstruction patterns are in the works for JDK 15 preview.

    See https://openjdk.java.net/jeps/305, https://openjdk.java.net/jeps/8235186

    
     Pattern ::= TypeTestPattern