Class Op04StructuredStatement
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement
- All Implemented Interfaces:
Graph<Op04StructuredStatement>, MutableGraph<Op04StructuredStatement>, StatementContainer<StructuredStatement>, Dumpable, TypeUsageCollectable
public class Op04StructuredStatement
extends Object
implements MutableGraph<Op04StructuredStatement>, Dumpable, StatementContainer<StructuredStatement>, TypeUsageCollectable
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOp04StructuredStatement(InstrIndex instrIndex, Collection<BlockIdentifier> blockMembership, StructuredStatement structuredStatement) Op04StructuredStatement(StructuredStatement justStatement) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSource(Op04StructuredStatement source) voidaddTarget(Op04StructuredStatement target) static voidapplyChecker(Op04Checker checker, Op04StructuredStatement root, DecompilerComments comments) static voidapplyTypeAnnotations(AttributeCode code, Op04StructuredStatement root, SortedMap<Integer, Integer> instrsByOffset, DecompilerComments comments) static booleancheckTypeClashes(Op04StructuredStatement block, BytecodeMeta bytecodeMeta) voidcollectTypeUsages(TypeUsageCollector collector) static voidvoidvoidstatic voiddiscoverLocalClassScopes(Method method, Op04StructuredStatement root, VariableFactory variableFactory, Options options) static voiddiscoverVariableScopes(Method method, Op04StructuredStatement root, VariableFactory variableFactory, Options options, ClassFileVersion classFileVersion, BytecodeMeta bytecodeMeta) static FieldVariablefindInnerClassOuterThis(Method method, Op04StructuredStatement root) static voidfixInnerClassConstructorSyntheticOuterArgs(ClassFile classFile, Method method, Op04StructuredStatement root, Set<MethodPrototype> processed) static voidgetIndex()getLabel()getTargetLabel(int idx) getTargetStatement(int idx) voidinformBlockMembership(Vector<BlockIdentifier> currentlyIn) static voidstatic voidinlineSyntheticAccessors(DCCommonState state, Method method, Op04StructuredStatement root) static voidbooleanbooleanstatic booleanvoidstatic voidmiscKeyholeTransforms(VariableFactory variableFactory, Op04StructuredStatement root) voidnopOut()voidstatic voidnormalizeInstanceOf(Op04StructuredStatement root, Options options, ClassFileVersion classFileVersion) static voidstatic voidreduceClashDeclarations(Op04StructuredStatement root, BytecodeMeta bytecodeMeta) static voidstatic voidremoveEndResource(ClassFile classFile, Op04StructuredStatement root) static voidremoveInnerClassOuterThis(Method method, Op04StructuredStatement root) voidvoidstatic voidstatic voidstatic voidstatic voidremovePrimitiveDeconversion(Options options, Method method, Op04StructuredStatement root) static voidstatic voidstatic voidremoveUnnecessaryVarargArrays(Options options, Method method, Op04StructuredStatement root) static voidreplaceInSources(Op04StructuredStatement original, Op04StructuredStatement replacement) static voidreplaceInTargets(Op04StructuredStatement original, Op04StructuredStatement replacement) static voidvoidvoidreplaceStatement(StructuredStatement newTarget) voidreplaceStatementWithNOP(String comment) voidstatic voidrewriteBadCastChains(Options options, Method method, Op04StructuredStatement root) static voidrewriteExplicitTypeUsages(Method method, Op04StructuredStatement block, AnonymousClassUsage anonymousClassUsage, ClassFile classFile) static voidrewriteLambdas(DCCommonState state, Method method, Op04StructuredStatement root) static voidrewriteNarrowingAssignments(Options options, Method method, Op04StructuredStatement root) voidsetSources(List<Op04StructuredStatement> sources) voidsetTargets(List<Op04StructuredStatement> targets) static voidswitchExpression(Method method, Op04StructuredStatement root, DecompilerComments comments) static voidstatic voidstatic voidstatic voidtidyObfuscation(Options options, Op04StructuredStatement root) static voidstatic voidstatic voidtidyVariableNames(Method method, Op04StructuredStatement root, BytecodeMeta bytecodeMeta, DecompilerComments comments, ClassCache classCache) toString()voidtransform(StructuredStatementTransformer transformer, StructuredScope scope)
-
Constructor Details
-
Op04StructuredStatement
-
Op04StructuredStatement
public Op04StructuredStatement(InstrIndex instrIndex, Collection<BlockIdentifier> blockMembership, StructuredStatement structuredStatement)
-
-
Method Details
-
rewriteExplicitTypeUsages
public static void rewriteExplicitTypeUsages(Method method, Op04StructuredStatement block, AnonymousClassUsage anonymousClassUsage, ClassFile classFile) -
flattenNonReferencedBlocks
-
switchExpression
public static void switchExpression(Method method, Op04StructuredStatement root, DecompilerComments comments) -
reduceClashDeclarations
-
normalizeInstanceOf
public static void normalizeInstanceOf(Op04StructuredStatement root, Options options, ClassFileVersion classFileVersion) -
nopThisAndReplace
-
nopOut
public void nopOut()- Specified by:
nopOutin interfaceStatementContainer<StructuredStatement>
-
getStatement
- Specified by:
getStatementin interfaceStatementContainer<StructuredStatement>
-
collectTypeUsages
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable
-
getTargetStatement
- Specified by:
getTargetStatementin interfaceStatementContainer<StructuredStatement>
-
getLabel
- Specified by:
getLabelin interfaceStatementContainer<StructuredStatement>
-
getIndex
- Specified by:
getIndexin interfaceStatementContainer<StructuredStatement>
-
replaceStatement
- Specified by:
replaceStatementin interfaceStatementContainer<StructuredStatement>
-
nopOutConditional
public void nopOutConditional()- Specified by:
nopOutConditionalin interfaceStatementContainer<StructuredStatement>
-
getSSAIdentifiers
- Specified by:
getSSAIdentifiersin interfaceStatementContainer<StructuredStatement>
-
getBlockIdentifiers
- Specified by:
getBlockIdentifiersin interfaceStatementContainer<StructuredStatement>
-
getBlockStarted
- Specified by:
getBlockStartedin interfaceStatementContainer<StructuredStatement>
-
getBlocksEnded
- Specified by:
getBlocksEndedin interfaceStatementContainer<StructuredStatement>
-
copyBlockInformationFrom
- Specified by:
copyBlockInformationFromin interfaceStatementContainer<StructuredStatement>
-
copyBytecodeInformationFrom
- Specified by:
copyBytecodeInformationFromin interfaceStatementContainer<StructuredStatement>
-
getBlockMembership
-
dump
-
getSources
- Specified by:
getSourcesin interfaceGraph<Op04StructuredStatement>
-
getTargets
- Specified by:
getTargetsin interfaceGraph<Op04StructuredStatement>
-
addSource
- Specified by:
addSourcein interfaceMutableGraph<Op04StructuredStatement>
-
addTarget
- Specified by:
addTargetin interfaceMutableGraph<Op04StructuredStatement>
-
getTargetLabel
-
isEmptyInitialiser
public boolean isEmptyInitialiser() -
replaceTarget
-
replaceSource
-
setSources
-
setTargets
-
replaceInSources
public static void replaceInSources(Op04StructuredStatement original, Op04StructuredStatement replacement) -
replaceInTargets
public static void replaceInTargets(Op04StructuredStatement original, Op04StructuredStatement replacement) -
linearizeStatementsInto
-
removeLastContinue
-
removeLastGoto
public void removeLastGoto() -
removeLastEndWhile
-
informBlockMembership
-
toString
-
replaceStatementWithNOP
-
isFullyStructured
public boolean isFullyStructured() -
transform
-
insertLabelledBlocks
-
tidyEmptyCatch
-
tidyTryCatch
-
inlinePossibles
-
convertUnstructuredIf
-
tidyVariableNames
public static void tidyVariableNames(Method method, Op04StructuredStatement root, BytecodeMeta bytecodeMeta, DecompilerComments comments, ClassCache classCache) -
applyTypeAnnotations
public static void applyTypeAnnotations(AttributeCode code, Op04StructuredStatement root, SortedMap<Integer, Integer> instrsByOffset, DecompilerComments comments) -
removePointlessReturn
-
removeEndResource
-
removePointlessControlFlow
-
tidyTypedBooleans
-
miscKeyholeTransforms
public static void miscKeyholeTransforms(VariableFactory variableFactory, Op04StructuredStatement root) -
tidyObfuscation
-
prettifyBadLoops
-
removeStructuredGotos
-
removeUnnecessaryLabelledBreaks
-
removePointlessBlocks
-
discoverVariableScopes
public static void discoverVariableScopes(Method method, Op04StructuredStatement root, VariableFactory variableFactory, Options options, ClassFileVersion classFileVersion, BytecodeMeta bytecodeMeta) -
discoverLocalClassScopes
public static void discoverLocalClassScopes(Method method, Op04StructuredStatement root, VariableFactory variableFactory, Options options) -
tidyInstanceMatches
-
checkTypeClashes
-
findInnerClassOuterThis
-
removeInnerClassOuterThis
-
fixInnerClassConstructorSyntheticOuterArgs
public static void fixInnerClassConstructorSyntheticOuterArgs(ClassFile classFile, Method method, Op04StructuredStatement root, Set<MethodPrototype> processed) -
tidyAnonymousConstructors
-
inlineSyntheticAccessors
public static void inlineSyntheticAccessors(DCCommonState state, Method method, Op04StructuredStatement root) -
removeConstructorBoilerplate
-
rewriteLambdas
-
removeUnnecessaryVarargArrays
public static void removeUnnecessaryVarargArrays(Options options, Method method, Op04StructuredStatement root) -
removePrimitiveDeconversion
public static void removePrimitiveDeconversion(Options options, Method method, Op04StructuredStatement root) -
rewriteBadCastChains
public static void rewriteBadCastChains(Options options, Method method, Op04StructuredStatement root) -
rewriteNarrowingAssignments
public static void rewriteNarrowingAssignments(Options options, Method method, Op04StructuredStatement root) -
replaceNestedSyntheticOuterRefs
-
applyChecker
public static void applyChecker(Op04Checker checker, Op04StructuredStatement root, DecompilerComments comments) -
isTryWithResourceSynthetic
-