72 static readonly
string This =
string.Intern(
"this");
73 static readonly
string New =
string.Intern(
"new");
74 static readonly
string Fault =
string.Intern(
"<fault>");
77 readonly RuntimeJavaType underlyingType;
89 base(context,
TypeFlags.
None, RuntimeJavaType.VerifierTypeModifiersHack, name)
92 this.underlyingType = underlyingType;
93 this.methodAnalyzer = methodAnalyzer;
110 this.context = context ??
throw new ArgumentNullException(nameof(context));
113 internal void ClearFaultBlockException(
int dummy) { }
115 public RuntimeContext Context => context;
123 return GetType().Name +
"[" +
Name +
"," + index +
"," + underlyingType +
"]";
126 internal static RuntimeJavaType MakeNew(RuntimeJavaType type,
int bytecodeIndex)
131 internal static RuntimeJavaType MakeFaultBlockException(MethodAnalyzer ma,
int handlerIndex)
141 internal static RuntimeJavaType MakeThis(RuntimeJavaType type)
146 internal static bool IsNotPresentOnStack(RuntimeJavaType w)
148 return IsNew(w) || IsFaultBlockException(w);
151 internal static bool IsNew(RuntimeJavaType w)
153 return w !=
null && w.IsVerifierType && ReferenceEquals(w.Name, New);
156 internal static bool IsFaultBlockException(RuntimeJavaType w)
158 return w !=
null && w.IsVerifierType && ReferenceEquals(w.Name, Fault);
161 internal static bool IsNullOrUnloadable(RuntimeJavaType w)
163 return w == w.Context.VerifierJavaTypeFactory.Null || w.IsUnloadable;
166 internal static bool IsThis(RuntimeJavaType w)
168 return w !=
null && w.IsVerifierType && ReferenceEquals(w.Name, This);
171 internal static void ClearFaultBlockException(RuntimeJavaType w)
174 vtw.methodAnalyzer.ClearFaultBlockException(vtw.Index);
185 internal RuntimeJavaType UnderlyingType
189 return underlyingType;
193 internal override RuntimeJavaType BaseTypeWrapper
198 internal override RuntimeClassLoader ClassLoader =>
null;
202 throw new InvalidOperationException(
"LazyPublishMembers called on " +
this);
205 internal override Type TypeAsTBD
209 throw new InvalidOperationException(
"get_Type called on " +
this);
213 internal override RuntimeJavaType[] Interfaces
217 throw new InvalidOperationException(
"get_Interfaces called on " +
this);
221 internal override RuntimeJavaType[] InnerClasses
225 throw new InvalidOperationException(
"get_InnerClasses called on " +
this);
229 internal override RuntimeJavaType DeclaringTypeWrapper
233 throw new InvalidOperationException(
"get_DeclaringTypeWrapper called on " +
this);
237 internal override void Finish()
239 throw new InvalidOperationException(
"Finish called on " +
this);
Maintains services relevant to an instane of the IKVM runtime.