public LocatableFactory(String name, Class type, Class implementation, Scope scope, Object location) { this.implementation = implementation; this.type = type; this.name = name; this.scope = scope; setLocation(LocationUtils.getLocation(location)); }
@Override public String toString() { String fields = new LinkedHashMap<String, Object>() { { put("type", type); put("name", name); put("implementation", implementation); put("scope", scope); } }.toString(); StringBuilder sb = new StringBuilder(fields); sb.append(super.toString()); sb.append(" defined at "); sb.append(getLocation().toString()); return sb.toString(); } }
LOG.debug("Loaded type:" + type + " name:" + name + " impl:" + impl); containerBuilder.factory(ctype, name, new LocatableFactory(name, ctype, cimpl, scope, childNode), scope);