Beispiel #1
0
 public void outAFullIdentNonvoidType(AFullIdentNonvoidType node) {
   String typeName = (String) mProductions.removeLast();
   Type t = RefType.v(typeName);
   int dim = node.getArrayBrackets().size();
   if (dim > 0) t = ArrayType.v(t, dim);
   mProductions.addLast(t);
 }
Beispiel #2
0
  public void outAMultiNewExpr(AMultiNewExpr node) {

    LinkedList arrayDesc = node.getArrayDescriptor();

    int descCnt = arrayDesc.size();
    List sizes = new LinkedList();

    Iterator it = arrayDesc.iterator();
    while (it.hasNext()) {
      AArrayDescriptor o = (AArrayDescriptor) it.next();
      if (o.getImmediate() != null) sizes.add(0, (Value) mProductions.removeLast());
      else break;
    }

    Type type = (Type) mProductions.removeLast();
    ArrayType arrayType = ArrayType.v(type, descCnt);

    mProductions.addLast(Jimple.v().newNewMultiArrayExpr(arrayType, sizes));
  }
Beispiel #3
0
 /*
   nonvoid_type =
   {base}   base_type_no_name array_brackets*;
   {quoted} quoted_name array_brackets* |
   {ident}  identifier array_brackets* |
   {full_ident} full_identifier array_brackets*;
 */
 public void outABaseNonvoidType(ABaseNonvoidType node) {
   Type t = (Type) mProductions.removeLast();
   int dim = node.getArrayBrackets().size();
   if (dim > 0) t = ArrayType.v(t, dim);
   mProductions.addLast(t);
 }