List of usage examples for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE
ToStringStyle MULTI_LINE_STYLE
To view the source code for org.apache.commons.lang.builder ToStringStyle MULTI_LINE_STYLE.
Click Source Link
From source file:com.github.ipaas.ifw.jdbc.mbean.DbHealthCheck.java
/** * toString//from ww w.j ava 2s. c o m * * @return String * */ public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("ip", ip).append("port", port) .toString(); }
From source file:fr.dudie.acrachilisync.handler.AcraToChiliprojectSyncHandler.java
/** * {@inheritDoc}//w ww . j a v a 2 s . c om * * @see fr.dudie.acrachilisync.handler.AcraReportHandler#onNewReport(fr.dudie.acrachilisync.model.AcraReport) */ @Override public void onNewReport(final AcraReport pReport) throws SynchronizationException { final Issue issue = new Issue(); final Project project = new Project(); project.setId(ConfigurationManager.getInstance().CHILIPROJECT_PROJECT_ID); issue.setProject(project); final Tracker tracker = new Tracker(); tracker.setId(ConfigurationManager.getInstance().CHILIPROJECT_TRACKER_ID); issue.setTracker(tracker); final CustomField md5CustomField = new CustomField(); md5CustomField.setId(ConfigurationManager.getInstance().CHILIPROJECT_STACKTRACE_MD5_CF_ID); md5CustomField.setValue(pReport.getStacktraceMD5()); issue.getCustomFields().add(md5CustomField); final String stack = pReport.getValue(AcraReportHeader.STACK_TRACE); final IssueDescriptionBuilder description = new IssueDescriptionBuilder(stack); description.addOccurrence(IssueDescriptionUtils.toErrorOccurrence(pReport)); final Matcher m = Pattern.compile("(.*)$", Pattern.MULTILINE).matcher(stack); m.find(); issue.setSubject(m.group()); issue.setDescription(description.build()); try { redmineClient.createIssue(String.valueOf(ConfigurationManager.getInstance().CHILIPROJECT_PROJECT_ID), issue); } catch (final Exception e) { pReport.setStatus(SyncStatus.FAILURE); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Failure while creating issue: \n{}", ToStringBuilder.reflectionToString(issue, ToStringStyle.MULTI_LINE_STYLE)); } throw new SynchronizationException("Unable to create issue for ACRA report: " + pReport.getId(), e); } pReport.setStatus(SyncStatus.SUCCESS); }
From source file:com.likethecolor.alchemy.api.entity.AuthorAlchemyEntityTest.java
@Test public void testToString_Formatted() { final ToStringStyle style = ToStringStyle.MULTI_LINE_STYLE; final String author = "Jon Doe"; final AuthorAlchemyEntity entity = new AuthorAlchemyEntity(author); final String expectedString = new ToStringBuilder(entity, style).append("author", author).toString(); final String actualString = entity.toString(style); assertEquals(expectedString, actualString); }
From source file:com.likethecolor.alchemy.api.entity.TitleAlchemyEntityTest.java
@Test public void testToString_Formatted() { final ToStringStyle style = ToStringStyle.MULTI_LINE_STYLE; final String title = "Authorities: Pilot accused of faking death found in Florida - CNN.com"; final TitleAlchemyEntity entity = new TitleAlchemyEntity(title); final String expectedString = new ToStringBuilder(entity, style).append("title", title).toString(); final String actualString = entity.toString(style); assertEquals(expectedString, actualString); }
From source file:ca.tnt.ldaputils.impl.LdapGroup.java
@SuppressWarnings({ "ChainedMethodCall" }) @Override//from ww w.j a v a 2 s . c o m public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); }
From source file:com.adaptris.core.DefaultSerializableMessageTranslator.java
private String buildFileDetails(File f) throws CoreException { String result = null;/* ww w . java2 s .com*/ try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); result = new ToStringBuilder(f, ToStringStyle.MULTI_LINE_STYLE).append("Path", f.getCanonicalPath()) .append("Size", FileUtils.byteCountToDisplaySize(f.length())) .append("LastModified", sdf.format(new Date(f.lastModified()))).toString(); } catch (Exception e) { ExceptionHelper.rethrowCoreException(e); } return result; }
From source file:com.jeefuse.system.code.model.GsysCodevalue.java
/** @generated */ @Override//from w ww . ja v a 2 s.c om public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", id).append("name", name) .append("value", value).append("descript", descript) //.append("gsysCode",gsysCode) .toString(); }
From source file:com.vmware.thinapp.common.datastore.dto.Datastore.java
/** * Converts this object into a string without the password * field.(Security reasons)/* w w w . ja va 2s .c om*/ */ @Override public String toString() { return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .setExcludeFieldNames(new String[] { "password" }).toString(); }
From source file:com.btisystems.pronx.ems.inherited.System.java
public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("sysDescr", sysDescr) .append("sysObjectID", sysObjectID).append("sysUpTime", sysUpTime).append("sysContact", sysContact) .append("sysName", sysName).append("sysLocation", sysLocation).append("sysServices", sysServices) .append("sysORLastChange", sysORLastChange).toString(); }
From source file:com.jeefuse.system.code.model.GsysCode.java
/** @generated */ @Override//from ww w .j a va 2s.c om public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", cid).append("name", name) .append("descript", descript).append("kind", kind) //.append("gsysCodevalues",gsysCodevalues) .toString(); }