상속: _Member
예제 #1
0
        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);
            }
        }
예제 #2
0
 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());
 }
예제 #4
0
 public virtual String getConstructorSignature <T1>(Constructor <T1> c)
 {
     return(c.Signature);
 }
예제 #5
0
 public virtual int getConstructorSlot <T1>(Constructor <T1> c)
 {
     return(c.Slot);
 }
예제 #6
0
 public virtual void setConstructorAccessor <T1>(Constructor <T1> c, ConstructorAccessor accessor)
 {
     c.ConstructorAccessor = accessor;
 }
예제 #7
0
 public virtual ConstructorAccessor getConstructorAccessor <T1>(Constructor <T1> c)
 {
     return(c.ConstructorAccessor);
 }
예제 #8
0
 public virtual Constructor <T> copyConstructor <T>(Constructor <T> arg)
 {
     return(arg.Copy());
 }