private static void RegisterJVMConstructor(GType type, Constructor ctor, bool register) { var modifiers = (ModifierFlags) ctor.getModifiers(); if ((modifiers & (ModifierFlags.Private | ModifierFlags.Synthetic)) != ModifierFlags.None) { return; } var res = new GMethod(); res.Type = type; res.Name = "<init>"; res.JVMName = res.Name; res.CLRName = "_ctor" + type.JVMType.getSimpleName(); res.ReturnType = voidType; res.IsJVMMethod = true; res.IsConstructor = true; Class[] parameterTypes = ctor.getParameterTypes(); for (int i = 0; i < parameterTypes.Length; i++) { Class paramType = parameterTypes[i]; res.ParameterNames.Add("par" + i); //+ paramType.ShortName res.Parameters.Add(RegisterClass(paramType)); } ConvertJVMAttributes(type, res, ctor); res.LowerName = (res.Name + res.GetSignatureLowerNoRet()); if (register) { bool force = false; if (UseMethodModifier(type, res, res.Name, res.GetJVMSignature(), ref force)) { return; } type.Constructors.Add(res); } }
public virtual sbyte[] getConstructorParameterAnnotations <T1>(Constructor <T1> c) { return(c.RawParameterAnnotations); }
public static List signatures(Constructor constructor) { return (List) ParameterSignature.signatures(constructor.getParameterTypes(), constructor.getParameterAnnotations()); }
public virtual String getConstructorSignature <T1>(Constructor <T1> c) { return(c.Signature); }
public virtual int getConstructorSlot <T1>(Constructor <T1> c) { return(c.Slot); }
public virtual void setConstructorAccessor <T1>(Constructor <T1> c, ConstructorAccessor accessor) { c.ConstructorAccessor = accessor; }
public virtual ConstructorAccessor getConstructorAccessor <T1>(Constructor <T1> c) { return(c.ConstructorAccessor); }
public virtual Constructor <T> copyConstructor <T>(Constructor <T> arg) { return(arg.Copy()); }