static SetResponse
ofType(int type) {
	switch (type) {
		case UNKNOWN:
			return unknown;
		case NXDOMAIN:
			return nxdomain;
		case NXRRSET:
			return nxrrset;
		case DELEGATION:
		case CNAME:
		case DNAME:
		case SUCCESSFUL:
			SetResponse sr = new SetResponse();
			sr.type = type;
			sr.data = null;
			return sr;
		default:
			throw new IllegalArgumentException("invalid type");
	}
}
The Cache/Zone has successfully answered the question for the
requested name/type/class.
src/main/java/core/org/xbill/DNS/SetResponse.java