Interface IJavaDoWhile
- All Superinterfaces:
IJavaCompound
,IJavaElement
,IJavaExpression
,IJavaStatement
Java AST interface to represent a
do-while
loop statement. A do-while loop is a
post-tested loop, that consists of a body and a test predicate.
Example:
do { // body } while(predicate);
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
FLAG_BUILT, FLAG_FIELD_REFERENCES_OUTERCLASS, FLAG_LAMBDA_CLASS, FLAG_LAMBDA_IMPL, FLAG_OPTIONAL_RENDERING, FLAG_SECOND_PARAMETER_IS_OUTER_REF, FLAG_STICKY
-
Method Summary
Modifier and TypeMethodDescriptionDuplicate this element.getBody()
Get the loop body.Get the loop predicate.void
Set the body.void
Set the predicate.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaCompound
generateFlatList, getBlocks, getSubElements, insertAt, reset
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
addFlags, addTag, canCauseException, collectAllPhysicalOffsets, generate, getData, getElementType, getFlags, getOrigin, getPhysicalMethodIndex, getPhysicalOffset, getReconAnon, getReconEnum, getReconEnummap, getReconLambda, getSubElements, getTags, hasFlags, hasPhysicalMethodIndex, hasPhysicalOffset, isReconArtifact, removeFlags, removeTag, replaceSubElement, setData, setFlags, setLambdaRecon, setOrigin, setPhysicalMethodIndex, setPhysicalOffset, setReconAnon, setReconEnum, setReconEnummap, toShortString, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaStatement
getIntermediateOffset, setIntermediateOffset
-
Method Details
-
getPredicate
IJavaPredicate getPredicate()Get the loop predicate.- Returns:
- the predicate, never null
-
getBody
IJavaBlock getBody()Get the loop body.- Returns:
- the loop body, never null
-
setPredicate
Set the predicate. Convenience routine.- Parameters:
p
- mandatory predicate
-
setBody
Set the body. Convenience routine.- Parameters:
b
- mandatory body
-
duplicate
IJavaDoWhile duplicate()Description copied from interface:IJavaElement
Duplicate this element.- Specified by:
duplicate
in interfaceIJavaCompound
- Specified by:
duplicate
in interfaceIJavaElement
- Specified by:
duplicate
in interfaceIJavaExpression
- Specified by:
duplicate
in interfaceIJavaStatement
- Returns:
- a (possibly) duplicated object of the same type
-