42 static readonly ConditionalWeakTable<MethodBase, Lazy<HideFromJavaFlags>> hideFromJavaFlagCache =
new ConditionalWeakTable<MethodBase, Lazy<HideFromJavaFlags>>();
51 return hideFromJavaFlagCache.GetValue(mb, _ =>
new Lazy<HideFromJavaFlags>(() => GetHideFromJavaFlagsImpl(_),
true)).Value;
62 throw new NotImplementedException();
64 return mb.Name.StartsWith(
"__<", StringComparison.Ordinal) ? HideFromJavaFlags.All :
JVM.Context.
AttributeHelper.GetHideFromJavaFlags(mb);
73 internal static bool IsHideFromStackWalk(
MethodBase mb)
76 throw new NotImplementedException();
78 var type = mb.DeclaringType;
80 type.Assembly == typeof(
object).
Assembly ||
82 type == typeof(global::java.lang.reflect.Method) ||
83 type == typeof(global::java.lang.reflect.Constructor) ||
94 throw new NotImplementedException();
96 throw new global::java.lang.InternalError(
"CallerSensitive annotation expected at frame 1");
105 throw new NotImplementedException();
107 if (realFramesToSkip <= 0)
108 return (global::java.lang.Class)
ClassLiteral<global::sun.reflect.Reflection>.
Value;
112 var method =
new StackFrame(i++,
false).GetMethod();
116 if (IsHideFromStackWalk(method))
124 if (--realFramesToSkip == 0)
133 int mods = (int)RuntimeJavaType.FromClass(clazz).Modifiers & 0x7631;
135 mods |= (mods & 0x0200) << 1;
139 public static bool checkInternalAccess(global::java.lang.Class currentClass, global::java.lang.Class memberClass)
141 var current = RuntimeJavaType.FromClass(currentClass);
142 var member = RuntimeJavaType.FromClass(memberClass);
143 return member.IsInternal && member.InternalsVisibleTo(current);
AttributeHelper AttributeHelper
Gets the AttributeHelper associated with this instance of the runtime.
RuntimeClassLoaderFactory ClassLoaderFactory
Gets the RuntimeClassLoaderFactory associated with this instance of the runtime.