867 {
868 const BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
869
870 var fields = new List<RuntimeJavaField>();
871 var rawfields = type.GetFields(flags);
872 Array.Sort(rawfields, SortFieldByToken);
873
874
875
876 var properties = type.GetProperties(flags);
877 foreach (var field in rawfields)
878 {
879 var hideFromJavaFlags = Context.
AttributeHelper.GetHideFromJavaFlags(field);
881 {
882 if (field.Name.StartsWith(NamePrefix.Type2AccessStubBackingField, StringComparison.Ordinal))
883 {
884 var tw = GetFieldTypeWrapper(Context, field);
885 var name = field.Name.Substring(NamePrefix.Type2AccessStubBackingField.Length);
886 for (int i = 0; i < properties.Length; i++)
887 {
888 if (properties[i] !=
null && name == properties[i].
Name && MatchTypes(tw, GetPropertyTypeWrapper(properties[i])))
889 {
890 fields.Add(new RuntimeManagedByteCodeAccessStubJavaField(this, properties[i], field, tw));
891 properties[i] = null;
892 break;
893 }
894 }
895 }
896 }
897 else
898 {
899 if (field.IsSpecialName && field.Name.StartsWith("__<", StringComparison.Ordinal))
900 {
901
902 }
903 else
904 {
905 fields.Add(CreateFieldWrapper(field, hideFromJavaFlags));
906 }
907 }
908 }
909
910 foreach (var property in properties)
911 if (property != null)
912 AddPropertyFieldWrapper(fields, property, null);
913
914 SetFields(fields.ToArray());
915 }
global::java.lang.invoke.LambdaForm.Name Name
AttributeHelper AttributeHelper
Gets the AttributeHelper associated with this instance of the runtime.