List of usage examples for org.apache.commons.lang3.builder ToStringBuilder reflectionToString
public static String reflectionToString(final Object object, final ToStringStyle style)
Uses ReflectionToStringBuilder
to generate a toString
for the specified object.
From source file:org.tinymediamanager.scraper.entities.MediaGenres.java
public String dump() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); }
From source file:org.tinymediamanager.scraper.MediaSearchResult.java
/** * <p>/*from w w w . j ava2 s. c o m*/ * Uses <code>ReflectionToStringBuilder</code> to generate a <code>toString</code> for the specified object. * </p> * * @return the String result * @see ReflectionToStringBuilder#toString(Object) */ @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); // return (new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) { // @Override // protected boolean accept(Field f) { // return super.accept(f) && !f.getName().equals("metadata"); // } // }).toString(); }
From source file:org.yamj.core.service.metadata.online.TheTVDbScannerTest.java
/** * Test of scan method, of class TheTVDbScanner. *///from w w w. j av a 2 s . c o m @Test public void testScan() { LOG.info("scan"); Series series = new Series(); // Test that we get an error when scanning without an ID ScanResult result = tvdbScanner.scan(series); assertEquals("Wrong ScanResult returned", ScanResult.MISSING_ID, result); series = new Series(); series.setSourceDbId(PLUGIN_ID, "70726"); result = tvdbScanner.scan(series); LOG.info("***** SERIES {} *****", ToStringBuilder.reflectionToString(series, ToStringStyle.MULTI_LINE_STYLE)); assertEquals("Wrong ScanResult returned", ScanResult.OK, result); assertEquals("Wrong series ID returned", "70726", series.getSourceDbId(PLUGIN_ID)); assertEquals("Wrong title", "Babylon 5", series.getTitle()); assertFalse("No Genres found", series.getGenreNames().isEmpty()); }
From source file:pl.wasat.smarthma.model.om.GeometryMembers.java
@Override public String toString() { ToStringStyle style = new SmartHMAStringStyle(); ToStringBuilder.setDefaultStyle(style); return ToStringBuilder.reflectionToString(this, style); }