是否在 Java找到某类物体是其中一部分?
class WrapperClass
{
SomeObject o;
...
someMethodOfWrapperClass()
{ ... }
}
[...]
SomeObject foo = new SomeObject();
WrapperClass wrap = new WrapperClass();
wrap.o = foo;
Is there any way to find the corresponding WrapperClass object wrap
from within the SomeObject object or one of it s methods?
Something along the lines of:
foo.getWrapperClassObject().someMethodOfWrapperClass();
非常感谢!
Thomas