public XMLEventParser newInstance() { java.lang.reflect.Constructor <AbstractXMLEventParser> constructor = this.getAConstructor(typeof(string)); if (constructor != null) { return(constructor.newInstance(this.getNamespaceURI())); } constructor = this.getAConstructor(); if (constructor != null) { return(constructor.newInstance()); } return(null); }
public static object DynamicInvokeSpecialNew(RuntimeTypeHandle type, string clazz, string name, string sig, object[] args, [email protected] callerID) { Profiler.Count("DynamicInvokeSpecialNew"); MethodWrapper mw = GetMethodWrapper(null, type, clazz, name, sig, false); java.lang.reflect.Constructor cons = (java.lang.reflect.Constructor)mw.ToMethodOrConstructor(false); return(cons.newInstance(BoxArgs(mw, args), callerID)); }
protected virtual Delegate CloneThis() { //In standart method pointers will be replaced //TODO: replace javaClass.forName with object.class javaClass thisClass = this.getClass(); java.lang.reflect.Constructor ctor = thisClass.getConstructor(javaClass.forName("java.lang.Object"), GetPointerClass()); return((Delegate)ctor.newInstance(target, method)); }