/** * Method that will try to construct a {@link BeanSerializer} for * given class. Returns null if no properties are found. */ protected JsonSerializer<?> findBeanSerializer(Class<?> type) { // First things first: we know some types are not beans... if (!canBeABeanType(type)) { return null; } // First: what properties are to be serializable? Collection<WritableBeanProperty> props = findBeanProperties(type); if (props == null || props.size() == 0) { // No properties, no serializer return null; } return new BeanSerializer(type, props); }