private boolean fieldAlwaysInitializedBeforeRead(
      Symbol symbol, TreePath pathToRead, VisitorState state, TreePath enclosingBlockPath) {
    AccessPathNullnessAnalysis nullnessAnalysis = getNullnessAnalysis(state);
    Set<Element> nonnullFields;
    if (symbol.isStatic()) {
      nonnullFields = nullnessAnalysis.getNonnullStaticFieldsBefore(pathToRead, state.context);
    } else {
      nonnullFields = new LinkedHashSet<>();
      nonnullFields.addAll(
          nullnessAnalysis.getNonnullFieldsOfReceiverBefore(pathToRead, state.context));
      nonnullFields.addAll(safeInitByCalleeBefore(pathToRead, state, enclosingBlockPath));
    }
    return nonnullFields.contains(symbol);
  }
private boolean fieldAlwaysInitializedBeforeRead ( Symbol symbol , TreePath pathToRead , VisitorState state , TreePath enclosingBlockPath ) { AccessPathNullnessAnalysis nullnessAnalysis = getNullnessAnalysis ( state ) ; Set < Element > nonnullFields ; if ( symbol . isStatic ( ) ) { nonnullFields = nullnessAnalysis . getNonnullStaticFieldsBefore ( pathToRead , state . context ) ; } else { nonnullFields = new LinkedHashSet < > ( ) ; nonnullFields . addAll ( nullnessAnalysis . getNonnullFieldsOfReceiverBefore ( pathToRead , state . context ) ) ; nonnullFields . addAll ( safeInitByCalleeBefore ( pathToRead , state , enclosingBlockPath ) ) ; } return nonnullFields . contains ( symbol ) ; }
@param symbol the field being read
@param pathToRead TreePath to the read operation
@param state visitor state
@param enclosingBlockPath TreePath to enclosing initializer block
@return true if within the initializer, the field is always initialized before the read
operation, false otherwise