// Get the convention from the options hash
String convention = "default";
IRubyObject enums = null;
if (args[3] instanceof RubyHash) {
RubyHash options = (RubyHash) args[3];
convention = options.fastARef(context.getRuntime().newSymbol("convention")).asJavaString();
enums = options.fastARef(context.getRuntime().newSymbol("enums"));
if (enums != null && !enums.isNil() && !(enums instanceof RubyHash)) {
throw context.getRuntime().newTypeError("wrong type for options[:enum] "
+ enums.getMetaClass().getName() + " (expected Hash)");