Tabnine Logo
IField.isFinal
Code IndexAdd Tabnine to your IDE (free)

How to use
isFinal
method
in
com.ibm.wala.classLoader.IField

Best Java code snippets using com.ibm.wala.classLoader.IField.isFinal (Showing top 3 results out of 315)

origin: wala/WALA

@Override
public SinkSpec[] getSinkSpecs() {		
  List<SinkSpec> specs = new ArrayList<>();
  Collection<IMethod> methods = cha.getPossibleTargets(StringStuff.makeMethodReference(methodSignature));
  for (IField field : fields) {
    if (!field.isFinal()) {
      for (IMethod method : methods) {
        specs.add(new StaticFieldSinkSpec(field, method));
      }
    }
  }
  return specs.toArray(new SinkSpec[] {});
}
origin: wala/WALA

public IUnaryFlowFunction makeStaticFieldTaints(
    BasicBlockInContext<E> dest, SSAInstruction inst, final PairBasedFlowFunction<E> flowFunction) {
  final Set<DomainElement> elts = HashSetFactory.make();
  for (CodeElement ce : getStaticFieldAccessCodeElts((SSAGetInstruction) inst)) {
    StaticFieldElement sfe = (StaticFieldElement) ce;
    IField field = pa.getClassHierarchy().resolveField(sfe.getRef());
    if (field.isFinal()) {
      continue;
    }
    final StaticFieldFlow<E> taintSource = new StaticFieldFlow<>(dest,
        field, true);
    elts.add(new DomainElement(ce, taintSource));
  }
  IUnaryFlowFunction newTaints = new ConstantFlowFunction<>(domain, elts);
  return compose(flowFunction, newTaints);
}
origin: wala/WALA

 /**
  * This main program shows one example use of thread escape analysis: producing a set of fields to be monitored for a
  * dynamic race detector. The idea is that any field might have a race with two exceptions: final fields do not have
  * races since there are no writes to them, and volatile fields have atomic read and write semantics provided by the
  * VM. Hence, this piece of code produces a list of all other fields.
  */
 public static void main(String[] args) throws IOException, IllegalArgumentException, CancelException {
  String mainClassName = args[0];

  Set<JarFile> jars = HashSetFactory.make();
  for (int i = 1; i < args.length; i++) {
   jars.add(new JarFile(args[i], false));
  }

  Set<IClass> escapingTypes = (new SimpleThreadEscapeAnalysis(jars, mainClassName)).gatherThreadEscapingClasses();

  for (IClass cls : escapingTypes) {
   if (!cls.isArrayClass()) {
    for (IField f : cls.getAllFields()) {
     if (!f.isVolatile() && !f.isFinal()) {
      System.err.println(f.getReference());
     }
    }
   }
  }
 }
}
com.ibm.wala.classLoaderIFieldisFinal

Javadoc

Is this field final?

Popular methods of IField

  • getFieldTypeReference
  • getReference
  • isStatic
  • getName
  • getDeclaringClass
  • getAnnotations
  • isVolatile
    Is this member volatile?

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JTextField (javax.swing)
  • 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
  • Top 12 Jupyter Notebook extensions
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