Package com.tonic.analysis
Class BootstrapFamilies
- java.lang.Object
-
- com.tonic.analysis.BootstrapFamilies
-
public final class BootstrapFamilies extends Object
Owner/name predicates for the JDK bootstrap-method families reachable from invokedynamic and constant-dynamic.
-
-
Field Summary
Fields Modifier and Type Field Description static StringLAMBDA_METAFACTORYInternal name ofLambdaMetafactory, the lambda/method-reference bootstrap owner.static StringOBJECT_METHODSInternal name ofObjectMethods, the record-component bootstrap owner (Java 16+).static StringSTRING_CONCAT_FACTORYInternal name ofStringConcatFactory, the string-concatenation bootstrap owner.static StringSWITCH_BOOTSTRAPSInternal name ofSwitchBootstraps, the pattern-switch bootstrap owner (Java 21+).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisLambda(String owner, String name)Tests whether an owner/name pair is theLambdaMetafactorymetafactoryoraltMetafactorybootstrap.static booleanisRecord(String owner, String name)Tests whether an owner/name pair is theObjectMethods.bootstraprecord bootstrap.static booleanisStringConcat(String owner)Tests whether an owner isStringConcatFactory.static booleanisSwitch(String owner)Tests whether an owner isSwitchBootstraps.
-
-
-
Field Detail
-
LAMBDA_METAFACTORY
public static final String LAMBDA_METAFACTORY
Internal name ofLambdaMetafactory, the lambda/method-reference bootstrap owner.- See Also:
- Constant Field Values
-
STRING_CONCAT_FACTORY
public static final String STRING_CONCAT_FACTORY
Internal name ofStringConcatFactory, the string-concatenation bootstrap owner.- See Also:
- Constant Field Values
-
OBJECT_METHODS
public static final String OBJECT_METHODS
Internal name ofObjectMethods, the record-component bootstrap owner (Java 16+).- See Also:
- Constant Field Values
-
SWITCH_BOOTSTRAPS
public static final String SWITCH_BOOTSTRAPS
Internal name ofSwitchBootstraps, the pattern-switch bootstrap owner (Java 21+).- See Also:
- Constant Field Values
-
-
Method Detail
-
isStringConcat
public static boolean isStringConcat(String owner)
Tests whether an owner isStringConcatFactory.- Parameters:
owner- internal name of the bootstrap owner- Returns:
- true if the owner is the string-concatenation factory
-
isLambda
public static boolean isLambda(String owner, String name)
Tests whether an owner/name pair is theLambdaMetafactorymetafactoryoraltMetafactorybootstrap.- Parameters:
owner- internal name of the bootstrap ownername- bootstrap method name- Returns:
- true if the pair names a lambda metafactory bootstrap
-
isRecord
public static boolean isRecord(String owner, String name)
Tests whether an owner/name pair is theObjectMethods.bootstraprecord bootstrap.- Parameters:
owner- internal name of the bootstrap ownername- bootstrap method name- Returns:
- true if the pair names the record bootstrap
-
isSwitch
public static boolean isSwitch(String owner)
Tests whether an owner isSwitchBootstraps.- Parameters:
owner- internal name of the bootstrap owner- Returns:
- true if the owner is the pattern-switch bootstrap holder
-
-