Package org.bigraphs.grgen.converter
Class TransformerSupport
java.lang.Object
org.bigraphs.grgen.converter.TransformerSupport
- Direct Known Subclasses:
BigraphTransformer
,RuleTransformer
,SignatureTransformer
Abstract support class that provides support to other transformer-related classes
It cannot be instantiated directly.
It is designed to be extended by direct implementations of BaseTransformer
, e.g., BigraphTransformer
,
to provide support to their common subclasses.
- Author:
- Dominik Grzelak
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertCorrectClassType
(Class classType, Object instance) void
assertPrimeAndGround
(org.bigraphs.framework.core.impl.pure.PureBigraph bigraph) protected String
protected String
closeClassDefinition
(String classPrefix) protected String
closeClassDefinitionWithAttributes
(String classPrefix, String attributeList) protected String
createAbstractEdgeClass
(String abstractEdgeClassIdentifier) protected String
createAbstractNodeClass
(String abstractNodeClassIdentifier) protected String
createEdge
(String edgeClassType, String edgeVar, String nodeVariableLeft, String nodeVariableRight) protected String
createEdgeClass
(String edgeClassIdentifier) protected String
createGraphlet
(String leftPart, String middlePart, String rightPart) Creates the graphletleftPart -middlePart-> rightPart;
protected String
createNodeClass
(String nodeClassIdentifier) protected String
createNodeInstance
(String classType, String name, String variable) protected String
createNodeInstance
(String classType, String name, String variable, int index) protected String
createVarTypeDecl
(String varName, String type) Creates the variablevarName:type
protected String
createVarTypeDeclWithComma
(String varName, String nodeType) Creates the variablevarName:nodeType;
protected String
createVarTypeDeclWithComma
(String varName, org.bigraphs.framework.core.Control nodeTypeAsControl) protected String
extendClass
(String classPrefix, String superClassIdentifier) protected String
nodeTypeOf
(org.bigraphs.framework.core.Control control) protected String
protected String
-
Field Details
-
LINE_SEP
-
DEFAULT_WHITESPACE_CHAR
protected char DEFAULT_WHITESPACE_CHAR
-
-
Constructor Details
-
TransformerSupport
public TransformerSupport()
-
-
Method Details
-
assertCorrectClassType
- Throws:
RuntimeException
-
assertPrimeAndGround
public void assertPrimeAndGround(org.bigraphs.framework.core.impl.pure.PureBigraph bigraph) throws RuntimeException - Throws:
RuntimeException
-
createAbstractNodeClass
-
createAbstractEdgeClass
-
createNodeClass
-
createEdgeClass
-
extendClass
-
closeClassDefinition
-
closeClassDefinitionWithAttributes
-
createNodeInstance
-
createNodeInstance
-
createEdge
-
createVarTypeDecl
Creates the variablevarName:type
- Parameters:
varName
-type
-- Returns:
- the variable declaration
-
createVarTypeDeclWithComma
Creates the variablevarName:nodeType;
- Parameters:
varName
-nodeType
-- Returns:
- the variable declaration
-
createVarTypeDeclWithComma
-
nodeTypeOf
-
createGraphlet
Creates the graphletleftPart -middlePart-> rightPart;
- Parameters:
leftPart
-middlePart
-rightPart
-- Returns:
- the graphlet
-
openRuleModifierBlock
-
openRuleReplaceBlock
-
closeBlock
-