generate createNeighborsSubclass methods