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()); } }
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()); } }
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()); } }