dk.brics.string.intermediate.operations
Class FieldUsageAnalysis
java.lang.Object
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.
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 |
FieldUsageAnalysis
public FieldUsageAnalysis(Collection<? extends Method> methods)
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.