org.cip4.jdflib.core
Class JDFException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.cip4.jdflib.core.JDFException
All Implemented Interfaces:
Serializable

public class JDFException
extends RuntimeException

Author:
Rainer Prosi, Heidelberger Druckmaschinen Standard JDF runtime exception class
See Also:
Serialized Form

Constructor Summary
JDFException(String message)
          constructor the id is calculated as a hash code
JDFException(String message, boolean bPrintStack)
          Deprecated. print the stack trace in the application
JDFException(String message, int _id)
          constructor if a stack trace is needed use JDFException (String message, boolean bPrintStack)
 
Method Summary
 boolean equals(Object obj)
          equals that includes the value of id
 int getID()
          return a unique identifier of this exception if id was not explicitley set, a hash code is returned
 int hashCode()
           
 String toString()
          toString - StringRepresentation of JDFNode
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDFException

public JDFException(String message)
constructor the id is calculated as a hash code

Parameters:
message - the message to print out

JDFException

public JDFException(String message,
                    int _id)
constructor if a stack trace is needed use JDFException (String message, boolean bPrintStack)

Parameters:
message -
_id - id of the exception - never use id=0, since this is the flag to use the has code as id

JDFException

@Deprecated
public JDFException(String message,
                               boolean bPrintStack)
Deprecated. print the stack trace in the application

constructor

Parameters:
message -
bPrintStack - print Stacktrace if true
Method Detail

equals

public boolean equals(Object obj)
equals that includes the value of id

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if obj is the same type of exception
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
the hashcode that takes id into account
See Also:
Object.hashCode()

toString

public String toString()
toString - StringRepresentation of JDFNode

Overrides:
toString in class Throwable
Returns:
String

getID

public int getID()
return a unique identifier of this exception if id was not explicitley set, a hash code is returned

Returns:
int the id


Copyright © 2013. All Rights Reserved.