Skip to content

Instantly share code, notes, and snippets.

@ekramalikazi
Created November 23, 2015 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekramalikazi/58509983af8e382ee2b1 to your computer and use it in GitHub Desktop.
Save ekramalikazi/58509983af8e382ee2b1 to your computer and use it in GitHub Desktop.
@Override
public String toString() {
final ReflectionToStringBuilder reflectionToStringBuilder = new ReflectionToStringBuilder(this);
reflectionToStringBuilder.setAppendStatics(true);
reflectionToStringBuilder.setAppendTransients(true);
reflectionToStringBuilder.setExcludeFieldNames(
new String[] {"contentStreamLength", "password"});
return reflectionToStringBuilder.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment