JBoss Modular Service Kernel API 1.0.0.Beta6

org.jboss.msc.service
Class Location

java.lang.Object
  extended by org.jboss.msc.service.Location
All Implemented Interfaces:
Serializable

public final class Location
extends Object
implements Serializable

A location at which a service was defined.

Author:
David M. Lloyd
See Also:
Serialized Form

Constructor Summary
Location(String fileName, int lineNumber, int columnNumber, Location parentLocation)
          Create a new instance.
 
Method Summary
 boolean equals(Location obj)
          Compare this location with another.
 boolean equals(Object obj)
          Compare this location with another.
 int getColumnNumber()
          Get the column number.
 String getFileName()
          Get the file name.
 int getLineNumber()
          Get the line number.
 int hashCode()
          Get the hash code.
 String toString()
          Get the human-readable string representation of this location.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Location

public Location(String fileName,
                int lineNumber,
                int columnNumber,
                Location parentLocation)
Create a new instance.

Parameters:
fileName - the file name, or null if unknown
lineNumber - the line number, or 0 if unknown
columnNumber - the column number, or 0 if unknown
parentLocation - the parent location, or null for none
Method Detail

getFileName

public String getFileName()
Get the file name.

Returns:
the file name, or null if unknown

getLineNumber

public int getLineNumber()
Get the line number.

Returns:
the line number, or 0 if unknown

getColumnNumber

public int getColumnNumber()
Get the column number.

Returns:
the column number, or 0 if unknown

hashCode

public int hashCode()
Get the hash code. This method exists for internal consistency with equals(); location objects are not generally optimized to be usable as hash keys.

Overrides:
hashCode in class Object
Returns:
the hash code

equals

public boolean equals(Object obj)
Compare this location with another.

Overrides:
equals in class Object
Parameters:
obj - the other location
Returns:
true if they are equal, false if they are not equal or the argument is not a location

equals

public boolean equals(Location obj)
Compare this location with another.

Parameters:
obj - the other location
Returns:
true if they are equal, false if they are not equal or the argument is null

toString

public String toString()
Get the human-readable string representation of this location.

Overrides:
toString in class Object
Returns:
the string

JBoss Modular Service Kernel API 1.0.0.Beta6

Copyright © 2011 JBoss, a division of Red Hat, Inc.