[Java] Interface FinalVariableAnalyzer.VariableNotFinalCallback
public interface FinalVariableAnalyzer.VariableNotFinalCallback
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public void |
variableNotAlwaysInitialized(VariableExpression var) Callback used whenever a variable is declared as final, but can remain in an uninitialized state | |
public void |
variableNotFinal(Variable var, Expression bexp) Callback called whenever an assignment transforms an effectively final variable into a non final variable (aka, breaks the "final" modifier contract) |
Method Detail
public void variableNotAlwaysInitialized(VariableExpression var)
Callback used whenever a variable is declared as final, but can remain in an uninitialized state
- Parameters:
-
var
- the variable detected as potentially uninitialized
public void variableNotFinal(Variable var, Expression bexp)
Callback called whenever an assignment transforms an effectively final variable into a non final variable (aka, breaks the "final" modifier contract)
- Parameters:
-
var
- the variable detected as not final -
bexp
- the expression responsible for the contract to be broken
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/classgen/FinalVariableAnalyzer.VariableNotFinalCallback.html