Examples of VariableType


Examples of dk.brics.string.intermediate.VariableType

  }
 
  @Override
  public Variable caseCastExpr(CastExpr v, ValueBox box) {
    Variable operand = translateExpression(v.getOpBox());
    VariableType castTo = getType(v.getCastType());
   
    // whatever comes out of the cast must satisfy both the operand's type and the casted type
    VariableType resultType = operand.getType().greatestLowerBound(castTo);
    if (resultType == VariableType.NONE) {
      return getNothing();
    }
   
    // if a primitive cast is performed, assume nothing about the result
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

        if (result != null)
            return result;
    }
       
        // create a variable with the result
        VariableType returnType = getType(method.getReturnType());
        Variable result = makeVariable(returnType);
       
        // split the control-flow graph for each possible target
    factory.startBranch();
   
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

    if (goodResult != null) {
      assignValue(result, goodResult);
    } else {
      // if the method declaring the method might be an interesting mutable type,
      // corrupt the callee
      VariableType declaringClass = factory.fromSootType(target.getDeclaringClass().getType());
      handleCorruptInvocation(result, declaringClass, callee, arguments);
    }
  }
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

  public Variable caseStaticFieldRef(StaticFieldRef v, ValueBox box) {
      return handleFieldRef(v, box);
  }
 
  private Variable handleFieldRef(FieldRef v, ValueBox box) {
      VariableType type = factory.fromSootType(v.getType());
        if (type == VariableType.NONE)
            return getNothing();
       
        // if the field is @Type annotated, create a variable with its static type
        if (factory.fromSootType(v.getType()) == VariableType.STRING) {
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

      // only non-application methods may be resolved
      if (target.getDeclaringClass().isApplicationClass())
          return null;
     
    // Get the return type
    VariableType resultType = factory.fromSootType(target.getReturnType());
   
    MethodResolution resolution = getResolution(expr, target);
   
    // give up if no resolver could resolve the method
    if (resolution == null)
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

                    cfg.addStatement(assignment);
                }

                // corrupt externally visible fields
                if (ext.isExternallyVisibleField(field)) {
                    VariableType type = fromSootType(field
                            .getType());

                    if (type == VariableType.NONE)
                        continue;
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

     * the interesting types implement <tt>Serializable</tt>.
     * @param canonicalName fully qualified name of a Java class.
     * @return a variable type. <tt>NONE</tt> is (rightfully) returned for unknown types. <tt>null</tt> is never returned.
     */
    private static VariableType fromCanonicalName(String canonicalName) {
        VariableType type = javaTypesToVariableTypes.get(canonicalName);
        if (type == null)
            return VariableType.NONE;
        return type;
    }
View Full Code Here

Examples of dk.brics.string.intermediate.VariableType

            // string == string
            // char == char
            // etc.
            if (isAbsolute(relation)) {
                boolean equals = relation == Relation.EQUAL;
                VariableType lefttype = context.fromSootType(v.getOp1().getType());
                VariableType righttype = context.fromSootType(v.getOp2().getType());
                if (lefttype.leastUpperBound(VariableType.NONE) != VariableType.NONE
                    && righttype.leastUpperBound(VariableType.NONE) != VariableType.NONE) {
                    Variable left = context.getExpressionVariable(v.getOp1());
                    Variable right = context.getExpressionVariable(v.getOp2());
                    if (equals == true) {
                        makeBinaryAssertion(left, right, new AssertEquals());
                        makeBinaryAssertion(right, left, new AssertEquals());
                        // assert aliases as well
                        if (lefttype.mightBeUsefulMutable() && righttype.mightBeUsefulMutable()) {
                          makeAliasAssertion(left, right, true);
                        }
                    }
                    else if (equals == false && lefttype == VariableType.PRIMITIVE && righttype == VariableType.PRIMITIVE) {
                        // only primitive types may get a negative assertion here, since references
                        // may refer to different objects with same contents
                        makeBinaryAssertion(left, right, new AssertNotEquals());
                        makeBinaryAssertion(right, left, new AssertNotEquals());
                    }
                    else if (equals == false && lefttype.mightBeUsefulMutable() && righttype.mightBeUsefulMutable()) {
                      // assert that the variables are not aliases
                      // their contents cannot be asserted here, though
                      makeAliasAssertion(left, right, false);
                    }
                }
View Full Code Here

Examples of org.activiti.engine.impl.variable.VariableType

    putInMapIfNotNull(data, Fields.PROCESS_DEFINITION_ID, variableEvent.getProcessDefinitionId());
    putInMapIfNotNull(data, Fields.PROCESS_INSTANCE_ID, variableEvent.getProcessInstanceId());
    putInMapIfNotNull(data, Fields.EXECUTION_ID, variableEvent.getExecutionId());
    putInMapIfNotNull(data, Fields.VALUE, variableEvent.getVariableValue());
   
    VariableType variableType = variableEvent.getVariableType();
    if (variableType instanceof BooleanType) {
     
      putInMapIfNotNull(data, Fields.VALUE_BOOLEAN, (Boolean) variableEvent.getVariableValue());
      putInMapIfNotNull(data, Fields.VALUE, variableEvent.getVariableValue());
      putInMapIfNotNull(data, Fields.VARIABLE_TYPE, TYPE_BOOLEAN);
View Full Code Here

Examples of org.activiti.engine.impl.variable.VariableType

   
    VariableTypes variableTypes = Context
        .getProcessEngineConfiguration()
        .getVariableTypes();
   
    VariableType newType = variableTypes.findVariableType(value);
   
   if ((variableInstance != null) && (!variableInstance.getType().equals(newType))) {
    variableInstance.setValue(null);
    variableInstance.setType(newType);
    variableInstance.forceUpdate();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.