java.lang.Object
de.grogra.xl.impl.base.RuntimeModel
de.grogra.rgg.model.Runtime
- All Implemented Interfaces:
RuntimeModel
-
Field Summary
FieldsFields inherited from class de.grogra.xl.impl.base.RuntimeModel
BRANCH_EDGE, branchIn, CONTAINMENT_EDGE, CONTAINMENT_END_EDGE, copyIn, copyInNoRefine, copyOut, copyOutNoRefine, MARK_EDGE, MIN_NORMAL_BIT_INDEX, MIN_USER_EDGE, REFINEMENT_EDGE, SPECIAL_MASK, SUCCESSOR_EDGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEdgeBits
(Object source, Object target, int bits) Adds a set of edge bits from asource
node to atarget
node.createEdgeIterator
(Object node, EdgeDirection dir) Creates an iterator over the edges ofnode
.Returns the graph that shall be used in the context of the current thread.int
getEdgeBits
(Object source, Object target) Return the edge bits between asource
node and atarget
node.Specifies the base type of nodes of this runtime model.boolean
Determines ifvalue
represents a valid node for this run-time model.boolean
isWrapperFor
(Object wrapper, Type type) Tests if the object is a wrapper for values of the given type.void
setCurrentGraph
(GraphManager graph) void
setCurrentGraph
(Graph extent) boolean
unwrapBoolean
(Object wrapper) Extracts the boolean value of a wrapper.byte
unwrapByte
(Object wrapper) Extracts the byte value of a wrapper.char
unwrapChar
(Object wrapper) Extracts the char value of a wrapper.double
unwrapDouble
(Object wrapper) Extracts the double value of a wrapper.float
unwrapFloat
(Object wrapper) Extracts the float value of a wrapper.int
Extracts the int value of a wrapper.long
unwrapLong
(Object wrapper) Extracts the long value of a wrapper.unwrapObject
(Object wrapper) Extracts the Object value of a wrapper.short
unwrapShort
(Object wrapper) Extracts the short value of a wrapper.Methods inherited from class de.grogra.xl.impl.base.RuntimeModel
edgeBitsIntersection, edgeBitsRemove, edgeBitsUnion, getStandardEdgeFor, initialize, testEdgeBits
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Runtime
public Runtime()
-
-
Method Details
-
setCurrentGraph
- Overrides:
setCurrentGraph
in classRuntimeModel
-
currentGraph
Description copied from interface:RuntimeModel
Returns the graph that shall be used in the context of the current thread. This is needed by graph-related XL statements which do not explicitly specify the graph to use.- Specified by:
currentGraph
in interfaceRuntimeModel
- Overrides:
currentGraph
in classRuntimeModel
- Returns:
- the current graph for this model
-
setCurrentGraph
-
isNode
Description copied from interface:RuntimeModel
Determines ifvalue
represents a valid node for this run-time model.- Specified by:
isNode
in interfaceRuntimeModel
- Overrides:
isNode
in classRuntimeModel
- Parameters:
value
- the value to be tested- Returns:
true
iff the value represents a node
-
getNodeType
Description copied from class:RuntimeModel
Specifies the base type of nodes of this runtime model. This should return the same type asCompiletimeModel.getNodeType()
for the correspondingCompiletimeModel
implementation.- Specified by:
getNodeType
in classRuntimeModel
- Returns:
- base type of nodes
-
addEdgeBits
Description copied from class:RuntimeModel
Adds a set of edge bits from asource
node to atarget
node.- Specified by:
addEdgeBits
in classRuntimeModel
- Parameters:
source
- the source node of the edgetarget
- the target node of the edgebits
- the edge bits that are to be added
-
getEdgeBits
Description copied from class:RuntimeModel
Return the edge bits between asource
node and atarget
node. If there is no edge at all, 0 is returned.- Specified by:
getEdgeBits
in classRuntimeModel
- Parameters:
source
- the source node of the edgetarget
- the target node of the edge- Returns:
- the edge bits
-
createEdgeIterator
Description copied from class:RuntimeModel
Creates an iterator over the edges ofnode
. The iterator is set to the first edge of the node, if any. The directiondir
has to be respected by the iterator.- Specified by:
createEdgeIterator
in classRuntimeModel
- Parameters:
node
- the node whose edges are to be iterateddir
- direction in which edges are traversed (seen fromnode
)- Returns:
- an edge iterator
-
isWrapperFor
Description copied from interface:RuntimeModel
Tests if the object is a wrapper for values of the given type.- Specified by:
isWrapperFor
in interfaceRuntimeModel
- Overrides:
isWrapperFor
in classRuntimeModel
- Parameters:
wrapper
- the potential wrapper to be testedtype
- the value type- Returns:
true
iffobject
is a wrapper for values of typetype
-
unwrapBoolean
Description copied from interface:RuntimeModel
Extracts the boolean value of a wrapper.- Specified by:
unwrapBoolean
in interfaceRuntimeModel
- Overrides:
unwrapBoolean
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapByte
Description copied from interface:RuntimeModel
Extracts the byte value of a wrapper.- Specified by:
unwrapByte
in interfaceRuntimeModel
- Overrides:
unwrapByte
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapShort
Description copied from interface:RuntimeModel
Extracts the short value of a wrapper.- Specified by:
unwrapShort
in interfaceRuntimeModel
- Overrides:
unwrapShort
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapChar
Description copied from interface:RuntimeModel
Extracts the char value of a wrapper.- Specified by:
unwrapChar
in interfaceRuntimeModel
- Overrides:
unwrapChar
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapInt
Description copied from interface:RuntimeModel
Extracts the int value of a wrapper.- Specified by:
unwrapInt
in interfaceRuntimeModel
- Overrides:
unwrapInt
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapLong
Description copied from interface:RuntimeModel
Extracts the long value of a wrapper.- Specified by:
unwrapLong
in interfaceRuntimeModel
- Overrides:
unwrapLong
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapFloat
Description copied from interface:RuntimeModel
Extracts the float value of a wrapper.- Specified by:
unwrapFloat
in interfaceRuntimeModel
- Overrides:
unwrapFloat
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapDouble
Description copied from interface:RuntimeModel
Extracts the double value of a wrapper.- Specified by:
unwrapDouble
in interfaceRuntimeModel
- Overrides:
unwrapDouble
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapObject
Description copied from interface:RuntimeModel
Extracts the Object value of a wrapper.- Specified by:
unwrapObject
in interfaceRuntimeModel
- Overrides:
unwrapObject
in classRuntimeModel
- Parameters:
wrapper
- the wrapper- Returns:
- the wrapped value of the wrapper
-