Package io.quarkus.deployment.pkg.steps
Class MethodKey
java.lang.Object
io.quarkus.deployment.pkg.steps.MethodKey
Structured key for a JVM method, storing the three components provided by ASM's
MethodVisitor.visitMethodInsn(int, java.lang.String, java.lang.String, java.lang.String) and
ClassVisitor.visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) without string concatenation.
The three strings (owner, name, descriptor) are interned by ASM's
ClassReader from the class file constant pool, so
storing them as references avoids all allocation. Hash code is lazily cached
and computed from the three pre-cached String.hashCode() values.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()(package private) booleanReturnstrueif this method is a constructor (<init>) or static initializer (<clinit>).(package private) static booleanisJdkOrInfraClass(String nameOrKey) Checks whether an internal class name (or method key starting with a class name) belongs to a JDK or infrastructure package that should be excluded from class-loading chain propagation.(package private) static booleanisSeedMethodOwner(String owner) Returnstrueif the given method owner is one of the JDK classes that contain seed methods (ClassLoader,Class, orMethodHandles.Lookup).(package private) StringtoString()
-
Field Details
-
SEED_METHOD_KEYS
JDK methods that load classes by name — the seeds for call chain propagation. -
owner
-
name
-
descriptor
-
-
Constructor Details
-
MethodKey
-
-
Method Details
-
ownerAsDotName
String ownerAsDotName() -
isInitOrClinit
boolean isInitOrClinit()Returnstrueif this method is a constructor (<init>) or static initializer (<clinit>). -
isSeedMethodOwner
Returnstrueif the given method owner is one of the JDK classes that contain seed methods (ClassLoader,Class, orMethodHandles.Lookup). Used during caller index construction to avoid creatingMethodKeyobjects for JDK/infra calls that cannot possibly be seeds. -
isJdkOrInfraClass
Checks whether an internal class name (or method key starting with a class name) belongs to a JDK or infrastructure package that should be excluded from class-loading chain propagation. Works on both bare owner names (java/lang/Class) and full method keys (java/lang/Class.forName(...)) because the check is prefix-based. -
toString
-
hashCode
public int hashCode() -
equals
-