de.grogra.xl.impl.dom
Class RuntimeModel

java.lang.Object
  extended by de.grogra.xl.impl.base.RuntimeModel
      extended by de.grogra.xl.impl.dom.RuntimeModel
All Implemented Interfaces:
RuntimeModel

public class RuntimeModel
extends RuntimeModel


Field Summary
static int ATTRIBUTE
           
static int SIBLING
           
 
Fields inherited from class de.grogra.xl.impl.base.RuntimeModel
BRANCH_EDGE, branchIn, CONTAINMENT_EDGE, CONTAINMENT_END_EDGE, copyIn, copyOut, MARK_EDGE, MIN_NORMAL_BIT_INDEX, MIN_USER_EDGE, REFINEMENT_EDGE, SPECIAL_MASK, SUCCESSOR_EDGE
 
Constructor Summary
RuntimeModel()
           
 
Method Summary
 void addEdgeBits(java.lang.Object source, java.lang.Object target, int bits)
          Adds a set of edge bits from a source node to a target node.
 EdgeIterator createEdgeIterator(java.lang.Object node, EdgeDirection dir)
          Creates an iterator over the edges of node.
 int getEdgeBits(java.lang.Object source, java.lang.Object target)
          Return the edge bits between a source node and a target node.
 java.lang.Class getNodeType()
          Specifies the base type of nodes of this runtime model.
 boolean isWrapperFor(java.lang.Object object, Type type)
          Tests if the object is a wrapper for values of the given type.
 java.lang.Object unwrapObject(java.lang.Object wrapper)
          Extracts the Object value of a wrapper.
 
Methods inherited from class de.grogra.xl.impl.base.RuntimeModel
currentGraph, edgeBitsIntersection, edgeBitsUnion, getStandardEdgeFor, initialize, isNode, setCurrentGraph, testEdgeBits, unwrapBoolean, unwrapByte, unwrapChar, unwrapDouble, unwrapFloat, unwrapInt, unwrapLong, unwrapShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE

public static final int ATTRIBUTE
See Also:
Constant Field Values

SIBLING

public static final int SIBLING
See Also:
Constant Field Values
Constructor Detail

RuntimeModel

public RuntimeModel()
Method Detail

addEdgeBits

public void addEdgeBits(java.lang.Object source,
                        java.lang.Object target,
                        int bits)
Description copied from class: RuntimeModel
Adds a set of edge bits from a source node to a target node.

Specified by:
addEdgeBits in class RuntimeModel
Parameters:
source - the source node of the edge
target - the target node of the edge
bits - the edge bits that are to be added

createEdgeIterator

public EdgeIterator createEdgeIterator(java.lang.Object node,
                                       EdgeDirection dir)
Description copied from class: RuntimeModel
Creates an iterator over the edges of node. The iterator is set to the first edge of the node, if any. The direction dir has to be respected by the iterator.

Specified by:
createEdgeIterator in class RuntimeModel
Parameters:
node - the node whose edges are to be iterated
dir - direction in which edges are traversed (seen from node)
Returns:
an edge iterator

getEdgeBits

public int getEdgeBits(java.lang.Object source,
                       java.lang.Object target)
Description copied from class: RuntimeModel
Return the edge bits between a source node and a target node. If there is no edge at all, 0 is returned.

Specified by:
getEdgeBits in class RuntimeModel
Parameters:
source - the source node of the edge
target - the target node of the edge
Returns:
the edge bits

getNodeType

public java.lang.Class getNodeType()
Description copied from class: RuntimeModel
Specifies the base type of nodes of this runtime model. This should return the same type as CompiletimeModel.getNodeType() for the corresponding CompiletimeModel implementation.

Specified by:
getNodeType in class RuntimeModel
Returns:
base type of nodes

isWrapperFor

public boolean isWrapperFor(java.lang.Object object,
                            Type type)
Description copied from interface: RuntimeModel
Tests if the object is a wrapper for values of the given type.

Specified by:
isWrapperFor in interface RuntimeModel
Overrides:
isWrapperFor in class RuntimeModel
Parameters:
object - the potential wrapper to be tested
type - the value type
Returns:
true iff object is a wrapper for values of type type

unwrapObject

public java.lang.Object unwrapObject(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the Object value of a wrapper.

Specified by:
unwrapObject in interface RuntimeModel
Overrides:
unwrapObject in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper