getParameterTypes() private method

private getParameterTypes ( ) : java.lang.Class[]
return java.lang.Class[]
示例#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);
            }
        }
 public static List signatures(Constructor constructor)
 {
   return (List) ParameterSignature.signatures(constructor.getParameterTypes(), constructor.getParameterAnnotations());
 }