< prev index next >

test/langtools/tools/javac/processing/model/element/TestElementKindPredicates.java

Print this page

        

*** 39,49 **** Set<ElementKind> ALL_KINDS = Set.of(ElementKind.values()); // isClass: Returns true if this is a kind of class: either CLASS or ENUM. test(ALL_KINDS, (ElementKind k) -> Set.of(ElementKind.CLASS, ! ElementKind.ENUM).contains(k), (ElementKind k) -> k.isClass(), "isClass"); // isField: Returns true if this is a kind of field: either FIELD or ENUM_CONSTANT. test(ALL_KINDS, (ElementKind k) -> Set.of(ElementKind.FIELD, --- 39,50 ---- Set<ElementKind> ALL_KINDS = Set.of(ElementKind.values()); // isClass: Returns true if this is a kind of class: either CLASS or ENUM. test(ALL_KINDS, (ElementKind k) -> Set.of(ElementKind.CLASS, ! ElementKind.ENUM, ! ElementKind.RECORD).contains(k), (ElementKind k) -> k.isClass(), "isClass"); // isField: Returns true if this is a kind of field: either FIELD or ENUM_CONSTANT. test(ALL_KINDS, (ElementKind k) -> Set.of(ElementKind.FIELD,
< prev index next >