Interface IJavaReturn
- All Superinterfaces:
IJavaElement
,IJavaExpression
,IJavaStatement
,IJavaTerminalStatement
Java AST interface to represent return statements of methods. Return statements may or may not
return expressions.
Examples:
return; return 1;
-
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.Get the returned expression.boolean
Determine if the return statement returns nothing (void).void
Set the returned expression.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
-
getExpression
IJavaExpression getExpression()Get the returned expression.- Specified by:
getExpression
in interfaceIJavaTerminalStatement
- Returns:
- the expression, null if none
-
setExpression
Set the returned expression.- Specified by:
setExpression
in interfaceIJavaTerminalStatement
- Parameters:
e
- optional return expression
-
returnsVoid
boolean returnsVoid()Determine if the return statement returns nothing (void).- Returns:
- true if there is no return value
-
duplicate
IJavaReturn duplicate()Description copied from interface:IJavaElement
Duplicate this element.- Specified by:
duplicate
in interfaceIJavaElement
- Specified by:
duplicate
in interfaceIJavaExpression
- Specified by:
duplicate
in interfaceIJavaStatement
- Specified by:
duplicate
in interfaceIJavaTerminalStatement
- Returns:
- a (possibly) duplicated object of the same type
-