Package com.tonic.analysis
Class DisassemblyOptions
- java.lang.Object
-
- com.tonic.analysis.DisassemblyOptions
-
public final class DisassemblyOptions extends Object
Immutable flag set selecting which enrichmentsCodePrinteradds to a method disassembly, built fromterse()orverbose()and refined with thewith*copies.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisExceptionTable()booleanisHeader()booleanisLineNumbers()booleanisLocalVariables()booleanisResolveBootstraps()booleanisStackMapFrames()static DisassemblyOptionsterse()Creates options with every enrichment disabled.static DisassemblyOptionsverbose()Creates options with every enrichment enabled.DisassemblyOptionswithExceptionTable(boolean exceptionTable)Derives a copy with the exception-table flag replaced.DisassemblyOptionswithHeader(boolean header)Derives a copy with the header flag replaced.DisassemblyOptionswithLineNumbers(boolean lineNumbers)Derives a copy with the line-number flag replaced.DisassemblyOptionswithLocalVariables(boolean localVariables)Derives a copy with the local-variable flag replaced.DisassemblyOptionswithResolveBootstraps(boolean resolveBootstraps)Derives a copy with the bootstrap-resolution flag replaced.DisassemblyOptionswithStackMapFrames(boolean stackMapFrames)Derives a copy with the stack-map-frame flag replaced.
-
-
-
Method Detail
-
isHeader
public boolean isHeader()
- Returns:
- whether a
max_stack/max_localsheader line is emitted
-
isLineNumbers
public boolean isLineNumbers()
- Returns:
- whether
// line Ncomments from the LineNumberTable are interleaved
-
isLocalVariables
public boolean isLocalVariables()
- Returns:
- whether local-slot operands are annotated with
// name: descriptorfrom the LocalVariableTable
-
isExceptionTable
public boolean isExceptionTable()
- Returns:
- whether the method's exception table is emitted
-
isStackMapFrames
public boolean isStackMapFrames()
- Returns:
- whether stack-map frame markers from the StackMapTable are interleaved
-
isResolveBootstraps
public boolean isResolveBootstraps()
- Returns:
- whether each invokedynamic's bootstrap method handle and static arguments are resolved
-
withHeader
public DisassemblyOptions withHeader(boolean header)
Derives a copy with the header flag replaced.- Parameters:
header- whether to emit themax_stack/max_localsheader line- Returns:
- the derived options
-
withLineNumbers
public DisassemblyOptions withLineNumbers(boolean lineNumbers)
Derives a copy with the line-number flag replaced.- Parameters:
lineNumbers- whether to interleave// line Ncomments- Returns:
- the derived options
-
withLocalVariables
public DisassemblyOptions withLocalVariables(boolean localVariables)
Derives a copy with the local-variable flag replaced.- Parameters:
localVariables- whether to annotate local-slot operands from the LocalVariableTable- Returns:
- the derived options
-
withExceptionTable
public DisassemblyOptions withExceptionTable(boolean exceptionTable)
Derives a copy with the exception-table flag replaced.- Parameters:
exceptionTable- whether to emit the method's exception table- Returns:
- the derived options
-
withStackMapFrames
public DisassemblyOptions withStackMapFrames(boolean stackMapFrames)
Derives a copy with the stack-map-frame flag replaced.- Parameters:
stackMapFrames- whether to interleave stack-map frame markers- Returns:
- the derived options
-
withResolveBootstraps
public DisassemblyOptions withResolveBootstraps(boolean resolveBootstraps)
Derives a copy with the bootstrap-resolution flag replaced.- Parameters:
resolveBootstraps- whether to resolve each invokedynamic's bootstrap handle and static arguments- Returns:
- the derived options
-
terse
public static DisassemblyOptions terse()
Creates options with every enrichment disabled.- Returns:
- the bare instruction-listing options
-
verbose
public static DisassemblyOptions verbose()
Creates options with every enrichment enabled.- Returns:
- the fully enriched options
-
-