Esempio n. 1
0
    public static object[] getParameters0(java.lang.reflect.Executable _this)
    {
#if FIRST_PASS
        return(null);
#else
        MethodWrapper           mw = MethodWrapper.FromExecutable(_this);
        MethodParametersEntry[] methodParameters = mw.DeclaringType.GetMethodParameters(mw);
        if (methodParameters == null)
        {
            return(null);
        }
        if (methodParameters == MethodParametersEntry.Malformed)
        {
            throw new java.lang.reflect.MalformedParametersException("Invalid constant pool index");
        }
        java.lang.reflect.Parameter[] parameters = new java.lang.reflect.Parameter[methodParameters.Length];
        for (int i = 0; i < parameters.Length; i++)
        {
            parameters[i] = new java.lang.reflect.Parameter(methodParameters[i].name ?? "", methodParameters[i].flags, _this, i);
        }
        return(parameters);
#endif
    }
Esempio n. 2
0
    public static object[][] sharedGetParameterAnnotationsImpl(java.lang.reflect.Executable executable)
    {
#if FIRST_PASS
        return(null);
#else
        MethodWrapper mw     = MethodWrapper.FromExecutable(executable);
        object[][]    objAnn = mw.DeclaringType.GetParameterAnnotations(mw);
        if (objAnn == null)
        {
            return(null);
        }
        java.lang.annotation.Annotation[][] ann = new java.lang.annotation.Annotation[objAnn.Length][];
        for (int i = 0; i < ann.Length; i++)
        {
            List <java.lang.annotation.Annotation> list = new List <java.lang.annotation.Annotation>();
            foreach (object obj in objAnn[i])
            {
                java.lang.annotation.Annotation a = obj as java.lang.annotation.Annotation;
                if (a != null)
                {
                    list.Add(Java_java_lang_Class.FreezeOrWrapAttribute(a));
                }
                else if (obj is IKVM.Attributes.DynamicAnnotationAttribute)
                {
                    a = (java.lang.annotation.Annotation)JVM.NewAnnotation(mw.DeclaringType.GetClassLoader().GetJavaClassLoader(), ((IKVM.Attributes.DynamicAnnotationAttribute)obj).Definition);
                    if (a != null)
                    {
                        list.Add(a);
                    }
                }
            }
            ann[i] = list.ToArray();
        }
        return(ann);
#endif
    }
Esempio n. 3
0
    public static object declaredAnnotationsImpl(java.lang.reflect.Executable executable)
    {
        MethodWrapper mw = MethodWrapper.FromExecutable(executable);

        return(Java_java_lang_Class.AnnotationsToMap(mw.DeclaringType.GetClassLoader(), mw.DeclaringType.GetMethodAnnotations(mw)));
    }
Esempio n. 4
0
    public static byte[] getTypeAnnotationBytes0(java.lang.reflect.Executable _this)
    {
        MethodWrapper mw = MethodWrapper.FromExecutable(_this);

        return(mw.DeclaringType.GetMethodRawTypeAnnotations(mw));
    }
Esempio n. 5
0
 public virtual sbyte[] GetExecutableTypeAnnotationBytes(Executable ex)
 {
     return(ex.TypeAnnotationBytes);
 }