public static boolean hasProperty ( TypeDef typeDef , String property ) { return unrollHierarchy ( typeDef ) . stream ( ) . flatMap ( h -> h . getProperties ( ) . stream ( ) ) . filter ( p -> property . equals ( p . getName ( ) ) ) . findAny ( ) . isPresent ( ) ; }
Checks if property exists on the specified type .