|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.henshin.interpreter.util.InterpreterUtil
public class InterpreterUtil
Common utility methods for the Henshin interpreter.
Constructor Summary | |
---|---|
InterpreterUtil()
|
Method Summary | |
---|---|
static boolean |
applyToResource(Assignment assignment,
Engine engine,
Resource resource,
ApplicationMonitor monitor)
Apply a unit to the contents of a resource. |
static boolean |
applyToResource(Unit unit,
Engine engine,
Resource resource)
Apply a unit to the contents of a resource. |
static boolean |
areIsomorphic(EGraph graph1,
EGraph graph2)
Check whether two EGraph s are isomorphic. |
static boolean |
areIsomorphic(Resource resource1,
Resource resource2)
Check whether the contents of two resources are isomorphic. |
static int |
countEdges(EGraph graph)
Count the number of edges/links in a graph. |
static void |
executeOrDie(UnitApplication application)
Execute the given unit application and throws an AssertionError if it could
not be successfully applied (if UnitApplication.execute(ApplicationMonitor)
returns false ). |
static List<Match> |
findAllMatches(Engine engine,
Module module,
EGraph graph)
Find all matches of all rules in a module. |
static List<Match> |
findAllMatches(Engine engine,
Rule rule,
EGraph graph,
Match partialMatch)
Find all matches for a rule. |
static PartialMatchReport |
findAndReportMaximalPartialMatches(Engine engine,
Module module,
EGraph graph)
This method is similar to the method findMasimalPartialMatches but outputs a report instead of a list of matches. |
static List<Match> |
findMaximalPartialMatches(Engine engine,
Module module,
EGraph graph)
This method calculates a complete match for rules of the given model transformation with a given model. |
static String |
objectToString(Object object)
Get a string representation of an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InterpreterUtil()
Method Detail |
---|
public static List<Match> findAllMatches(Engine engine, Rule rule, EGraph graph, Match partialMatch)
engine
- Engine.rule
- Rule to be matched.graph
- Target graph.partialMatch
- Partial match or null
.
public static List<Match> findAllMatches(Engine engine, Module module, EGraph graph)
engine
- Engine to be used.module
- Module to be used.graph
- Target graph.
public static List<Match> findMaximalPartialMatches(Engine engine, Module module, EGraph graph)
engine
- Engine to be used.module
- Module to be used.graph
- Target graph.
public static PartialMatchReport findAndReportMaximalPartialMatches(Engine engine, Module module, EGraph graph)
engine
- Engine to be used.module
- Module to be used.graph
- Target graph.
public static void executeOrDie(UnitApplication application)
AssertionError
if it could
not be successfully applied (if UnitApplication.execute(ApplicationMonitor)
returns false
). This is just a convenience method.
application
- A unit application.public static boolean applyToResource(Unit unit, Engine engine, Resource resource)
EGraph
and updates the contents of the resource.
unit
- Unit to be applied.engine
- Engine to be used.resource
- Resource containing the model to be transformed.
true
if the unit was successfully applied.public static boolean applyToResource(Assignment assignment, Engine engine, Resource resource, ApplicationMonitor monitor)
EGraph
and updates the contents of the resource.
assignment
- Assignment to be used.engine
- Engine to be used.resource
- Resource containing the model to be transformed.
true
if the unit was successfully applied.public static boolean areIsomorphic(EGraph graph1, EGraph graph2)
EGraph
s are isomorphic.
graph1
- First graph.graph2
- Second graph.
true
if they are isomorphic.public static boolean areIsomorphic(Resource resource1, Resource resource2)
resource1
- First resource.resource2
- Second resource.
true
if they are isomorphic.public static int countEdges(EGraph graph)
graph
- An EGraph
public static String objectToString(Object object)
object
- An object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |