Package com.tonic.analysis.ssa.ir
Class BootstrapMethodInfo
- java.lang.Object
-
- com.tonic.analysis.ssa.ir.BootstrapMethodInfo
-
public class BootstrapMethodInfo extends Object
Represents bootstrap method information for invokedynamic and constant dynamic.
-
-
Constructor Summary
Constructors Constructor Description BootstrapMethodInfo(MethodHandleConstant bootstrapMethod, List<Constant> bootstrapArguments)Creates a bootstrap method info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<Constant>getBootstrapArguments()MethodHandleConstantgetBootstrapMethod()inthashCode()booleanisLambdaMetafactory()Checks if this is a lambda metafactory bootstrap.booleanisObjectMethodsBootstrap()Checks if this is the recordsObjectMethodsbootstrap (Java 16) backing the auto-generatedequals/hashCode/toStringof a record.booleanisStringConcatFactory()Checks if this is a string concatenation bootstrap.booleanisSwitchBootstrap()Checks if this is aSwitchBootstrapsbootstrap (Java 21 pattern switch):typeSwitchorenumSwitch.StringtoString()
-
-
-
Constructor Detail
-
BootstrapMethodInfo
public BootstrapMethodInfo(MethodHandleConstant bootstrapMethod, List<Constant> bootstrapArguments)
Creates a bootstrap method info.- Parameters:
bootstrapMethod- the bootstrap method handlebootstrapArguments- the static arguments to the bootstrap method
-
-
Method Detail
-
getBootstrapMethod
public MethodHandleConstant getBootstrapMethod()
- Returns:
- the bootstrap method
-
getBootstrapArguments
public List<Constant> getBootstrapArguments()
- Returns:
- the bootstrap arguments
-
isLambdaMetafactory
public boolean isLambdaMetafactory()
Checks if this is a lambda metafactory bootstrap.- Returns:
- true if this uses LambdaMetafactory
-
isStringConcatFactory
public boolean isStringConcatFactory()
Checks if this is a string concatenation bootstrap.- Returns:
- true if this uses StringConcatFactory
-
isObjectMethodsBootstrap
public boolean isObjectMethodsBootstrap()
Checks if this is the recordsObjectMethodsbootstrap (Java 16) backing the auto-generatedequals/hashCode/toStringof a record.- Returns:
- true if this uses java.lang.runtime.ObjectMethods
-
isSwitchBootstrap
public boolean isSwitchBootstrap()
Checks if this is aSwitchBootstrapsbootstrap (Java 21 pattern switch):typeSwitchorenumSwitch.- Returns:
- true if this uses java.lang.runtime.SwitchBootstraps
-
-