Beispiel #1
0
        private SSMethodInfo[] _GetMethods()
        {
            if (IsCompiledType)
            {
                return(CompiledType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy)
                       .Where(x => x.IsPrivate == false)
                       .Select(x => new SSMethodInfo(x)
                {
                    Id = x.Name,
                    IsStatic = x.IsStatic,
                    AccessModifier = AccessModifierParser.Get(x)
                })
                       .ToArray());
            }
            else
            {
                if (Parent == null)
                {
                    return(InterpretKlass.GetMethods());
                }

                return(Parent.GetMethods()
                       .Concat(InterpretKlass.GetMethods())
                       .GroupBy(x => x.Signature)
                       .Select(x => x.Last())
                       .ToArray());
            }
        }
Beispiel #2
0
 private SSMethodInfo[] _GetStaticMethods()
 {
     if (IsCompiledType)
     {
         return(CompiledType.GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
                .Select(x => new SSCompiledMethodInfo(x))
                .ToArray());
     }
     else
     {
         if (Parent == null)
         {
             return(InterpretKlass.GetMethods());
         }
         return(InterpretKlass.GetMethods()
                .Concat(Parent.GetStaticMethods())
                .ToArray());
     }
 }
Beispiel #3
0
 private SSMethodInfo[] _GetStaticMethods()
 {
     if (IsCompiledType)
     {
         return(CompiledType.GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy)
                .Select(x => new SSMethodInfo(x)
         {
             Id = x.Name,
             IsStatic = x.IsStatic,
             AccessModifier = AccessModifierParser.Get(x)
         })
                .ToArray());
     }
     else
     {
         if (Parent == null)
         {
             return(InterpretKlass.GetMethods());
         }
         return(InterpretKlass.GetMethods()
                .Concat(Parent.GetStaticMethods())
                .ToArray());
     }
 }