Ejemplo n.º 1
0
        public JavaClass(JavaENV _env, string _name)
        {
            name = _name;
            env  = _env;
            switch (name)
            {
            case "int": name = "java.lang.Integer"; break;

            case "long": name = "java.lang.Long"; break;

            case "boolean": name = "java.lang.Boolean"; break;

            case "float": name = "java.lang.Float"; break;

            case "double": name = "java.lang.Double"; break;

            case "char": name = "java.lang.Character"; break;

            case "short": name = "java.lang.Short"; break;

            case "byte": name = "java.lang.Byte"; break;

            case "array": name = "java.lang.Array"; break;

            case "void": name = "java.lang.Void"; break;
            }
            id   = env.FindClass(JavaBasicConst.ToJNIClassFullName(name));
            name = _name;

            if (id <= 0)
            {
                throw new Exception("class[" + name + "] is not found");
            }
        }
Ejemplo n.º 2
0
 public JavaField(JavaENV _env, JavaClass _cls, string _name, string _type)
     : base(_env, _cls, _name, _type)
 {
     id = env.GetFieldID(klass.GetID(), name, JavaBasicConst.ToJNISigName(type));
     if (id <= 0)
     {
         throw new Exception("field[" + name + "] is not found");
     }
 }
Ejemplo n.º 3
0
 protected string GetMethodSig()
 {
     string signame = "(";
     foreach (string x in paramlist)
     {
         signame += JavaBasicConst.ToJNISigName(x);
     }
     signame += ")" + JavaBasicConst.ToJNISigName(returntype);
     return signame;
 }