342 343 /** 344 * Returns the {@code <clinit>} method for this class if there is one. 345 */ 346 ResolvedJavaMethod getClassInitializer(); 347 348 /** 349 * Returns true if this type represents an interface and it should be trusted even in places 350 * where the JVM verifier would not give any guarantees other than {@link Object}. 351 */ 352 boolean isTrustedInterfaceType(); 353 354 default ResolvedJavaMethod findMethod(String name, Signature signature) { 355 for (ResolvedJavaMethod method : getDeclaredMethods()) { 356 if (method.getName().equals(name) && method.getSignature().equals(signature)) { 357 return method; 358 } 359 } 360 return null; 361 } 362 } | 342 343 /** 344 * Returns the {@code <clinit>} method for this class if there is one. 345 */ 346 ResolvedJavaMethod getClassInitializer(); 347 348 /** 349 * Returns true if this type represents an interface and it should be trusted even in places 350 * where the JVM verifier would not give any guarantees other than {@link Object}. 351 */ 352 boolean isTrustedInterfaceType(); 353 354 default ResolvedJavaMethod findMethod(String name, Signature signature) { 355 for (ResolvedJavaMethod method : getDeclaredMethods()) { 356 if (method.getName().equals(name) && method.getSignature().equals(signature)) { 357 return method; 358 } 359 } 360 return null; 361 } 362 363 /** 364 * Returns true if this type is {@link Cloneable} and can be safely cloned by creating a normal 365 * Java allocation and populating it from the fields returned by 366 * {@link #getInstanceFields(boolean)}. Some types may require special handling by the platform 367 * so they would to go through the normal {@link Object#clone} path. 368 */ 369 boolean isCloneableWithAllocation(); 370 } |