Package soot

Examples of soot.SootClass.addField()


        // We know that we have exactly one model, so create it.
        // The final field for the model.
        SootField modelField = new SootField("_CGmodel", RefType.v(modelClass),
                Modifier.PRIVATE); // | Modifier.FINAL);
        mainClass.addField(modelField);

        // initialize the field by creating a model
        // in all the <init> methods.
        for (Iterator methods = mainClass.getMethods().iterator(); methods
                .hasNext();) {
View Full Code Here


            String freeVariable = (String) freeVariables.next();
            ptolemy.data.type.Type type = _scope.getType(freeVariable);
            Type sootType = PtolemyUtilities.getSootTypeForTokenType(type);
            SootField field = new SootField(freeVariable, sootType,
                    Modifier.PUBLIC);
            functionClass.addField(field);
            argumentSootTypes.add(sootType);
            nameToLocal.put(freeVariable, field);
            nameToType.put(freeVariable, type);
        }
View Full Code Here

        VarDecl vd = ((FieldDeclaration)decl).getVarDecl();
        String fieldName = vd.getName();
        Type fieldType = SootTypeUtil.getSootType(vd.getTypeName().getDescriptor());
        int fieldModifiers = getModifiers(decl);
        SootField sootField = new SootField(fieldName, fieldType, fieldModifiers);
        klass.addField(sootField);
      }
    }
   
    return klass;
  }
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.