public static Matcher < ClassTree > nestingKind ( final NestingKind kind ) { return new Matcher < ClassTree > ( ) { @ Override public boolean matches ( ClassTree classTree , VisitorState state ) { ClassSymbol sym = ASTHelpers . getSymbol ( classTree ) ; return sym . getNestingKind ( ) == kind ; } } ; }
Matches an class based on whether it is nested in another class or method .