generate init methods for AnyPointer fields