Package jadx.core.dex.regions.loops
Class LoopRegion
- java.lang.Object
-
- jadx.core.dex.attributes.AttrNode
-
- jadx.core.dex.regions.AbstractRegion
-
- jadx.core.dex.regions.conditions.ConditionRegion
-
- jadx.core.dex.regions.loops.LoopRegion
-
- All Implemented Interfaces:
IAttributeNode,IConditionRegion,IContainer,IRegion
public final class LoopRegion extends ConditionRegion
-
-
Constructor Summary
Constructors Constructor Description LoopRegion(IRegion parent, LoopInfo info, @Nullable BlockNode header, boolean reversed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbaseString()Unique id for use in 'toString()' methodbooleancheckPreCondition()Check if pre-conditions can be inlined into loop conditionvoidgenerate(RegionGen regionGen, ICodeWriter code)Dispatch to needed generate method in RegionGenIRegiongetBody()@Nullable BlockNodegetHeader()LoopInfogetInfo()intgetSourceLine()java.util.List<IContainer>getSubBlocks()LoopTypegetType()booleanisConditionAtEnd()booleanisEndless()voidmergePreCondition()Move all preCondition block instructions before conditionBlock instructionsbooleanreplaceSubBlock(IContainer oldBlock, IContainer newBlock)voidsetBody(IRegion body)voidsetPreCondition(BlockNode preCondition)Set instructions which must be executed before condition in every loopvoidsetType(LoopType type)java.lang.StringtoString()-
Methods inherited from class jadx.core.dex.regions.conditions.ConditionRegion
getCondition, getConditionBlocks, getConditionSourceLine, invertCondition, simplifyCondition, updateCondition, updateCondition, updateCondition
-
Methods inherited from class jadx.core.dex.regions.AbstractRegion
getParent, setParent, updateParent
-
Methods inherited from class jadx.core.dex.attributes.AttrNode
add, addAttr, addAttr, addAttr, addAttrs, clearAttributes, contains, contains, copyAttributeFrom, copyAttributesFrom, get, getAll, getAnnotation, getAttributesString, getAttributesStringsList, isAttrStorageEmpty, remove, remove, removeAttr, rewriteAttributeFrom, unloadAttributes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadx.core.dex.attributes.IAttributeNode
add, addAttr, addAttr, addAttrs, clearAttributes, contains, contains, copyAttributeFrom, copyAttributesFrom, get, getAll, getAnnotation, getAttributesString, getAttributesStringsList, isAttrStorageEmpty, remove, remove, removeAttr, rewriteAttributeFrom
-
-
-
-
Method Detail
-
getInfo
public LoopInfo getInfo()
-
getHeader
@Nullable public @Nullable BlockNode getHeader()
-
isEndless
public boolean isEndless()
-
getBody
public IRegion getBody()
-
setBody
public void setBody(IRegion body)
-
isConditionAtEnd
public boolean isConditionAtEnd()
-
setPreCondition
public void setPreCondition(BlockNode preCondition)
Set instructions which must be executed before condition in every loop
-
checkPreCondition
public boolean checkPreCondition()
Check if pre-conditions can be inlined into loop condition
-
mergePreCondition
public void mergePreCondition()
Move all preCondition block instructions before conditionBlock instructions
-
getSourceLine
public int getSourceLine()
-
getType
public LoopType getType()
-
setType
public void setType(LoopType type)
-
getSubBlocks
public java.util.List<IContainer> getSubBlocks()
-
replaceSubBlock
public boolean replaceSubBlock(IContainer oldBlock, IContainer newBlock)
- Specified by:
replaceSubBlockin interfaceIRegion- Overrides:
replaceSubBlockin classAbstractRegion
-
generate
public void generate(RegionGen regionGen, ICodeWriter code) throws CodegenException
Description copied from interface:IContainerDispatch to needed generate method in RegionGen- Throws:
CodegenException
-
baseString
public java.lang.String baseString()
Description copied from interface:IContainerUnique id for use in 'toString()' method
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-