ptolemy.copernicus.shallow
Class ShallowModelTransformer

java.lang.Object
  extended bysoot.Transformer
      extended bysoot.SceneTransformer
          extended byptolemy.copernicus.shallow.ShallowModelTransformer
All Implemented Interfaces:
soot.HasPhaseOptions

public class ShallowModelTransformer
extends soot.SceneTransformer
implements soot.HasPhaseOptions

Since:
Ptolemy II 2.0
Version:
$Id: ShallowModelTransformer.java,v 1.41.2.1 2004/06/18 00:49:03 cxh Exp $
Author:
Stephen Neuendorffer, Christopher Hylands
Accepted Rating:
Red (cxh)
Proposed Rating:
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)
           
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()
           
 java.lang.String getDefaultOptions()
           
static java.lang.String getFieldNameForAttribute(Attribute attribute, NamedObj context)
          Return the name of the field that is created for the given entity.
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 entity.
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()
           
protected  void internalTransform(java.lang.String phaseName, java.util.Map options)
           
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

v

public static ShallowModelTransformer v(CompositeActor model)
Return an instance of this transformer that will operate on the given model. The model is assumed to already have been properly initialized so that resolved types and other static properties of the model can be inspected.


createFieldsForAttributes

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)

getBufferFieldName

public 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.


getDefaultOptions

public java.lang.String getDefaultOptions()
Specified by:
getDefaultOptions in interface soot.HasPhaseOptions

getDeclaredOptions

public java.lang.String getDeclaredOptions()
Specified by:
getDeclaredOptions in interface soot.HasPhaseOptions

getFieldNameForEntity

public static java.lang.String getFieldNameForEntity(Entity entity,
                                                     NamedObj context)
Return the name of the field that is created for the given entity.


getFieldNameForPort

public static java.lang.String getFieldNameForPort(Port port,
                                                   NamedObj context)
Return the name of the field that is created for the given entity.


getFieldNameForAttribute

public static java.lang.String getFieldNameForAttribute(Attribute attribute,
                                                        NamedObj context)
Return the name of the field that is created for the given entity.


getFieldNameForRelation

public static java.lang.String getFieldNameForRelation(Relation relation,
                                                       NamedObj context)
Return the name of the field that is created for the given entity.


getPhaseName

public java.lang.String getPhaseName()
Specified by:
getPhaseName in interface soot.HasPhaseOptions

internalTransform

protected void internalTransform(java.lang.String phaseName,
                                 java.util.Map options)