public static int
value(String s, boolean numberok) {
	int val = types.getValue(s);
	if (val == -1 && numberok) {
		val = types.getValue("TYPE" + s);
	}
	return val;
}
Converts a String representation of an Type into its numeric value.
@param s The string representation of the type
@param numberok Whether a number will be accepted or not.
@return The type code, or -1 on error.
src/main/java/core/org/xbill/DNS/Type.java