This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
quickie about visibility
- From: Nic Ferrier <nferrier at tapsellferrier dot co dot uk>
- To: java at gcc dot gnu dot org
- Date: 23 Jan 2002 02:51:52 +0000
- Subject: quickie about visibility
Sorry about all these, I'm just asking them as they occur to me...
Is a C++ method allowed to call a C++ method which is not visible to
Java through a class reference?
For example:
class T
{
public native void someX ();
}
CNI::
void
::someX ()
{
::S s = new ::S ();
s->privMethod ();
}
class S
{
}
CNI::
void
privMethod ()
{
// do nothing.
}
T::someX creates a new S and then calls a method that is only visible
to the C++ layer.
I need to do this because I have some types that I'm trying to hide
from Java, I need to expose them across class boundaries though so I
was going to have the CNI of one class set them on another via a C++
method not visible to the Java code.
Anyone got any idea how to do this?
Nic