@Test public void testToString() { assertEquals("PField{4: i32 name}", field.toString()); assertEquals("PField{4: i32 name}", fieldSame.toString()); assertEquals("PField{4: i32 name}", fieldComment.toString()); assertEquals("PField{6: i32 name}", fieldKey.toString()); assertEquals("PField{4: required i32 name}", fieldRequired.toString()); assertEquals("PField{4: i32 eman}", fieldName.toString()); assertEquals("PField{4: i64 name}", fieldType.toString()); assertEquals("PField{4: i32 name}", fieldDefault.toString()); assertEquals("PField{4: optional i32 name}", fieldOptional.toString()); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(PField.class.getSimpleName()) .append('{') .append(id) .append(": "); if (requirement != PRequirement.DEFAULT) { builder.append(requirement.label) .append(" "); } builder.append(getDescriptor().getQualifiedName()) .append(" ") .append(name) .append("}"); return builder.toString(); }
CField implements PField, CAnnotatedDescriptor { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(PField.class.getSimpleName()) .append('{') .append(id) .append(": "); if (requirement != PRequirement.DEFAULT) { builder.append(requirement.label) .append(" "); } builder.append(getDescriptor().getQualifiedName()) .append(" ") .append(name) .append("}"); return builder.toString(); } }
CField implements PField, CAnnotatedDescriptor { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(PField.class.getSimpleName()) .append('{') .append(id) .append(": "); if (requirement != PRequirement.DEFAULT) { builder.append(requirement.label) .append(" "); } builder.append(getDescriptor().getQualifiedName()) .append(" ") .append(name) .append("}"); return builder.toString(); } CField(@Nullable String docs,
                  int id,
                  @Nonnull PRequirement requirement,
                  @Nonnull String name,
                  @Nonnull PDescriptorProvider typeProvider,
                  @Nullable PValueProvider defaultValue,
                  @Nullable Map<String, String> annotations); }
CField implements PField, CAnnotatedDescriptor { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(PField.class.getSimpleName()) .append('{') .append(id) .append(": "); if (requirement != PRequirement.DEFAULT) { builder.append(requirement.label) .append(" "); } builder.append(getDescriptor().getQualifiedName()) .append(" ") .append(name) .append("}"); return builder.toString(); } CField(@Nullable String docs,
                  int id,
                  @Nonnull PRequirement requirement,
                  @Nonnull String name,
                  @Nonnull PDescriptorProvider typeProvider,
                  @Nullable PValueProvider defaultValue,
                  @Nullable Map<String, String> annotations); @Override String getDocumentation(); @Override int getId(); @Nonnull @Override PRequirement getRequirement(); @Nonnull @Override PType getType(); @Nonnull @Override PDescriptor getDescriptor(); @Nonnull @Override String getName(); @Override boolean hasDefaultValue(); @Override Object getDefaultValue(); @Nonnull @Override @SuppressWarnings("unchecked") Set<String> getAnnotations(); @Override boolean hasAnnotation(@Nonnull String name); @Override String getAnnotationValue(@Nonnull String name); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
CField implements PField, CAnnotatedDescriptor { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(PField.class.getSimpleName()) .append('{') .append(id) .append(": "); if (requirement != PRequirement.DEFAULT) { builder.append(requirement.label) .append(" "); } builder.append(getDescriptor().getQualifiedName()) .append(" ") .append(name) .append("}"); return builder.toString(); } CField(@Nullable String docs,
                  int id,
                  @Nonnull PRequirement requirement,
                  @Nonnull String name,
                  @Nonnull PDescriptorProvider typeProvider,
                  @Nullable PValueProvider defaultValue,
                  @Nullable Map<String, String> annotations); @Override String getDocumentation(); @Override int getId(); @Nonnull @Override PRequirement getRequirement(); @Nonnull @Override PType getType(); @Nonnull @Override PDescriptor getDescriptor(); @Nonnull @Override String getName(); @Override boolean hasDefaultValue(); @Override Object getDefaultValue(); @Nonnull @Override @SuppressWarnings("unchecked") Set<String> getAnnotations(); @Override boolean hasAnnotation(@Nonnull String name); @Override String getAnnotationValue(@Nonnull String name); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }