Package dk.brics.string.intermediate

Examples of dk.brics.string.intermediate.StringAssignment


    if (to.getType().cannotBeAliasOf(from.getType()))
      throw new RuntimeException("Cannot assign from " + from.getType() + " to " + to.getType());
   
    switch (from.getType()) {
    case STRING:
      addStatement(new StringAssignment(to, from));
      break;
     
    case STRINGBUFFER:
      addStatement(new StringBufferAssignment(to, from));
      break;
View Full Code Here


            Method m = new Method(application, ac.getName() + ".toString",
                    new Variable[0]);
            methods.add(m);
            tostring_methods.put(ac.getName(), m);
            Variable var = application.createVariable(VariableType.STRING);
            StringStatement spot = new StringAssignment(var, var);
            m.addStatement(spot);
            Return ret = new Return(var);
            m.addStatement(ret);
            spot.addSucc(ret);
            tostring_hotspots.put(ac, spot); // these hotspots are used by
                                             // StringAnalysis.getTypeAutomaton
            Collection<SootClass> subtypes;
            if (ac.isInterface())
                subtypes = class_hierarchy.getImplementersOf(ac);
View Full Code Here

        return true;
      }
     
      // new String(String)
      if (numArgs == 1 && isString(method.getParameterType(0))) {
                factory.addStatement(new StringAssignment(callee, arguments.get(0)));
                return true;
      }  
     
      // new String(StringBuffer); new String(StringBuilder)
            if (numArgs == 1 && isBufferOrBuilder(method.getParameterType(0))) {
View Full Code Here

          // both branches should assign to 'resultVar' so we can return a variable
          factory.startBranch();
         
          // not null
          Variable notNull = valueOfNonNull(box, argument, radix, type, factory);
          factory.addStatement(new StringAssignment(resultVar, notNull));
          factory.useBranch();
         
          // null
          factory.addStatement(new StringInit(resultVar, Automatons.getNull()));
          factory.useBranch();
View Full Code Here

TOP

Related Classes of dk.brics.string.intermediate.StringAssignment

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.