// 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.runtime.newSymbol("convention")).asJavaString();
enums = options.fastARef(context.runtime.newSymbol("enums"));
if (enums != null && !enums.isNil() && !(enums instanceof RubyHash)) {
throw context.runtime.newTypeError("wrong type for options[:enum] "
+ enums.getMetaClass().getName() + " (expected Hash or Enums)");