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"); } }
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"); } }
protected string GetMethodSig() { string signame = "("; foreach (string x in paramlist) { signame += JavaBasicConst.ToJNISigName(x); } signame += ")" + JavaBasicConst.ToJNISigName(returntype); return(signame); }