org.qedeq.kernel.se.common
Class ModuleContext

java.lang.Object
  extended by org.qedeq.kernel.se.common.ModuleContext

public class ModuleContext
extends java.lang.Object

Define context for an instance of Qedeq. It consists of a location information: where is this module located. Also the location within the Qedeq object should be described in an XPath like manner.

The idea behind this context is a caller perspective. The caller sets the context (at least the module location information) and if the called method throws an exception a try/catch block can retrieve the context information.

Author:
Michael Meyling

Constructor Summary
ModuleContext(ModuleAddress moduleLocation)
          Constructor.
ModuleContext(ModuleAddress moduleLocation, java.lang.String locationWithinModule)
          Constructor.
ModuleContext(ModuleAddress moduleLocation, java.lang.String locationWithinModule, SourcePosition startDelta, SourcePosition endDelta)
          Constructor.
ModuleContext(ModuleContext original)
          Copy constructor.
ModuleContext(ModuleContext main, java.lang.String moduleLocation)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 SourcePosition getEndDelta()
          Get delta position (relative to location start).
 java.lang.String getLocationWithinModule()
          Get location information where are we within the module.
 ModuleAddress getModuleLocation()
          Get location information about module.
 SourcePosition getStartDelta()
          Get delta position (relative to location start).
 int hashCode()
           
 void setLocationWithinModule(java.lang.String locationWithinModule)
          Set location information where are we within the module.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleContext

public ModuleContext(ModuleAddress moduleLocation,
                     java.lang.String locationWithinModule,
                     SourcePosition startDelta,
                     SourcePosition endDelta)
Constructor.

Parameters:
moduleLocation - Module location information. Must not be null.
locationWithinModule - Location within module. Must not be null.
startDelta - Skip position (relative to location start). Could be null.
endDelta - Mark until this column (relative to location start). Could be null.
Throws:
java.lang.NullPointerException - At least one parameter is null.
java.lang.IllegalArgumentException - One parameter is below its allowed minimum.

ModuleContext

public ModuleContext(ModuleAddress moduleLocation,
                     java.lang.String locationWithinModule)
Constructor.

Parameters:
moduleLocation - Module location information. Must not be null.
locationWithinModule - Location within module. Must not be null.
Throws:
java.lang.NullPointerException - At least one parameter is null.

ModuleContext

public ModuleContext(ModuleAddress moduleLocation)
Constructor.

Parameters:
moduleLocation - Module location information.

ModuleContext

public ModuleContext(ModuleContext original)
Copy constructor.

Parameters:
original - Original context.

ModuleContext

public ModuleContext(ModuleContext main,
                     java.lang.String moduleLocation)
Constructor.

Parameters:
main - Main context. Must not be null.
moduleLocation - Module location information. Must not be null.
Method Detail

getModuleLocation

public final ModuleAddress getModuleLocation()
Get location information about module.

Returns:
Module location information.

getLocationWithinModule

public final java.lang.String getLocationWithinModule()
Get location information where are we within the module.

Returns:
Location within module.

setLocationWithinModule

public final void setLocationWithinModule(java.lang.String locationWithinModule)
Set location information where are we within the module.

Parameters:
locationWithinModule - Location within module.

getStartDelta

public final SourcePosition getStartDelta()
Get delta position (relative to location start). This describes the precise location start. Could be null.

Returns:
Delta for precise location start.

getEndDelta

public final SourcePosition getEndDelta()
Get delta position (relative to location start). This describes the precise location end. Could be null.

Returns:
Delta for precise location end.

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014. All Rights Reserved.