/** * Returns a string representation of the object consisting of the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! */ @Deprecated public static String toString(Object p, String... propertyNames) { return new ObjectContracts().toStringOf(p, propertyNames); } //endregion
/** * Returns a string representation of the object consisting of the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #toString(Object, String...)} varargs} overloaded version of this method. */ @Deprecated public static String toString(Object p, String propertyNames) { return new ObjectContracts().toStringOf(p, propertyNames); } /**
/** * Returns a string representation of the object consisting of the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! */ @Deprecated public static String toString(Object p, String... propertyNames) { return new ObjectContracts().toStringOf(p, propertyNames); } //endregion
/** * Returns a string representation of the object consisting of the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #toString(Object, String...)} varargs} overloaded version of this method. */ @Deprecated public static String toString(Object p, String propertyNames) { return new ObjectContracts().toStringOf(p, propertyNames); } /**
/** * Returns a string representation of two objects, considering just the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! * @param propertyNames - the property name or names, CSV format. If multiple properties, use the {@link #toString(Object, String...)} varargs} overloaded version of this method. */ @Deprecated public String toStringOf(Object p, String propertyNames) { final Iterable<String> propertyNamesIter = csvToIterable(propertyNames); return toStringOf(p, propertyNamesIter); }
/** * Returns a string representation of two objects, considering just the specified property name(s). * @deprecated - please be aware that this utility heavily uses reflection. We don't actually intend to deprecate this method (it's useful while prototyping), but we wanted to bring this to your attention! */ @Deprecated public String toStringOf(Object p, String... propertyNames) { final Iterable<String> propertyNamesIter = varargsToIterable(propertyNames); return toStringOf(p, propertyNamesIter); }
@Override public String toString() { return new ObjectContracts().with(new NumberedEvaluator()).toStringOf(this, KEY_PROPERTIES); } @Override