Makes JavaClass inherit type