public void link() {
        for (MethodDef method : staticMethods)
            method.link();
        for (MethodDef method : instanceMethods)
            method.link();

        // Unless this is an abstract type, populate the virtual method table.
        if (virtualMethodDescTable != null)
            for (RawMethod aDesc : virtualMethodDescTable.keySet()) {
                RawMethod bDesc = virtualMethodDescTable.get(aDesc);
                MethodDef a = God.resolveMethod(aDesc), b = God.resolveMethod(bDesc);
                if (!(b instanceof ConcreteMethodDef))
                    throw new RuntimeException("vtable points to abstract method " + b);
                virtualMethodTable.put(a, (ConcreteMethodDef) b);
            }

        // Populate the supertype generics table.
        for (RawType superDesc : superGenericDescs.keySet()) {
            TypeDesc[] superArgDescs = superGenericDescs.get(superDesc);
            TypeDef supertype = God.resolveType(superDesc);
            SuperType[] superArgs = new SuperType[superArgDescs.length];
            for (int i = 0; i < superArgs.length; ++i)
                superArgs[i] = superArgDescs[i].toSuper();
            superGenerics.put(supertype, superArgs);
        }
    }