Accessing properties and methods of like objects

Hello.

Is there a straightforward means of limiting access to a class’s properties and methods to other instances of that class? For instance, say we have two instances of the Example class. Is there a way to allow one instance to access certain properties of the other, but to prevent any instance of any class that is not Example from accessing the same properties? (That includes non-Example classes in the same package as Example- I know about the internal namespace. But I like the way you’re thinking.)

I’m tempted to do something with custom namespaces, but I’m not very experienced with them. Any ideas?