java.lang.Object
de.grogra.xl.impl.base.RuntimeModel
- All Implemented Interfaces:
RuntimeModel
- Direct Known Subclasses:
Runtime,RuntimeModel,RuntimeModel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe edge bit mask that encodes a branch edge.protected Neighborsstatic final intThe edge bit mask that encodes a containment edge.static final intThe edge bit mask that encodes an end-of-containment edge.protected Neighborsprotected Neighborsprotected Neighborsprotected Neighborsstatic final intThe edge bit mask that encodes some general-purpose mark edge.static final intstatic final intThe first unused edge bit mask.static final intThe edge bit mask that encodes a refinement edge.static final intThe edge bit mask that covers the special edge.static final intThe edge bit mask that encodes a successor edge. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddEdgeBits(Object source, Object target, int bits) Adds a set of edge bits from asourcenode to atargetnode.abstract EdgeIteratorcreateEdgeIterator(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.static final intedgeBitsIntersection(int edgeBits, int mask) static final intedgeBitsRemove(int a, int toBeRemoved) static final intedgeBitsUnion(int a, int b) abstract intgetEdgeBits(Object source, Object target) Return the edge bits between asourcenode and atargetnode.abstract ClassSpecifies the base type of nodes of this runtime model.intgetStandardEdgeFor(int edgeType) voidinitialize(String params) Initializes this model.booleanDetermines ifvaluerepresents a valid node for this run-time model.booleanisWrapperFor(Object object, Type type) Tests if the object is a wrapper for values of the given type.voidsetCurrentGraph(Graph extent) static final booleantestEdgeBits(int edgeBits, int mask) booleanunwrapBoolean(Object wrapper) Extracts the boolean value of a wrapper.byteunwrapByte(Object wrapper) Extracts the byte value of a wrapper.charunwrapChar(Object wrapper) Extracts the char value of a wrapper.doubleunwrapDouble(Object wrapper) Extracts the double value of a wrapper.floatunwrapFloat(Object wrapper) Extracts the float value of a wrapper.intExtracts the int value of a wrapper.longunwrapLong(Object wrapper) Extracts the long value of a wrapper.unwrapObject(Object wrapper) Extracts the Object value of a wrapper.shortunwrapShort(Object wrapper) Extracts the short value of a wrapper.
-
Field Details
-
SUCCESSOR_EDGE
public static final int SUCCESSOR_EDGEThe edge bit mask that encodes a successor edge.This bit mask represents bit 8, i.e., its value is 256.
- See Also:
-
BRANCH_EDGE
public static final int BRANCH_EDGEThe edge bit mask that encodes a branch edge.This bit mask represents bit 9, i.e., its value is 512.
- See Also:
-
CONTAINMENT_EDGE
public static final int CONTAINMENT_EDGEThe edge bit mask that encodes a containment edge.This bit mask represents bit 10, i.e., its value is 1024.
- See Also:
-
CONTAINMENT_END_EDGE
public static final int CONTAINMENT_END_EDGEThe edge bit mask that encodes an end-of-containment edge.This bit mask represents bit 11.
- See Also:
-
REFINEMENT_EDGE
public static final int REFINEMENT_EDGEThe edge bit mask that encodes a refinement edge.This bit mask represents bit 12.
- See Also:
-
MARK_EDGE
public static final int MARK_EDGEThe edge bit mask that encodes some general-purpose mark edge.This bit mask represents bit 13.
- See Also:
-
MIN_USER_EDGE
public static final int MIN_USER_EDGEThe first unused edge bit mask. This and all higher bit masks can be used freely.This bit mask represents bit 14.
- See Also:
-
SPECIAL_MASK
public static final int SPECIAL_MASKThe edge bit mask that covers the special edge.This bit mask represents the bits 0 - 7, i.e., its value is 255.
- See Also:
-
MIN_NORMAL_BIT_INDEX
public static final int MIN_NORMAL_BIT_INDEX- See Also:
-
copyOut
-
copyIn
-
copyOutNoRefine
-
copyInNoRefine
-
branchIn
-
-
Constructor Details
-
RuntimeModel
public RuntimeModel()
-
-
Method Details
-
getNodeType
Specifies the base type of nodes of this runtime model. This should return the same type asCompiletimeModel.getNodeType()for the correspondingCompiletimeModelimplementation.- Returns:
- base type of nodes
-
addEdgeBits
Adds a set of edge bits from asourcenode to atargetnode.- Parameters:
source- the source node of the edgetarget- the target node of the edgebits- the edge bits that are to be added
-
getEdgeBits
Return the edge bits between asourcenode and atargetnode. If there is no edge at all, 0 is returned.- Parameters:
source- the source node of the edgetarget- the target node of the edge- Returns:
- the edge bits
-
createEdgeIterator
Creates an iterator over the edges ofnode. The iterator is set to the first edge of the node, if any. The directiondirhas to be respected by the iterator.- Parameters:
node- the node whose edges are to be iterateddir- direction in which edges are traversed (seen fromnode)- Returns:
- an edge iterator
-
initialize
Description copied from interface:RuntimeModelInitializes this model. This method is invoked byRuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader)after a newRuntimeModelinstance has been created. The format ofparamsdepends on implementations ofRuntimeModel.- Specified by:
initializein interfaceRuntimeModel- Parameters:
params- initialization parameters, possiblynull
-
getStandardEdgeFor
public int getStandardEdgeFor(int edgeType) -
setCurrentGraph
-
currentGraph
Description copied from interface:RuntimeModelReturns 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:
currentGraphin interfaceRuntimeModel- Returns:
- the current graph for this model
-
isNode
Description copied from interface:RuntimeModelDetermines ifvaluerepresents a valid node for this run-time model.- Specified by:
isNodein interfaceRuntimeModel- Parameters:
value- the value to be tested- Returns:
trueiff the value represents a node
-
testEdgeBits
public static final boolean testEdgeBits(int edgeBits, int mask) -
edgeBitsIntersection
public static final int edgeBitsIntersection(int edgeBits, int mask) -
edgeBitsUnion
public static final int edgeBitsUnion(int a, int b) -
edgeBitsRemove
public static final int edgeBitsRemove(int a, int toBeRemoved) -
isWrapperFor
Description copied from interface:RuntimeModelTests if the object is a wrapper for values of the given type.- Specified by:
isWrapperForin interfaceRuntimeModel- Parameters:
object- the potential wrapper to be testedtype- the value type- Returns:
trueiffobjectis a wrapper for values of typetype
-
unwrapBoolean
Description copied from interface:RuntimeModelExtracts the boolean value of a wrapper.- Specified by:
unwrapBooleanin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapByte
Description copied from interface:RuntimeModelExtracts the byte value of a wrapper.- Specified by:
unwrapBytein interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapShort
Description copied from interface:RuntimeModelExtracts the short value of a wrapper.- Specified by:
unwrapShortin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapChar
Description copied from interface:RuntimeModelExtracts the char value of a wrapper.- Specified by:
unwrapCharin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapInt
Description copied from interface:RuntimeModelExtracts the int value of a wrapper.- Specified by:
unwrapIntin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapLong
Description copied from interface:RuntimeModelExtracts the long value of a wrapper.- Specified by:
unwrapLongin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapFloat
Description copied from interface:RuntimeModelExtracts the float value of a wrapper.- Specified by:
unwrapFloatin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapDouble
Description copied from interface:RuntimeModelExtracts the double value of a wrapper.- Specified by:
unwrapDoublein interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-
unwrapObject
Description copied from interface:RuntimeModelExtracts the Object value of a wrapper.- Specified by:
unwrapObjectin interfaceRuntimeModel- Parameters:
wrapper- the wrapper- Returns:
- the wrapped value of the wrapper
-