Examples of IntConstant


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.IntConstant

  public static AnnotationValue generateElementValueForConstantExpression(Expression defaultValue, TypeBinding defaultValueBinding) {
    if (defaultValueBinding != null) {
      Constant c = defaultValue.constant;
      if (c instanceof IntConstant) {
        IntConstant iConstant = (IntConstant) c;
        return new SimpleAnnotationValue(ElementValue.PRIMITIVE_INT, new Integer(iConstant.intValue()));
      } else if (c instanceof BooleanConstant) {
        BooleanConstant iConstant = (BooleanConstant) c;
        return new SimpleAnnotationValue(ElementValue.PRIMITIVE_BOOLEAN, new Boolean(iConstant.booleanValue()));
      } else if (c instanceof StringConstant) {
        StringConstant sConstant = (StringConstant) c;
        return new SimpleAnnotationValue(ElementValue.STRING, sConstant.stringValue());
      }
    }
View Full Code Here

Examples of soot.jimple.IntConstant

          ArrayRef array = (ArrayRef)def.getLeftOp();
          allowedBox = array.getBaseBox();
          if (array.getBase() == local) {
            // assignment into interesting array
            if (array.getIndex() instanceof IntConstant) {
              IntConstant index = (IntConstant)array.getIndex();
              if (index.value >= 0 && index.value < info.contents.length) {
                ArrayConstantInfo out = info.clone();
                out.contents[index.value] = def.getRightOpBox();
                dest.put(local, out);
              } else {
View Full Code Here

Examples of soot.jimple.IntConstant

        if (right instanceof JNewArrayExpr) {
            // "= new X[3]; // where X is the basetype"
            JNewArrayExpr jNewArrayExpr = (JNewArrayExpr) right;
            Value size = jNewArrayExpr.getSize();
            if (size instanceof IntConstant) {
                IntConstant constant = (IntConstant) size;
                Type[] varArgTypes = new Type[constant.value];
                Type varArgBase = jNewArrayExpr.getBaseType();
                VarArgInfo varArgInfo = new VarArgInfo(constant.value,
                        varArgTypes, varArgBase);
                return varArgInfo;
View Full Code Here

Examples of soot.jimple.IntConstant

                        // assigning to the varArg array values. Compute
                        // the type at the assigned position. This will always
                        // happen after the varargs instantiation!

                        if (jArrayRef.getIndex() instanceof IntConstant) {
                            IntConstant intConstant = (IntConstant) jArrayRef
                                    .getIndex();
                            int index = intConstant.value;
                            Type oldType = varArgTypes[index];
                            Type type = jAssignStmt.getRightOp().getType();
                            if (oldType instanceof RefType
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.