Rewrites all returns in a block to specifications of the named value.

For example,

if (condition) {
    return a;
} else {
    return b;
}

is rewritten to

if (condition) {
    returnValue = a;
} else {
    returnValue = b;
}

You should only use this if the block has no early returns, otherwise this changes the semantics of the block.

Usage:

rewrittenBlock= someBlock.transform(RewriteReturnsEditor(returnValueName));

no subtypes hierarchy

Initializer
RewriteReturnsEditor(LIdentifier returnValueName)
Inherited Attributes
Attributes inherited from: Object
Methods
transformBlockSource Codeshared actual Block transformBlock(Block that)
transformDeclarationSource Codeshared actual Declaration transformDeclaration(Declaration that)
transformStatementSource Codeshared actual Statement transformStatement(Statement that)
Inherited Methods
Methods inherited from: Object
Methods inherited from: NarrowingTransformer<Result>
Methods inherited from: Transformer<Result>
Transformer.transformAddAssignmentOperation(), Transformer.transformAliasDec(), Transformer.transformAndAssignmentOperation(), Transformer.transformAndOperation(), Transformer.transformAnnotation(), Transformer.transformAnnotations(), Transformer.transformAnonymousArgument(), Transformer.transformAnyClass(), Transformer.transformAnyCompilationUnit(), Transformer.transformAnyFunction(), Transformer.transformAnyInterface(), Transformer.transformAnyInterfaceDefinition(), Transformer.transformAnyMemberOperator(), Transformer.transformAnySpecifier(), Transformer.transformAnyValue(), Transformer.transformArgumentList(), Transformer.transformArguments(), Transformer.transformArithmeticAssignmentOperation(), Transformer.transformArithmeticOperation(), Transformer.transformAssertion(), Transformer.transformAssignOperation(), Transformer.transformAssignmentOperation(), Transformer.transformAssignmentStatement(), Transformer.transformAtom(), Transformer.transformBaseExpression(), Transformer.transformBaseMeta(), Transformer.transformBaseType(), Transformer.transformBinaryOperation(), Transformer.transformBlock(), Transformer.transformBody(), Transformer.transformBooleanCondition(), Transformer.transformBound(), Transformer.transformBreak(), Transformer.transformCallableParameter(), Transformer.transformCallableType(), Transformer.transformCaseClause(), Transformer.transformCaseItem(), Transformer.transformCaseTypes(), Transformer.transformCatchClause(), Transformer.transformCharacterLiteral(), Transformer.transformClassAliasDefinition(), Transformer.transformClassBody(), Transformer.transformClassDec(), Transformer.transformClassDefinition(), Transformer.transformClassInstantiation(), Transformer.transformClassOrInterface(), Transformer.transformClassSpecifier(), Transformer.transformClosedBound(), Transformer.transformCompareOperation(), Transformer.transformComparisonOperation(), Transformer.transformCompilationUnit(), Transformer.transformComplementAssignmentOperation(), Transformer.transformComplementOperation(), Transformer.transformComprehension(), Transformer.transformComprehensionClause(), Transformer.transformCondition(), Transformer.transformConditions(), Transformer.transformContinue(), Transformer.transformControlStructure(), Transformer.transformDec(), Transformer.transformDecQualifier(), Transformer.transformDeclaration(), Transformer.transformDefaultedCallableParameter(), Transformer.transformDefaultedParameter(), Transformer.transformDefaultedParameterReference(), Transformer.transformDefaultedType(), Transformer.transformDefaultedValueParameter(), Transformer.transformDifferenceOperation(), Transformer.transformDirective(), Transformer.transformDivideAssignmentOperation(), Transformer.transformDynamicBlock(), Transformer.transformDynamicInterfaceDefinition(), Transformer.transformDynamicModifier(), Transformer.transformDynamicValue(), Transformer.transformElementOrSubrangeExpression(), Transformer.transformElseCaseClause(), Transformer.transformElseClause(), Transformer.transformElseOperation(), Transformer.transformEntryOperation(), Transformer.transformEntryType(), Transformer.transformEqualOperation(), Transformer.transformEqualityOperation(), Transformer.transformExistsCondition(), Transformer.transformExistsOperation(), Transformer.transformExistsOrNonemptyCondition(), Transformer.transformExponentiationOperation(), Transformer.transformExpression(), Transformer.transformExpressionComprehensionClause(), Transformer.transformExpressionIsh(), Transformer.transformExpressionStatement(), Transformer.transformExtendedType(), Transformer.transformFailClause(), Transformer.transformFinallyClause(), Transformer.transformFloatLiteral(), Transformer.transformForClause(), Transformer.transformForComprehensionClause(), Transformer.transformForFail(), Transformer.transformForIterator(), Transformer.transformFullPackageName(), Transformer.transformFunctionArgument(), Transformer.transformFunctionDec(), Transformer.transformFunctionDeclaration(), Transformer.transformFunctionDefinition(), Transformer.transformFunctionExpression(), Transformer.transformFunctionModifier(), Transformer.transformFunctionShortcutDefinition(), Transformer.transformGivenDec(), Transformer.transformGroupedExpression(), Transformer.transformGroupedType(), Transformer.transformIdenticalOperation(), Transformer.transformIdentifier(), Transformer.transformIdentityOperation(), Transformer.transformIfClause(), Transformer.transformIfComprehensionClause(), Transformer.transformIfElse(), Transformer.transformImport(), Transformer.transformImportAlias(), Transformer.transformImportElement(), Transformer.transformImportElements(), Transformer.transformImportFunctionValueAlias(), Transformer.transformImportFunctionValueElement(), Transformer.transformImportTypeAlias(), Transformer.transformImportTypeElement(), Transformer.transformImportWildcard(), Transformer.transformInModifier(), Transformer.transformInOperation(), Transformer.transformInitialComprehensionClause(), Transformer.transformInlineDefinitionArgument(), Transformer.transformIntegerLiteral(), Transformer.transformInterfaceAliasDefinition(), Transformer.transformInterfaceBody(), Transformer.transformInterfaceDec(), Transformer.transformInterfaceDefinition(), Transformer.transformIntersectAssignmentOperation(), Transformer.transformIntersectionOperation(), Transformer.transformIntersectionType(), Transformer.transformInvocation(), Transformer.transformInvocationStatement(), Transformer.transformIsCase(), Transformer.transformIsCondition(), Transformer.transformIsOperation(), Transformer.transformIterable(), Transformer.transformIterableType(), Transformer.transformKeySubscript(), Transformer.transformKeyValueIterator(), Transformer.transformLIdentifier(), Transformer.transformLargeAsOperation(), Transformer.transformLargerOperation(), Transformer.transformLazySpecification(), Transformer.transformLazySpecifier(), Transformer.transformLiteral(), Transformer.transformLocalModifier(), Transformer.transformLogicalAssignmentOperation(), Transformer.transformLogicalOperation(), Transformer.transformMainType(), Transformer.transformMatchCase(), Transformer.transformMeasureOperation(), Transformer.transformMeasureSubscript(), Transformer.transformMemberDec(), Transformer.transformMemberMeta(), Transformer.transformMemberNameWithTypeArguments(), Transformer.transformMemberOperator(), Transformer.transformMeta(), Transformer.transformModifier(), Transformer.transformModuleBody(), Transformer.transformModuleCompilationUnit(), Transformer.transformModuleDec(), Transformer.transformModuleDescriptor(), Transformer.transformModuleImport(), Transformer.transformMultiplyAssignmentOperation(), Transformer.transformNameWithTypeArguments(), Transformer.transformNamedArgument(), Transformer.transformNamedArguments(), Transformer.transformNegationOperation(), Transformer.transformNode(), Transformer.transformNonemptyCondition(), Transformer.transformNonemptyOperation(), Transformer.transformNotEqualOperation(), Transformer.transformNotOperation(), Transformer.transformObjectArgument(), Transformer.transformObjectDefinition(), Transformer.transformOfOperation(), Transformer.transformOpenBound(), Transformer.transformOperation(), Transformer.transformOptionalType(), Transformer.transformOrAssignmentOperation(), Transformer.transformOrOperation(), Transformer.transformOutModifier(), Transformer.transformOuter(), Transformer.transformPackage(), Transformer.transformPackageCompilationUnit(), Transformer.transformPackageDec(), Transformer.transformPackageDescriptor(), Transformer.transformParameter(), Transformer.transformParameterReference(), Transformer.transformParameters(), Transformer.transformPositionalArguments(), Transformer.transformPostfixDecrementOperation(), Transformer.transformPostfixIncrementOperation(), Transformer.transformPostfixOperation(), Transformer.transformPrefixDecrementOperation(), Transformer.transformPrefixIncrementOperation(), Transformer.transformPrefixOperation(), Transformer.transformPrefixPostfixStatement(), Transformer.transformPrimary(), Transformer.transformPrimaryType(), Transformer.transformProductOperation(), Transformer.transformQualifiedExpression(), Transformer.transformQualifiedType(), Transformer.transformQuotientOperation(), Transformer.transformRangeSubscript(), Transformer.transformRemainderAssignmentOperation(), Transformer.transformRemainderOperation(), Transformer.transformRequiredParameter(), Transformer.transformResource(), Transformer.transformResources(), Transformer.transformReturn(), Transformer.transformSafeMemberOperator(), Transformer.transformSatisfiedTypes(), Transformer.transformScaleOperation(), Transformer.transformSelfReference(), Transformer.transformSequentialType(), Transformer.transformSetAssignmentOperation(), Transformer.transformSetOperation(), Transformer.transformSimpleType(), Transformer.transformSmallAsOperation(), Transformer.transformSmallerOperation(), Transformer.transformSpanFromSubscript(), Transformer.transformSpanOperation(), Transformer.transformSpanSubscript(), Transformer.transformSpanToSubscript(), Transformer.transformSpecification(), Transformer.transformSpecifiedArgument(), Transformer.transformSpecifiedVariable(), Transformer.transformSpecifier(), Transformer.transformSpreadArgument(), Transformer.transformSpreadMemberOperator(), Transformer.transformStatement(), Transformer.transformStringLiteral(), Transformer.transformStringTemplate(), Transformer.transformSubscript(), Transformer.transformSubtractAssignmentOperation(), Transformer.transformSumOperation(), Transformer.transformSuper(), Transformer.transformSwitchCaseElse(), Transformer.transformSwitchCases(), Transformer.transformSwitchClause(), Transformer.transformThenOperation(), Transformer.transformThis(), Transformer.transformThrow(), Transformer.transformTryCatchFinally(), Transformer.transformTryClause(), Transformer.transformTuple(), Transformer.transformTupleType(), Transformer.transformType(), Transformer.transformTypeAliasDefinition(), Transformer.transformTypeArgument(), Transformer.transformTypeArguments(), Transformer.transformTypeConstraint(), Transformer.transformTypeDec(), Transformer.transformTypeDeclaration(), Transformer.transformTypeIsh(), Transformer.transformTypeList(), Transformer.transformTypeMeta(), Transformer.transformTypeModifier(), Transformer.transformTypeNameWithTypeArguments(), Transformer.transformTypeParameter(), Transformer.transformTypeParameters(), Transformer.transformTypeSpecifier(), Transformer.transformTypedDeclaration(), Transformer.transformTypedVariable(), Transformer.transformUIdentifier(), Transformer.transformUnaryArithmeticOperation(), Transformer.transformUnaryIshOperation(), Transformer.transformUnaryOperation(), Transformer.transformUnaryTypeOperation(), Transformer.transformUnionAssignmentOperation(), Transformer.transformUnionOperation(), Transformer.transformUnionType(), Transformer.transformUnionableType(), Transformer.transformUnspecifiedVariable(), Transformer.transformValueArgument(), Transformer.transformValueDec(), Transformer.transformValueDeclaration(), Transformer.transformValueDefinition(), Transformer.transformValueExpression(), Transformer.transformValueGetterDefinition(), Transformer.transformValueIterator(), Transformer.transformValueModifier(), Transformer.transformValueParameter(), Transformer.transformValueSetterDefinition(), Transformer.transformValueSpecification(), Transformer.transformVariable(), Transformer.transformVariadicParameter(), Transformer.transformVariadicType(), Transformer.transformVariance(), Transformer.transformVoidModifier(), Transformer.transformWhile(), Transformer.transformWithinOperation()