|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoot.Transformer
soot.SceneTransformer
ptolemy.copernicus.shallow.ShallowModelTransformer
public class ShallowModelTransformer
Read in a MoML model and generate a Java class that creates the same model. (i.e. shallow code generation) No attempt is made to analyze actor code. This is primarily useful for using the Java compiler to find bugs, and removing MoML from shipped code.
Red (cxh) |
Red (cxh) |
Method Summary | |
---|---|
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(CompositeActor model)
Return an instance of this transformer that will operate on the given model. |
Methods inherited from class soot.SceneTransformer |
---|
transform, transform, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ShallowModelTransformer v(CompositeActor 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 type
public 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 entity
public static java.lang.String getFieldNameForPort(Port port, NamedObj context)
port
- The portcontext
- The context of the port
public static java.lang.String getFieldNameForAttribute(Attribute attribute, NamedObj context)
attribute
- The attributecontext
- The context of the attribute
public static java.lang.String getFieldNameForRelation(Relation relation, NamedObj context)
relation
- The relationcontext
- The context of the relation
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |