@Override public String toString() { return "TImplementation{" + "primary=" + getPrimary() + ", dependencies=" + getDependencies() + '}'; }
public TImplementation build() { return new TImplementation(this); } }
public TImplementation(Builder builder) { this.setPrimary(builder.primary); this.setDependencies(builder.dependencies); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TImplementation)) return false; TImplementation that = (TImplementation) o; return Objects.equals(getPrimary(), that.getPrimary()) && Objects.equals(getDependencies(), that.getDependencies()); }
@Nullable public TImplementation buildImplementation(Object object, Parameter<TImplementation> parameter) { // TImplementation has required fields but is used not in a map context if (Objects.isNull(object)) return null; if (object instanceof String) return new TImplementation(buildQName(stringValue(object))); if (!validate(TImplementation.class, object, parameter)) return null; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>) object; return new TImplementation.Builder(buildQName(stringValue(map.get("primary")))) .setDependencies(buildListQName(buildListString(map.get("dependencies"), new Parameter<List<String>>(parameter.getContext()).addContext("dependencies") ))) .build(); }
@Override public int hashCode() { return Objects.hash(getPrimary(), getDependencies()); }
public Printer visit(TImplementation node, Parameter parameter) { return new Printer(parameter.getIndent()) .printKeyValue("primary", node.getPrimary()) .printKeyValue("dependencies", node.getDependencies()); }
String operationName = operation.getKey(); TImplementation implementation = operation.getValue().getImplementation(); List<QName> list = implementation.getDependencies(); if (implementation.getPrimary() != null) { list.add(implementation.getPrimary());