Java - JNI accessing inner classes

Discussion in 'Java' started by zhou820123, Oct 28, 2010.

  1. zhou820123

    zhou820123

    Joined:
    Oct 28, 2010
    Messages:
    4
    I want a native method access and value labelBase 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;
    }
    }
    zhou820123, Oct 28, 2010
    #1
    1. Advertising

  2. zhou820123

    zhou820123

    Joined:
    Oct 28, 2010
    Messages:
    4
    this is not only to access inner classes, but also to access the array member of object type in inner classes.
    zhou820123, Oct 28, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lonelyplanet999
    Replies:
    1
    Views:
    2,193
    VisionSet
    Nov 13, 2003
  2. Razvan
    Replies:
    5
    Views:
    11,274
    Dale King
    Jul 27, 2004
  3. Bill Medland

    JNI accessing inner classes

    Bill Medland, Jul 19, 2006, in forum: Java
    Replies:
    2
    Views:
    5,959
    nourim
    Feb 27, 2009
  4. Carlo v. Dango
    Replies:
    14
    Views:
    1,010
    Alex Martelli
    Oct 19, 2003
  5. Pyenos
    Replies:
    2
    Views:
    374
    Pyenos
    Dec 27, 2006
Loading...

Share This Page