|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HCodeFactory
An HCodeFactory
makes an HCode
from an
HMethod
. For example, an
HCodeFactory
may make an harpoon.IR.Quads.QuadSSI
from a harpoon.IR.Bytecode.Code
, calling
HMethod.getCode("bytecode")
to get the source representation
for the conversion. The HCodeFactory
should call
HMethod.putCode(this.getCodeName())
after conversion
to cache the result.
Method Summary | |
---|---|
void |
clear(HMethod m)
Removes representation of method m from all caches
in this factory and its parents. |
HCode |
convert(HMethod m)
Make an HCode from an HMethod . |
String |
getCodeName()
Returns a string naming the type of the HCode
that this factory produces. |
Method Detail |
---|
HCode convert(HMethod m)
HCode
from an HMethod
.
convert
is allowed to return null if the requested
conversion is impossible; typically this is because it's attempt
to convert a source representation failed -- for
example, because m
is a native method.
String getCodeName()
HCode
that this factory produces.
this.getCodeName()
should equal
this.convert(m).getName()
for every
HMethod m
.
void clear(HMethod m)
m
from all caches
in this factory and its parents.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |