|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Quads.FieldSyncOracle
public class FieldSyncOracle
A FieldSyncOracle
tells which fields a given method could
possibly access (either directly, or via a method call), and whether
the given method will ever acquire/release a lock (either directly, or
via a method call). This analysis is useful for determining which
memory optimizations are safe across a given method call (and
other things).
Constructor Summary | |
---|---|
FieldSyncOracle(HCodeFactory hcf,
ClassHierarchy ch,
CallGraph cg)
Creates a FieldSyncOracle . |
Method Summary | |
---|---|
Set |
fieldsRead(HMethod hm)
Returns a Set of HField s read,
either directly or indirectly, by HMethod hm. |
Set |
fieldsWritten(HMethod hm)
Returns a Set of HField s written,
either directly or indirectly, by HMethod hm. |
boolean |
isRead(HMethod hm,
HField hf)
Returns true if HMethod
hm will ever read HField
hf , either directly or via a method call. |
boolean |
isSync(HMethod hm)
Returns true if HMethod
hm will ever acquire/release a lock (either
directly, or via a method call). |
boolean |
isWritten(HMethod hm,
HField hf)
Returns true if HMethod
hm will ever write HField
hf , either directly or via a method call. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldSyncOracle(HCodeFactory hcf, ClassHierarchy ch, CallGraph cg)
FieldSyncOracle
.
Method Detail |
---|
public boolean isSync(HMethod hm)
true
if HMethod
hm
will ever acquire/release a lock (either
directly, or via a method call).
public boolean isRead(HMethod hm, HField hf)
true
if HMethod
hm
will ever read HField
hf
, either directly or via a method call.
public Set fieldsRead(HMethod hm)
Set
of HField
s read,
either directly or indirectly, by HMethod
hm.
public boolean isWritten(HMethod hm, HField hf)
true
if HMethod
hm
will ever write HField
hf
, either directly or via a method call.
public Set fieldsWritten(HMethod hm)
Set
of HField
s written,
either directly or indirectly, by HMethod
hm.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |