Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java - JNI accessing inner classes

Reply
Thread Tools

Java - JNI accessing inner classes

 
 
zhou820123 zhou820123 is offline
Junior Member
Join Date: Oct 2010
Posts: 4
 
      10-28-2010
I want a native method access and value labelBase[i] of class page in class parser, how could I accomplish this?

Thank you very much. Class structure is as below:

package com.example.hellojni;

public class parser {
public native page parse_net_data(byte[] data, int len);

class page {
int pageKind;
String Title;
String exTile;
String url;
labelBase[] label;
public native void nn();
}

abstract class labelBase {
int labelKind;
String url;

void setValue(int labelKind,String url){
this.labelKind = labelKind;
this.url = url;
}
}

class text extends labelBase {
byte[] nda ;

public String info;
int nn = nda.length;
public int align;
}

class hyperlink extends labelBase {
public String info;
public String url;
public int align;
}
}
 
Reply With Quote
 
 
 
 
zhou820123 zhou820123 is offline
Junior Member
Join Date: Oct 2010
Posts: 4
 
      10-28-2010
this is not only to access inner classes, but also to access the array member of object type in inner classes.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI accessing inner classes Bill Medland Java 2 02-27-2009 10:06 AM
failing to instantiate an inner class because of order of inner classes Pyenos Python 2 12-27-2006 11:19 PM
What is the difference between nested classes and inner classes ? Razvan Java 5 07-27-2004 07:59 PM
How to access inner classes variables & methods from outer classes lonelyplanet999 Java 1 11-13-2003 01:54 PM
inner classes in python as inner classes in Java Carlo v. Dango Python 14 10-19-2003 08:49 AM



Advertisments