IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Runtime.RuntimeAnonymousJavaType Class Referencesealed

Represents an intrinsified anonymous class. Currently only used by LambdaMetafactory. More...

Protected Member Functions

override void LazyPublishMembers ()
 

Detailed Description

Represents an intrinsified anonymous class. Currently only used by LambdaMetafactory.

Definition at line 39 of file RuntimeAnonymousJavaType.cs.

Member Function Documentation

◆ LazyPublishMembers()

override void IKVM.Runtime.RuntimeAnonymousJavaType.LazyPublishMembers ( )
protected

Definition at line 94 of file RuntimeAnonymousJavaType.cs.

95 {
96 var methods = new List<RuntimeJavaMethod>();
97 foreach (var mi in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
98 {
99 if (mi.IsSpecialName)
100 {
101 // we use special name to hide default methods
102 }
103 else if (mi.IsPublic)
104 {
105 GetSig(mi, out var returnType, out var parameterTypes, out var signature);
106 methods.Add(new RuntimeTypicalJavaMethod(this, mi.Name, signature, mi, returnType, parameterTypes, Modifiers.Public, MemberFlags.None));
107 }
108 else if (mi.Name == "writeReplace")
109 {
110 methods.Add(new RuntimeTypicalJavaMethod(this, "writeReplace", "()Ljava.lang.Object;", mi, Context.JavaBase.TypeOfJavaLangObject, Array.Empty<RuntimeJavaType>(), Modifiers.Private | Modifiers.Final, MemberFlags.None));
111 }
112 }
113
114 SetMethods(methods.ToArray());
115
116 var fields = new List<RuntimeJavaField>();
117 foreach (var fi in type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
118 {
119 var fieldType = RuntimeManagedByteCodeJavaType.GetFieldTypeWrapper(Context, fi);
120 fields.Add(new RuntimeSimpleJavaField(this, fieldType, fi, fi.Name, fieldType.SigName, new ExModifiers(Modifiers.Private | Modifiers.Final, false)));
121 }
122
123 SetFields(fields.ToArray());
124 }
CoreClasses JavaBase
Gets the CoreClasses associated with this instance of the runtime.
MemberFlags
Describes various options applied to a member.

The documentation for this class was generated from the following file: