@Override
        public synchronized Class<?> loadClass(String name) throws ClassNotFoundException {
            if (!name.startsWith(targetClass.getName())) {
                return super.loadClass(name);
            }
            if (memo.containsKey(name)) {
                return memo.get(name);
            }
            final byte[] bytes = ForClassLoader.read(Class.forName(name));
            final Class<?> clazz = defineClass(name, bytes, 0, bytes.length, null);
            Arrays.stream(clazz.getConstructors()).forEach(c -> c.setAccessible(true));
            memo.put(name, clazz);
            return clazz;
        }
A simple class loader used to re-initialize a class.
thrift/thrift0.13/src/test/java/com/linecorp/armeria/internal/server/thrift/ThriftClassLoadingTest.java