List of usage examples for org.apache.commons.lang.builder ToStringStyle SHORT_PREFIX_STYLE
ToStringStyle SHORT_PREFIX_STYLE
To view the source code for org.apache.commons.lang.builder ToStringStyle SHORT_PREFIX_STYLE.
Click Source Link
From source file:org.capatect.restatic.core.discoverer.file.AntStylePatternFileNameFilter.java
@Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("patterns", patterns).toString(); }
From source file:org.cleverbus.core.common.asynch.TraceHeaderProcessor.java
/** * Checks that {@link TraceIdentifier} contains values which are valid. * * @param traceId the {@link TraceIdentifier} * @throws ValidationIntegrationException *//*from w w w . j a v a 2 s . co m*/ private void validateTraceIdentifier(TraceIdentifier traceId) { Assert.notNull(traceId, "the traceId must not be null"); // if not defined some implementation, the validation is skipped if (validatorList == null || validatorList.isEmpty()) { Log.debug("no traceIdentifier validator found"); return; } for (TraceIdentifierValidator validator : validatorList) { if (validator.isValid(traceId)) { Log.debug("the trace identifier '{0}' is allowed", ToStringBuilder.reflectionToString(traceId)); return; } } // trace identifier values was not found in any list of possible values throw new ValidationIntegrationException(InternalErrorEnum.E120, "the trace identifier '" + ToStringBuilder.reflectionToString(traceId, ToStringStyle.SHORT_PREFIX_STYLE) + "' is not allowed"); }
From source file:org.cloudifysource.esc.driver.provisioning.privateEc2.parser.PrivateEc2TemplateParserTest.java
@Test public void testTemplateComplete() throws IOException, PrivateEc2ParserException { InputStream templateStream = ClassLoader.getSystemResourceAsStream("./cfn_templates/complete.template"); ToStringBuilder.setDefaultStyle(ToStringStyle.SHORT_PREFIX_STYLE); PrivateEc2Template template = ParserUtils.mapJson(PrivateEc2Template.class, templateStream); assertNotNull(template);//from w w w. j a v a 2s. c o m }
From source file:org.cloudifysource.esc.driver.provisioning.privateEc2.parser.PrivateEc2TemplateParserTest.java
@Test public void testTemplateWithRef() throws IOException, PrivateEc2ParserException { InputStream templateStream = ClassLoader.getSystemResourceAsStream("./cfn_templates/ref.template"); ToStringBuilder.setDefaultStyle(ToStringStyle.SHORT_PREFIX_STYLE); PrivateEc2Template template = ParserUtils.mapJson(PrivateEc2Template.class, templateStream); assertNotNull(template);// ww w .j av a 2s.co m }
From source file:org.codehaus.mojo.solaris.DefaultPrototypeGenerator.java
public Iterator generatePrototype(File packageRoot, List prototype, Defaults directoryDefaults, Defaults fileDefaults) throws MojoFailureException, MojoExecutionException { prototype = getEntries(prototype);/* ww w . j a v a 2 s. c om*/ getLogger().debug("Generating prototype..."); // ----------------------------------------------------------------------- // Validate // ----------------------------------------------------------------------- for (Iterator it = prototype.iterator(); it.hasNext();) { Object entry = it.next(); Defaults defaults; if (entry instanceof DirectoryEntry || entry instanceof DirectoryCollection) { defaults = directoryDefaults; } else { defaults = fileDefaults; } ((AbstractPrototypeEntry) entry).validate(defaults); } AbstractEntryCollection defaultDirectoryCollection = new DirectoryCollection( directoryDefaults.getPkgClass(), directoryDefaults.getMode(), directoryDefaults.getUser(), directoryDefaults.getGroup(), directoryDefaults.isRelative(), directoryDefaults.getIncludes(), directoryDefaults.getExcludes()); AbstractEntryCollection defaultFileCollection = new FileCollection(fileDefaults.getPkgClass(), fileDefaults.getMode(), fileDefaults.getUser(), fileDefaults.getGroup(), fileDefaults.isRelative(), fileDefaults.getIncludes(), fileDefaults.getExcludes()); prototype.add(0, defaultDirectoryCollection); prototype.add(1, defaultFileCollection); // ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- PrototypeEntryList collectedPrototypeEntries = new PrototypeEntryList(); // ----------------------------------------------------------------------- // Iterate through the prototype // ----------------------------------------------------------------------- for (Iterator it = prototype.iterator(); it.hasNext();) { Object o = it.next(); if (o instanceof SinglePrototypeEntry) { SinglePrototypeEntry entry = (SinglePrototypeEntry) o; getLogger().debug("Adding entry: "); getLogger().debug(" " + entry); if (entry instanceof DirectoryEntry) { entry.validate(directoryDefaults); } else { entry.validate(fileDefaults); } // entry.adjustPath( null ); collectedPrototypeEntries.add(entry); continue; } AbstractEntryCollection collection = (AbstractEntryCollection) o; getLogger().debug("Expanding collection: " + collection); getLogger().debug(" Basedir: " + packageRoot); DirectoryScanner scanner = new DirectoryScanner(); scanner.setBasedir(packageRoot); scanner.setIncludes(collection.getIncludes()); scanner.setExcludes(collection.getExcludes()); scanner.scan(); PrototypeEntryList entries = expandCollection(collection, scanner); if (getLogger().isDebugEnabled()) { getLogger().debug(" Found " + entries.size() + " entries: "); for (Iterator it2 = entries.iterator(); it2.hasNext();) { SinglePrototypeEntry entry = (SinglePrototypeEntry) it2.next(); getLogger().debug( " " + ToStringBuilder.reflectionToString(entry, ToStringStyle.SHORT_PREFIX_STYLE)); } } collectedPrototypeEntries.addAll(entries); } return collectedPrototypeEntries.iterator(); }
From source file:org.codemucker.testserver.capturing.ACapturedCookie.java
@Override public void describeTo(final Description desc) { desc.value("expect", ToStringBuilder.reflectionToString(expect, ToStringStyle.SHORT_PREFIX_STYLE)); }
From source file:org.danann.cernunnos.ReturnValueImpl.java
/** * @see java.lang.Object#toString()/*from w ww.j a v a 2 s .co m*/ */ @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("value", this.value).toString(); }
From source file:org.deploymentobjects.core.domain.model.environment.Host.java
public String toString() { ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) .append("hostname", hostname).append("domainname", domainname).append("ip", ip).append("type", type) .append("provisioned", isProvisioned); for (Role role : roles) { builder.append("role", role.getName()); }//www . ja va2s. c o m return builder.toString(); }
From source file:org.diffkit.diff.engine.DKStandardTableComparison.java
public String getDescription() { ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE); builder.append("_tableModels[LEFT]", _tableModels[DKSide.LEFT_INDEX]); builder.append("_tableModels[RIGHT]", _tableModels[DKSide.RIGHT_INDEX]); builder.append("_kind", _kind); builder.append("_map", Arrays.toString(_map)); builder.append("_diffIndexes", Arrays.toString(_diffIndexes)); builder.append("_displayIndexes[LEFT]", Arrays.toString(_displayIndexes[DKSide.LEFT_INDEX])); builder.append("_displayIndexes[RIGHT]", Arrays.toString(_displayIndexes[DKSide.RIGHT_INDEX])); builder.append("_maxDiffs", _maxDiffs); return builder.toString(); }
From source file:org.displaytag.pagination.PaginatedListSmartListHelper.java
/** * @see java.lang.Object#toString()/*www . ja va 2 s .co m*/ */ public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) // .append("paginatedList", this.paginatedList) //$NON-NLS-1$ .append("properties", this.properties) //$NON-NLS-1$ .toString(); }