More meaningful .toString() implementations

This commit is contained in:
Joakim Erdfelt 2022-12-21 12:14:07 -06:00
parent e753f35965
commit ce52ffdd33
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
2 changed files with 12 additions and 0 deletions

View File

@ -60,4 +60,10 @@ public class VirtualHttpContentFactory implements HttpContent.Factory
{
return (_resource != null) && (path != null) && path.endsWith(_matchSuffix);
}
@Override
public String toString()
{
return String.format("%s@%x(factory=%s, resource=%s, matchSuffix=%s, contentType=%s)", this.getClass().getName(), this.hashCode(), _factory, _resource, _matchSuffix, _contentType);
}
}

View File

@ -827,6 +827,12 @@ public class ResourceService
_redirectWelcome = redirectWelcome;
}
@Override
public String toString()
{
return String.format("%s@%x(contentFactory=%s, dirAllowed=%b, redirectWelcome=%b)", this.getClass().getName(), this.hashCode(), this._contentFactory, this._dirAllowed, this._redirectWelcome);
}
public void setWelcomeFactory(WelcomeFactory welcomeFactory)
{
_welcomeFactory = welcomeFactory;