dk.brics.string.intermediate.operations
Class FieldUsageAnalysis

java.lang.Object
  extended by dk.brics.string.intermediate.operations.FieldUsageAnalysis

public class FieldUsageAnalysis
extends Object

Finds the set of fields that each method reads and/or modifies.

Formally, a method reads the field F if it contains a reference to F, or a call to a method that reads F. Likewise, it assigns to F if it contains an assignment to F, or a call to a method that assigns to F.


Constructor Summary
FieldUsageAnalysis(Collection<? extends Method> methods)
           
 
Method Summary
 Set<Field> getUsedFields(Method method)
          Returns the set of fields that may be read and/or modified as a result of invoking the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldUsageAnalysis

public FieldUsageAnalysis(Collection<? extends Method> methods)
Method Detail

getUsedFields

public Set<Field> getUsedFields(Method method)
Returns the set of fields that may be read and/or modified as a result of invoking the method.

Parameters:
method - a method
Returns:
an unmodifiable set


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.