Interface ComponentHelper.VariableScope
- All Superinterfaces:
AutoCloseable
- Enclosing class:
ComponentHelper
Represents a scoped EL variable. When closed, the original value of the variable is restored.
- Since:
- 8.5.3
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Restores the previous mapping of the variable.Gets the previous value of the variable before it was overridden by this scope.booleanGets whether the variable existed before it was overridden by this scope.
-
Method Details
-
close
void close()Restores the previous mapping of the variable.- Specified by:
closein interfaceAutoCloseable
-
getPreviousValue
Object getPreviousValue()Gets the previous value of the variable before it was overridden by this scope. If the variable did not exist before, this method returnsnull.- Returns:
- The previous value of the variable, or
nullif the variable did not exist before.
-
isHadPreviousValue
boolean isHadPreviousValue()Gets whether the variable existed before it was overridden by this scope.- Returns:
trueif the variable existed before, orfalseif the variable did not exist before.
-