How to set instance of a property of the same class type

See sample class

class A {
   var proxy: A
   init () {
      proxy = self
   } 
}

In Java, i could do something like this

class A {
   A proxy;
   A () {
      proxy = this
   } 
}

so when i instantiate A sample = new A();
the proxy variable will be set to the "this" keyword.

But in Swift, the only related keyword to it is self but it does not behave the same way. It merely serves somewhat of a pointer to properties and methods that it belongs to it.

Is this possible in Swift? if yes, how to go about this? I could not find any solution (perhaps because there is a term for that style? which I have no clue about)

thoughts?

the proxy variable will be set to the "this" keyword

It is not set to a keyword but to some instance. What is the instance described by this?

In any case, it is usually not a good idea to try to mimic another language pattern. Could you describe precisely what you need to do ?

How to set instance of a property of the same class type
 
 
Q