Пример #1
0
 static Test()
 {
     clazz = JClass.ForName ("Test");
     _ctr = clazz.GetConstructor ();
     _foo = clazz.GetMethod ("foo", "(LControllable;)V");
     _bar = clazz.GetMethod ("bar", "()LControllable;");
 }
Пример #2
0
        internal JField(JClass declaringClass, 
			string name,
			string sig,
			bool isStatic,			
			IntPtr methodID)
            : base(methodID)
        {
            this.declaringClass = declaringClass;
            this.name = name;
            this.isStatic = isStatic;
        }
Пример #3
0
        internal JMethod(JClass declaringClass, 
			string name,
			string sig,
			bool isStatic,
			IntPtr methodID)
            : base(methodID)
        {
            this.declaringClass = declaringClass;
            this.name = name;
            this.isStatic = isStatic;
            this.sig = sig;
            this.rType = JMethodReturnType.INVALID;
        }
Пример #4
0
 static Prog()
 {
     clazz = JClass.ForName ("Prog");
     _ctr = clazz.GetConstructor ();
     _max = clazz.GetMethod ("max", "(II)I");
     _maxEx = clazz.GetMethod ("maxEx", "()I");
     _hi = clazz.GetStaticMethod ("hi", "()V");
     _foo = clazz.GetMethod ("foo", "()LProg;");
     _fooA = clazz.GetMethod ("fooA", "()[LProg;");
     _fooB = clazz.GetMethod ("fooB", "([LProg;)I");
     _fooC = clazz.GetMethod ("fooC", "()[I");
     _foo9 = clazz.GetMethod ("foo9", "([I)I");
     _foo10 = clazz.GetMethod ("foo10", "([C)[C");
 }
Пример #5
0
        public JObjectArray(JObject[] source, JClass clazz)
            : this(source.Length, clazz)
        {
            int l = source.Length;
            for (int i = 0; i < l; i++) {
                JObject o = source[i];
                if (o != null) {
                    SetObjectArrayElement (this.Handle, i, o.Handle);
                }
            }

            // TODO ArrayIndexOutOfBoundsException
            // TODO ArrayStoreException
            JThrowable.CheckAndThrow ();
        }
Пример #6
0
 public bool IsAssignableFrom(JClass other)
 {
     return IsAssignableFrom (this.Handle, other.Handle);
 }
Пример #7
0
 public JObjectArray(int length, JClass clazz)
     : base(NewObjectArray (length, clazz.Handle, IntPtr.Zero))
 {
     // out of memory
     JThrowable.CheckAndThrow ();
 }
Пример #8
0
 static ControllableJNIImpl()
 {
     clazz = JClass.ForName ("Controllable");
     _control = clazz.GetMethod ("control", "()V");
 }
Пример #9
0
 static Template()
 {
     clazz = JClass.ForName ("Template");
     _getInstance = clazz.GetStaticMethod ("getInstance", "()LTemplate;");
     _foo = clazz.GetMethod ("foo", "(LTemplate;)V");
 }
Пример #10
0
 static TemplateJNIImpl()
 {
     clazz = JClass.ForName ("Template");
     _bar = clazz.GetMethod ("bar", "()V");
 }
Пример #11
0
        internal JConstructor(JClass declaringClass, 
			IntPtr methodID)
            : base(methodID)
        {
            this.declaringClass = declaringClass;
        }