public class ShallowModelTransformer
extends soot.SceneTransformer
implements soot.HasPhaseOptions
Modifier and Type | Method and Description |
---|---|
static void |
createFieldsForAttributes(soot.jimple.JimpleBody body,
NamedObj context,
soot.Local contextLocal,
NamedObj namedObj,
soot.Local namedObjLocal,
soot.SootClass theClass,
java.util.HashSet createdSet)
Create and set attributes.
|
static java.lang.String |
getBufferFieldName(TypedIORelation relation,
int channel,
Type type)
Return the name of the field that is created to
represent the given channel of the given type of the
given relation.
|
java.lang.String |
getDeclaredOptions()
Return the declared options.
|
java.lang.String |
getDefaultOptions()
Return the default options.
|
static java.lang.String |
getFieldNameForAttribute(Attribute attribute,
NamedObj context)
Return the name of the field that is created for the
given attribute.
|
static java.lang.String |
getFieldNameForEntity(Entity entity,
NamedObj context)
Return the name of the field that is created for the
given entity.
|
static java.lang.String |
getFieldNameForPort(Port port,
NamedObj context)
Return the name of the field that is created for the
given port.
|
static java.lang.String |
getFieldNameForRelation(Relation relation,
NamedObj context)
Return the name of the field that is created for the
given entity.
|
java.lang.String |
getPhaseName()
Return the phase name.
|
protected void |
internalTransform(java.lang.String phaseName,
java.util.Map options)
Perform the shallow model transformation.
|
static ShallowModelTransformer |
v(CompositeEntity model)
Return an instance of this transformer that will operate on
the given model.
|
public static ShallowModelTransformer v(CompositeEntity model)
model
- The model that this class will operate on.public static void createFieldsForAttributes(soot.jimple.JimpleBody body, NamedObj context, soot.Local contextLocal, NamedObj namedObj, soot.Local namedObjLocal, soot.SootClass theClass, java.util.HashSet createdSet)
body
- The Jimple body.context
- The context.contextLocal
- The context for localsnamedObj
- The NamedObj that contains the attributes.namedObjLocal
- The NamedObj where we create locals.theClass
- The soot class.createdSet
- A set that contains the full names of created
objects.public static java.lang.String getBufferFieldName(TypedIORelation relation, int channel, Type type)
relation
- The relationchannel
- The channel numbertype
- The typepublic java.lang.String getDefaultOptions()
getDefaultOptions
in interface soot.HasPhaseOptions
public java.lang.String getDeclaredOptions()
getDeclaredOptions
in interface soot.HasPhaseOptions
public static java.lang.String getFieldNameForEntity(Entity entity, NamedObj context)
entity
- The entitycontext
- The context of the entitypublic static java.lang.String getFieldNameForPort(Port port, NamedObj context)
port
- The portcontext
- The context of the portpublic static java.lang.String getFieldNameForAttribute(Attribute attribute, NamedObj context)
attribute
- The attributecontext
- The context of the attributepublic static java.lang.String getFieldNameForRelation(Relation relation, NamedObj context)
relation
- The relationcontext
- The context of the relationpublic java.lang.String getPhaseName()
getPhaseName
in interface soot.HasPhaseOptions
protected void internalTransform(java.lang.String phaseName, java.util.Map options)
internalTransform
in class soot.SceneTransformer
phaseName
- The name of the phase.options
- A map of options