public static < T extends Tree > Matcher < T > kindIs ( final Kind kind ) { return new Matcher < T > ( ) { @ Override public boolean matches ( T tree , VisitorState state ) { return tree . getKind ( ) == kind ; } } ; }
Matches an AST node of a given kind for example an Annotation or a switch block .