Package com.tonic.analysis
Class Bootstraps
- java.lang.Object
-
- com.tonic.analysis.Bootstraps
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBootstraps.BootstrapRefImmutable resolved view of a single bootstrap method.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringconstantValue(ConstPool constPool, int cpIndex)Renders a loadable constant at the given index to a readable string, mirroring disassembly's constant formatting.static StringreadableRecipe(String raw)Renders aStringConcatFactoryrecipe to its readable{arg}/{const}form.static Bootstraps.BootstrapRefresolve(ClassFile classFile, int attrIndex)Resolves the bootstrap at the given BootstrapMethods-attribute index.
-
-
-
Method Detail
-
resolve
public static Bootstraps.BootstrapRef resolve(ClassFile classFile, int attrIndex)
Resolves the bootstrap at the given BootstrapMethods-attribute index.- Parameters:
classFile- the owning class fileattrIndex- the bootstrap-method attribute index (from an indy/condy CP item)- Returns:
- the resolved reference, or
nullwhen the attribute or index is invalid
-
constantValue
public static String constantValue(ConstPool constPool, int cpIndex)
Renders a loadable constant at the given index to a readable string, mirroring disassembly's constant formatting.- Parameters:
constPool- the constant poolcpIndex- the constant-pool index- Returns:
- a readable representation of the constant
-
-