public static final Any unserializeClosure(Unserializer unserializer) throws UnserializationException
{
AnyFunction function = new AnyFunction();
unserializer.register(function);
Type type = AnyType.unserializeType(unserializer);
AnyClass self = null;
if (unserializer.peek() == 'n') {
unserializer.consume('n');
} else {
self = (AnyClass)unserializer.unserialize();
}
switch(type.getType()) {
case Type.FUNCTION:
case Type.METHOD:
{
Function func = (Function)type;
function._self = self;