This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]