in rhino/src/main/java/org/mozilla/javascript/NativeDate.java [66:266]
protected void initPrototypeId(int id) {
String s;
int arity;
switch (id) {
case Id_constructor:
arity = 7;
s = "constructor";
break;
case Id_toString:
arity = 0;
s = "toString";
break;
case Id_toTimeString:
arity = 0;
s = "toTimeString";
break;
case Id_toDateString:
arity = 0;
s = "toDateString";
break;
case Id_toLocaleString:
arity = 0;
s = "toLocaleString";
break;
case Id_toLocaleTimeString:
arity = 0;
s = "toLocaleTimeString";
break;
case Id_toLocaleDateString:
arity = 0;
s = "toLocaleDateString";
break;
case Id_toUTCString:
arity = 0;
s = "toUTCString";
break;
case Id_toSource:
arity = 0;
s = "toSource";
break;
case Id_valueOf:
arity = 0;
s = "valueOf";
break;
case Id_getTime:
arity = 0;
s = "getTime";
break;
case Id_getYear:
arity = 0;
s = "getYear";
break;
case Id_getFullYear:
arity = 0;
s = "getFullYear";
break;
case Id_getUTCFullYear:
arity = 0;
s = "getUTCFullYear";
break;
case Id_getMonth:
arity = 0;
s = "getMonth";
break;
case Id_getUTCMonth:
arity = 0;
s = "getUTCMonth";
break;
case Id_getDate:
arity = 0;
s = "getDate";
break;
case Id_getUTCDate:
arity = 0;
s = "getUTCDate";
break;
case Id_getDay:
arity = 0;
s = "getDay";
break;
case Id_getUTCDay:
arity = 0;
s = "getUTCDay";
break;
case Id_getHours:
arity = 0;
s = "getHours";
break;
case Id_getUTCHours:
arity = 0;
s = "getUTCHours";
break;
case Id_getMinutes:
arity = 0;
s = "getMinutes";
break;
case Id_getUTCMinutes:
arity = 0;
s = "getUTCMinutes";
break;
case Id_getSeconds:
arity = 0;
s = "getSeconds";
break;
case Id_getUTCSeconds:
arity = 0;
s = "getUTCSeconds";
break;
case Id_getMilliseconds:
arity = 0;
s = "getMilliseconds";
break;
case Id_getUTCMilliseconds:
arity = 0;
s = "getUTCMilliseconds";
break;
case Id_getTimezoneOffset:
arity = 0;
s = "getTimezoneOffset";
break;
case Id_setTime:
arity = 1;
s = "setTime";
break;
case Id_setMilliseconds:
arity = 1;
s = "setMilliseconds";
break;
case Id_setUTCMilliseconds:
arity = 1;
s = "setUTCMilliseconds";
break;
case Id_setSeconds:
arity = 2;
s = "setSeconds";
break;
case Id_setUTCSeconds:
arity = 2;
s = "setUTCSeconds";
break;
case Id_setMinutes:
arity = 3;
s = "setMinutes";
break;
case Id_setUTCMinutes:
arity = 3;
s = "setUTCMinutes";
break;
case Id_setHours:
arity = 4;
s = "setHours";
break;
case Id_setUTCHours:
arity = 4;
s = "setUTCHours";
break;
case Id_setDate:
arity = 1;
s = "setDate";
break;
case Id_setUTCDate:
arity = 1;
s = "setUTCDate";
break;
case Id_setMonth:
arity = 2;
s = "setMonth";
break;
case Id_setUTCMonth:
arity = 2;
s = "setUTCMonth";
break;
case Id_setFullYear:
arity = 3;
s = "setFullYear";
break;
case Id_setUTCFullYear:
arity = 3;
s = "setUTCFullYear";
break;
case Id_setYear:
arity = 1;
s = "setYear";
break;
case Id_toISOString:
arity = 0;
s = "toISOString";
break;
case Id_toJSON:
arity = 1;
s = "toJSON";
break;
case SymbolId_toPrimitive:
initPrototypeMethod(
DATE_TAG, id, SymbolKey.TO_PRIMITIVE, "[Symbol.toPrimitive]", 1);
return;
default:
throw new IllegalArgumentException(String.valueOf(id));
}
initPrototypeMethod(DATE_TAG, id, s, arity);
}