Package soot.jimple

Examples of soot.jimple.StringConstant


                        // arg is a string that can be
                        // statically evaluated.
                        Value nameValue = r.getArg(0);

                        if (Evaluator.isValueConstantValued(nameValue)) {
                            StringConstant nameConstant = (StringConstant) Evaluator
                                    .getConstantValueOf(nameValue);
                            String name = nameConstant.value;

                            // perform type analysis to determine what the
                            // type of the base is.
View Full Code Here


                            // when arg is a string that can be
                            // statically evaluated.
                            Value nameValue = r.getArg(0);

                            if (Evaluator.isValueConstantValued(nameValue)) {
                                StringConstant nameConstant = (StringConstant) Evaluator
                                        .getConstantValueOf(nameValue);
                                String name = nameConstant.value;

                                // perform type analysis to determine what the
                                // type of the base is.
View Full Code Here

                    } else if (r.getMethod().getSubSignature().equals(
                            PtolemyUtilities.getEntityMethod.getSubSignature())) {
                        Value nameValue = r.getArg(0);

                        if (Evaluator.isValueConstantValued(nameValue)) {
                            StringConstant nameConstant = (StringConstant) Evaluator
                                    .getConstantValueOf(nameValue);
                            String name = nameConstant.value;

                            if (_debug) {
                                System.out.println("replacing " + unit);
View Full Code Here

   */
  public String getConstantString(Value v) {
    if (v==null)
      throw new RuntimeException("null value");
    if (v instanceof StringConstant) {
      StringConstant sc = (StringConstant)v;
      return unescapeStringConstant(sc);
    } else if (v instanceof Local) {
      StringConstant sc = stringConstants.getFlowBefore(currentUnit).get(v);
      if (sc != null) {
        return unescapeStringConstant(sc);
      }
    } else if (v instanceof NullConstant) {
      return null;
View Full Code Here

 
  @Override
  protected void merge(Map<Local, StringConstant> in1, Map<Local, StringConstant> in2, Map<Local, StringConstant> out) {
    out.putAll(in1);
    for (Map.Entry<Local,StringConstant> entry : in2.entrySet()) {
      StringConstant s1 = out.get(entry.getKey());
      StringConstant s2 = in2.get(entry.getKey());
      if (s1 != s2)
        out.remove(entry.getKey());
    }
  }
View Full Code Here

TOP

Related Classes of soot.jimple.StringConstant

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.