@Override public void debugData(final DebugBuilder debug) { debug.appendln("field mapping lookup", fieldMappingLookup); debug.appendln("object mapping factory", objectMappingFactory); debug.appendTitle("Mappings"); int i = 1; for (final ObjectSpecification specification : mappings.keySet()) { debug.appendln(i++ + ". " + specification.getShortIdentifier()); final ObjectMapping mapper = mappings.get(specification); debug.indent(); debug.append(mapper); debug.unindent(); } }
final List<ObjectActionParameter> p = objectAction.getParameters(); for (int j = 0; j < parameters.size(); j++) { debugBuilder.append(p.get(j).getName()); debugBuilder.append(" ("); debugBuilder.append(parameters.get(j).getSpecification().getFullIdentifier()); debugBuilder.appendln(")"); debugBuilder.indent();
@Override public void debugData(final DebugBuilder debug) { debug.appendTitle("Options"); debug.indent(); debug.append(userProfile.getOptions()); debug.unindent(); debug.appendTitle("Perspectives"); for (final PerspectiveEntry entry : userProfile.getEntries()) { asDebuggableWithTitle(entry).debugData(debug); } }
s.append("\n"); } else { if (obj == null) {
public void debugData(final DebugBuilder str) { str.appendTitle("Facet decorators"); str.indent(); final Set<Class<? extends Facet>> facetTypes = facetDecoratorByFacetType.keySet(); if (facetTypes.size() == 0) { str.append("none"); } else { for (final Class<? extends Facet> cls : facetTypes) { str.appendln(cls.getName(), facetDecoratorByFacetType.get(cls)); } } str.unindent(); }
@Override public void debugData(final DebugBuilder debug) { int count = 0; for (final Object pojo : adapterByPojoMap.keySet()) { final ObjectAdapter object = adapterByPojoMap.get(pojo); debug.append(count++ + 1, 5); debug.append(" '"); debug.append(pojo.toString(), 50); debug.append("' "); debug.appendln(object.toString()); } }
@Override public void debugData(final DebugBuilder str) { facetDecoratorSet.debugData(str); str.appendln(); str.appendTitle("Specifications"); final List<ObjectSpecification> specs = Lists.newArrayList(allSpecifications()); Collections.sort(specs, ObjectSpecification.COMPARATOR_SHORT_IDENTIFIER_IGNORE_CASE); for (final ObjectSpecification spec : specs) { str.append(spec.isAbstract() ? "A" : "."); str.append(spec.isService() ? "S" : "."); str.append(BoundedFacetUtils.isBoundedSet(spec) ? "B" : "."); str.append(spec.isCollection() ? "C" : "."); str.append(spec.isNotCollection() ? "O" : "."); str.append("."); // placeholder for future support of maps str.append(spec.isParseable() ? "P" : "."); str.append(spec.isEncodeable() ? "E" : "."); str.append(spec.isValueOrIsAggregated() ? "A" : "."); str.append(!spec.isCollectionOrIsAggregated() ? "I" : "."); str.append(" "); str.append(spec.getShortIdentifier()); str.append(" [fqc="); str.append(spec.getFullIdentifier()); str.append(",type="); str.append(spec.getClass().getName()); str.appendln("]"); } }
@Override public void debugData(final DebugBuilder str) { str.appendln("Resource Stream Source", resourceStreamSource); str.appendln(); final Enumeration<?> names = properties.propertyNames(); while (names.hasMoreElements()) { final String name = (String) names.nextElement(); str.append(name, 55); str.append(" = "); str.appendln(properties.getProperty(name)); } }
final Class<? extends Facet>[] parameterFacets = p.get(j).getFacetTypes(); for (final Class<? extends Facet> parameterFacet : parameterFacets) { view.append(p.get(j).getFacet(parameterFacet).toString());
@Override public void debugData(final DebugBuilder debug) { int count = 1; for (final Oid oid : this) { final ObjectAdapter adapter = getAdapter(oid); debug.append(count++, 5); debug.append(" '"); debug.append(oid.toString(), 15); debug.append("' "); debug.appendln(adapter != null ? adapter.toString() : "(MISSING OBJECT ?!)"); } }
@Override public void debugData(final DebugBuilder debug) { debug.append(summary.toString()); }
/** * As {@link #graph(ObjectAdapter, AuthenticationSession)}, but appending to * the provided {@link DebugBuilder}. * * @see #graph(ObjectAdapter, AuthenticationSession) */ public static void graph(final ObjectAdapter object, final AuthenticationSession authenticationSession, final DebugBuilder debugBuilder) { simpleObject(object, debugBuilder); debugBuilder.appendln(); debugBuilder.append(object); graph(object, 0, Lists.<ObjectAdapter> newArrayList(), authenticationSession, debugBuilder); }
private static void collectionGraph(final ObjectAdapter collectionAdapter, final int level, final List<ObjectAdapter> ignoreAdapters, final AuthenticationSession authenticationSession, final DebugBuilder debugBuilder) { if (ignoreAdapters.contains(collectionAdapter)) { debugBuilder.append("*\n"); } else { ignoreAdapters.add(collectionAdapter); final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collectionAdapter); for (final ObjectAdapter element : facet.collection(collectionAdapter)) { graphIndent(level, debugBuilder); debugBuilder.append(element); if (ignoreAdapters.contains(element)) { debugBuilder.append("*\n"); } else { graph(element, level + 1, ignoreAdapters, authenticationSession, debugBuilder); } } } }
private static void graph(final ObjectAdapter adapter, final int level, final List<ObjectAdapter> ignoreAdapters, final AuthenticationSession authenticationSession, final DebugBuilder debugBuilder) { if (level > 3) { debugBuilder.appendln("..."); // only go 3 levels? } else { debugBuilder.append("\n"); if (adapter.getSpecification().isCollection()) { collectionGraph(adapter, level, ignoreAdapters, authenticationSession, debugBuilder); } else if (adapter.getSpecification().isNotCollection()) { objectGraph(adapter, level, ignoreAdapters, debugBuilder, authenticationSession); } else { debugBuilder.append("??? " + adapter); } } }