Package org.checkerframework.dataflow.constantpropagation

Examples of org.checkerframework.dataflow.constantpropagation.Constant


   * Returns the value of the leaf of {@code exprPath}, if it is determined to be a constant
   * (always evaluates to the same numeric value), and null otherwise.
   * Note that returning null does not necessarily mean the expression is *not* a constant.
   */
  public static Number numberValue(TreePath exprPath, Context context) {
    Constant val = DataFlow.expressionDataflow(exprPath, context, CONSTANT_PROPAGATION);
    if (val == null || !val.isConstant()) {
      return null;
    }
    return val.getValue();
  }
View Full Code Here

TOP

Related Classes of org.checkerframework.dataflow.constantpropagation.Constant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.