Tabnine Logo
SootClass.addField
Code IndexAdd Tabnine to your IDE (free)

How to use
addField
method
in
soot.SootClass

Best Java code snippets using soot.SootClass.addField (Showing top 20 results out of 315)

origin: Sable/soot

public void outAFieldMember(AFieldMember node) {
 int modifier = 0;
 Type type = null;
 String name = null;
 name = (String) mProductions.removeLast();
 type = (Type) mProductions.removeLast();
 modifier = processModifiers(node.getModifier());
 SootField f = Scene.v().makeSootField(name, type, modifier);
 mSootClass.addField(f);
}
origin: Sable/soot

/**
 * @apilevel internal
 */
private SootField getSootField_compute(String name, TypeDecl type) {
  SootField f = Scene.v().makeSootField(name, type.getSootType(), 0);
  getSootClassDecl().addField(f);
  return f;
}
origin: Sable/soot

 int modifiers = soot.Modifier.PUBLIC;
 Type ftype = fr.getType();
 sc.addField(Scene.v().makeSootField(fname, ftype, modifiers));
} else {
origin: Sable/soot

private void addOuterClassThisRefField(polyglot.types.Type outerType) {
 soot.Type outerSootType = Util.getSootType(outerType);
 soot.SootField field = Scene.v().makeSootField("this$0", outerSootType, soot.Modifier.PRIVATE | soot.Modifier.FINAL);
 sootClass.addField(field);
 field.addTag(new soot.tagkit.SyntheticTag());
}
origin: Sable/soot

private void addFinals(polyglot.types.LocalInstance li, ArrayList<SootField> finalFields) {
 // add as param for init
 for (SootMethod meth : sootClass.getMethods()) {
  if (meth.getName().equals("<init>")) {
   List<soot.Type> newParams = new ArrayList<soot.Type>();
   newParams.addAll(meth.getParameterTypes());
   newParams.add(Util.getSootType(li.type()));
   meth.setParameterTypes(newParams);
  }
 }
 // add field
 soot.SootField sf = Scene.v().makeSootField("val$" + li.name(), Util.getSootType(li.type()),
   soot.Modifier.FINAL | soot.Modifier.PRIVATE);
 sootClass.addField(sf);
 finalFields.add(sf);
 sf.addTag(new soot.tagkit.SyntheticTag());
}
origin: Sable/soot

private void addCaching() {
 SootClass method = Scene.v().getSootClass("java.lang.reflect.Method");
 method.addField(Scene.v().makeSootField(ALREADY_CHECKED_FIELDNAME, BooleanType.v()));
 SootClass constructor = Scene.v().getSootClass("java.lang.reflect.Constructor");
 constructor.addField(Scene.v().makeSootField(ALREADY_CHECKED_FIELDNAME, BooleanType.v()));
 SootClass clazz = Scene.v().getSootClass("java.lang.Class");
 clazz.addField(Scene.v().makeSootField(ALREADY_CHECKED_FIELDNAME, BooleanType.v()));
 for (Kind k : Kind.values()) {
  addCaching(k);
 }
}
origin: Sable/soot

SootField f = new SootField("cap" + i, capTypes.get(i), 0);
capFields.add(f);
tclass.addField(f);
origin: Sable/soot

randomClass.addField(newField);
constantsToFields.put(constant, newField);
addInitializingValue(randomClass, newField, constant);
origin: Sable/soot

addToClass.addField(sootField);
sootField.addTag(new soot.tagkit.SyntheticTag());
origin: Sable/soot

renameField(applicationClass, opaquePredicateField);
opaquePredicate1ByClass.put(applicationClass, opaquePredicateField);
applicationClass.addField(opaquePredicateField);
renameField(applicationClass, opaquePredicateField);
opaquePredicate2ByClass.put(applicationClass, opaquePredicateField);
applicationClass.addField(opaquePredicateField);
origin: Sable/soot

soot.Type sootType = Util.getSootType(field.fieldInstance().type());
soot.SootField sootField = Scene.v().makeSootField(name, sootType, modifiers);
sootClass.addField(sootField);
origin: Sable/soot

cl.addField(f);
return f;
declaringClass.addField(sf);
return sf;
origin: Sable/soot

sc.addField(classCacher);
classToClassField.put(sc, classCacher);
origin: Sable/soot

soot.SootField assertionsDisabledField
  = Scene.v().makeSootField(fieldName, fieldType, soot.Modifier.STATIC | soot.Modifier.FINAL);
sootClass.addField(assertionsDisabledField);
assertionsDisabledField.addTag(new soot.tagkit.SyntheticTag());
addToClass.addField(classField);
classField.addTag(new soot.tagkit.SyntheticTag());
origin: Sable/soot

bclass.addField(field);
origin: Sable/soot

  Modifier.STATIC | Modifier.PUBLIC);
lockNumber++;
lockClass.addField(actualLockObject);
origin: Sable/soot

Scene.v().getMainClass().addField(globalLockObj[i]);
origin: Sable/soot

/**
 * @ast method
 * @aspect EmitJimple
 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:329
 */
public void jimplify1phase2() {
  String name = name();
  soot.Type type = type().getSootType();
  int modifiers = sootTypeModifiers();
  if (!hostType().getSootClassDecl().declaresFieldByName(name)) {
    SootField f = Scene.v().makeSootField(name, type, modifiers);
    hostType().getSootClassDecl().addField(f);
    if (isStatic() && isFinal() && isConstant() && (type().isPrimitive() || type().isString())) {
      if (type().isString())
        f.addTag(new soot.tagkit.StringConstantValueTag(constant().stringValue()));
      else if (type().isLong())
        f.addTag(new soot.tagkit.LongConstantValueTag(constant().longValue()));
      else if (type().isDouble())
        f.addTag(new soot.tagkit.DoubleConstantValueTag(constant().doubleValue()));
      else if (type().isFloat())
        f.addTag(new soot.tagkit.FloatConstantValueTag(constant().floatValue()));
      else if (type().isIntegralType())
        f.addTag(new soot.tagkit.IntegerConstantValueTag(constant().intValue()));
    }
    sootField = f;
  } else {
    sootField = hostType().getSootClassDecl().getFieldByName(name);
  }
  addAttributes();
}
origin: secure-software-engineering/FlowDroid

@Override
protected void createAdditionalFields() {
  super.createAdditionalFields();
  // Create a name for a field for the result intent of this component
  String fieldName = "ipcResultIntent";
  int fieldIdx = 0;
  while (component.declaresFieldByName(fieldName))
    fieldName = "ipcResultIntent_" + fieldIdx++;
  // Create the field itself
  resultIntentField = Scene.v().makeSootField(fieldName, RefType.v("android.content.Intent"), Modifier.PUBLIC);
  component.addField(resultIntentField);
}
origin: secure-software-engineering/FlowDroid

@Override
protected void createAdditionalFields() {
  super.createAdditionalFields();
  // Create a name for a field for the intent with which the component is started
  String fieldName = "ipcIntent";
  int fieldIdx = 0;
  while (component.declaresFieldByName(fieldName))
    fieldName = "ipcIntent_" + fieldIdx++;
  // Create the field itself
  intentField = Scene.v().makeSootField(fieldName, RefType.v("android.content.Intent"), Modifier.PUBLIC);
  component.addField(intentField);
}
sootSootClassaddField

Javadoc

Adds the given field to this class.

Popular methods of SootClass

  • isInterface
    Convenience method; returns true if this class is an interface.
  • getMethods
  • getName
    Returns the name of this class.
  • setApplicationClass
    Makes this class an application class.
  • getFields
    Returns a backed Chain of fields.
  • getInterfaces
    Returns a backed Chain of the interfaces that are directly implemented by this class. (see getInterf
  • getSuperclass
    WARNING: interfaces are subclasses of the java.lang.Object class! Returns the superclass of this cla
  • hasSuperclass
    WARNING: interfaces are subclasses of the java.lang.Object class! Does this class have a superclass?
  • resolvingLevel
  • addMethod
    Adds the given method to this class.
  • declaresMethod
    Does this class declare a method with the given subsignature?
  • getMethod
  • declaresMethod,
  • getMethod,
  • getType,
  • isApplicationClass,
  • isLibraryClass,
  • isAbstract,
  • isPhantom,
  • <init>,
  • declaresField

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Notification (javax.management)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Table (org.hibernate.mapping)
    A relational table
  • Option (scala)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now