org.eclipse.xtext.xbase.lib.util.ToStringBuilder类的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.eclipse.xtext.xbase.lib.util.ToStringBuilder类的一些代码示例,展示了ToStringBuilder类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToStringBuilder类的具体详情如下:
包路径:org.eclipse.xtext.xbase.lib.util.ToStringBuilder
类名称:ToStringBuilder

ToStringBuilder介绍

[英]Helps with the construction of good Object#toString() representations.

You can customize the output using the builder-style methods ToStringBuilder#singleLine() ToStringBuilder#skipNulls() and ToStringBuilder#hideFieldNames().

You can either directly list fields to include via ToStringBuilder#add(String,Object) and ToStringBuilder#add(Object)or you can let the builder do it automatically using reflection, either including the fields declared in this class or including all superclasses.

The builder will automatically handle cycles in the object tree. It also pretty prints arrays and Iterables.
This class is not thread safe.
[中]

代码示例

代码示例来源:origin: eclipse/lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("result", this.result);
 b.add("type", this.type);
 b.add("presentationHint", this.presentationHint);
 b.add("variablesReference", this.variablesReference);
 b.add("namedVariables", this.namedVariables);
 b.add("indexedVariables", this.indexedVariables);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

@Override
 public String toString() {
  return new ToStringBuilder(this).addAllFields().toString();
 }
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.web

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.skipNulls();
 b.add("name", this.name);
 b.add("contentType", this.contentType);
 b.add("content", this.content);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.web

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.skipNulls();
 b.add("stateId", this.stateId);
 b.add("formattedText", this.formattedText);
 b.add("replaceRegion", this.replaceRegion);
 return b.toString();
}

代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("range", this.range);
 b.add("severity", this.severity);
 b.add("code", this.code);
 b.add("source", this.source);
 b.add("message", this.message);
 b.add("relatedInformation", this.relatedInformation);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase.lib

/**
 * Creates a string representation of the given object by listing the internal state of all fields.
 * 
 * @param obj
 *            the object that should be printed.
 * @return the string representation. Never <code>null</code>.
 * @deprecated use <code>new ToStringBuilder().addAllFields().toString()</code>
 */
@Deprecated
public String toString(Object obj) {
  return new ToStringBuilder(obj).addAllFields().toString();
}

代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("name", this.name);
 b.add("kind", this.kind);
 b.add("deprecated", this.deprecated);
 b.add("location", this.location);
 b.add("containerName", this.containerName);
 return b.toString();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.xtext.xbase.lib

/**
 * Creates a string representation of the given object by listing the internal state of all fields.
 * 
 * @param obj
 *            the object that should be printed.
 * @return the string representation. Never <code>null</code>.
 * @deprecated use <code>new ToStringBuilder().addAllFields().toString()</code>
 */
@Deprecated
public String toString(Object obj) {
  return new ToStringBuilder(obj).addAllFields().toString();
}

代码示例来源:origin: eclipse/lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("openClose", this.openClose);
 b.add("change", this.change);
 b.add("willSave", this.willSave);
 b.add("willSaveWaitUntil", this.willSaveWaitUntil);
 b.add("save", this.save);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

@Override
@Pure
public String toString() {
 return new ToStringBuilder(this)
   .addAllFields()
   .toString();
}

代码示例来源:origin: eclipse/lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("snippetSupport", this.snippetSupport);
 b.add("commitCharactersSupport", this.commitCharactersSupport);
 b.add("documentationFormat", this.documentationFormat);
 b.add("deprecatedSupport", this.deprecatedSupport);
 b.add("preselectSupport", this.preselectSupport);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.ide

@Override
@Pure
public String toString() {
 return new ToStringBuilder(this)
   .addAllFields()
   .toString();
}

代码示例来源:origin: eclipse/lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("name", this.name);
 b.add("kind", this.kind);
 b.add("deprecated", this.deprecated);
 b.add("location", this.location);
 b.add("containerName", this.containerName);
 return b.toString();
}

代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("uri", this.uri);
 b.add("languageId", this.languageId);
 b.add("version", this.version);
 b.add("text", this.text);
 return b.toString();
}

代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("red", this.red);
 b.add("green", this.green);
 b.add("blue", this.blue);
 b.add("alpha", this.alpha);
 return b.toString();
}

代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("documentChanges", this.documentChanges);
 b.add("resourceChanges", this.resourceChanges);
 b.add("resourceOperations", this.resourceOperations);
 b.add("failureHandling", this.failureHandling);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("expectedType", this.expectedType);
 b.add("classFinder", this.classFinder);
 b.add("visibleFeatures", this.visibleFeatures);
 b.add("alreadyEvaluating", this.alreadyEvaluating);
 return b.toString();
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xtext.generator

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("expression", this.expression);
 b.add("type", this.type);
 b.add("provider", this.provider);
 b.add("statements", this.statements);
 return b.toString();
}

代码示例来源:origin: eclipse/lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("threadId", this.threadId);
 b.add("startFrame", this.startFrame);
 b.add("levels", this.levels);
 b.add("format", this.format);
 return b.toString();
}

代码示例来源:origin: eclipse/lsp4j

@Override
@Pure
public String toString() {
 ToStringBuilder b = new ToStringBuilder(this);
 b.add("red", this.red);
 b.add("green", this.green);
 b.add("blue", this.blue);
 b.add("alpha", this.alpha);
 return b.toString();
}

相关文章