this.name = name;
arity = ANY_ARITY;
}
public ErlangFunction(final OtpErlangTuple tuple) {
OtpErlangAtom a;
arity = 0;
if (tuple.arity() == 2) {
a = (OtpErlangAtom) tuple.elementAt(0);
final OtpErlangLong l = (OtpErlangLong) tuple.elementAt(1);
try {
arity = l.intValue();
} catch (final OtpErlangRangeException e) {
}
} else {
a = (OtpErlangAtom) tuple.elementAt(2);
final OtpErlangObject parameters = tuple.elementAt(3);
if (parameters instanceof OtpErlangLong) {
final OtpErlangLong l = (OtpErlangLong) parameters;
try {
arity = l.intValue();
} catch (final OtpErlangRangeException e) {
}
} else if (parameters instanceof OtpErlangList) {
final OtpErlangList l = (OtpErlangList) parameters;
arity = l.arity();
}
}
name = a.atomValue();
}