java.lang.Object
com.ibm.crypto.hdwrCCA.provider.Debug

public class Debug extends Object
A utility class for debugging.
  • Field Details

    • TYPE_NONE

      public static final long TYPE_NONE
      See Also:
    • TYPE_ALL

      public static final long TYPE_ALL
      Defines a mask containing all of the possible types.
      See Also:
    • TYPE_FINE

      public static final long TYPE_FINE
      Equivalent to Level.FINE
    • TYPE_FINER

      public static final long TYPE_FINER
      Equivalent to Level.FINER
    • TYPE_FINEST

      public static final long TYPE_FINEST
      Equivalent to Level.FINEST
    • TYPE_INFO

      public static final long TYPE_INFO
      Defines an informational message. Use this type to indicate conditions that are worth noting but that do not require a user to take any precautions or perform an action. Sparing use of this type is suggested. An informational message is less severe than a warning message. This value is the same as TYPE_INFORMATION.
      See Also:
    • TYPE_INFORMATION

      public static final long TYPE_INFORMATION
      Defines an informational message. This value is the same as TYPE_INFO.
      See Also:
    • TYPE_WARN

      public static final long TYPE_WARN
      Defines a warning message. Use this type to inform a user that an abnormal condition has been detected. The particular condition will dictate whether the user has to take any action. A warning message is less severe than an error message. This value is the same as TYPE_WARNING.
      See Also:
    • TYPE_WARNING

      public static final long TYPE_WARNING
      Defines a warning message. This value is the same as TYPE_WARN.
      See Also:
    • TYPE_ERR

      public static final long TYPE_ERR
      Defines an error message. Use this type to inform the user of a serious failure in the execution of a program. An error message is less severe than a fatal message. This value is the same as TYPE_ERROR.

      Note: TYPE_ERR is included in the default mask of a Logger and should not be confused with TYPE_ERROR_EXC, which is intended to be used for trace records by Trace.

      See Also:
    • TYPE_ERROR

      public static final long TYPE_ERROR
      Defines an error message. This value is the same as TYPE_ERR.

      Note: TYPE_ERR is included in the default mask of a Logger and should not be confused with TYPE_ERROR_EXC, which is intended to be used for trace records by Trace.

      See Also:
    • TYPE_FATAL

      public static final long TYPE_FATAL
      Defines a fatal message. Use this type to report an error from which the program cannot recover. A fatal message is the most severe message.
      See Also:
    • TYPE_DEFAULT_MESSAGE

      public static final long TYPE_DEFAULT_MESSAGE
      Defines the default message types. The value is (TYPE_INFO | TYPE_WARN | TYPE_ERR | TYPE_FATAL.
      See Also:
    • TYPE_PUBLIC

      public static final long TYPE_PUBLIC
      Defines a public method trace point. This typically includes package and protected scope, as all of these methods may be used by other classes.
    • TYPE_API

      public static final long TYPE_API
      Defines an application programming interface (API) trace point.
      See Also:
    • TYPE_CALLBACK

      public static final long TYPE_CALLBACK
      Defines a callback method trace point. Callbacks are typically used in listener classes, which have registered with another object to be notified when a specific record occurs.
      See Also:
    • TYPE_ENTRY_EXIT

      @Deprecated public static final long TYPE_ENTRY_EXIT
      Deprecated.
      TYPE_ENTRY_EXIT has been split into TYPE_ENTRY and TYPE_EXIT.
      Defines method entry and exit trace points.
      See Also:
    • TYPE_ENTRY

      public static final long TYPE_ENTRY
      Defines method entry trace points. An entry trace point should be added to every significant method to track movement through an application. Trivial methods, such as getters and setters, generally don't have entry or exit trace points because of the added overhead.
      See Also:
    • TYPE_EXIT

      public static final long TYPE_EXIT
      Defines method exit trace points. An exit trace point should be added to every significant method to track movement through an application. Trivial methods, such as getters and setters, generally don't have entry or exit trace points because of the added overhead.
      See Also:
    • TYPE_ERROR_EXC

      public static final long TYPE_ERROR_EXC
      Defines an error or exception condition trace point. This type can be used to trace any exceptional condition.

      Note: TYPE_ERROR_EXC is included in the default mask of a Trace and should not be confused with TYPE_ERROR, which is intended to be used for message records by Logger.

      See Also:
    • TYPE_MISC_DATA

      public static final long TYPE_MISC_DATA
      Defines a miscellaneous data trace point. This type can be used to trace information not covered by any other trace type.
      See Also:
    • TYPE_OBJ_CREATE

      public static final long TYPE_OBJ_CREATE
      Defines an object creation (constructor) trace point.
      See Also:
    • TYPE_OBJ_DELETE

      public static final long TYPE_OBJ_DELETE
      Defines an object deletion (destructor) trace point. This type would generally be used in a finalize method.
      See Also:
    • TYPE_PRIVATE

      public static final long TYPE_PRIVATE
      Defines a private method trace point. Private trace points would be defined in methods with private scope.
      See Also:
    • TYPE_STATIC

      public static final long TYPE_STATIC
      Defines a static method trace point.
      See Also:
    • TYPE_SVC

      public static final long TYPE_SVC
      Defines a service code trace point. Service code is generally "low-level" code which provides commonly used services to other classes.
      See Also:
    • TYPE_PERF

      public static final long TYPE_PERF
      Defines a performance-monitoring trace point. This type can be used to measure the execution time of selected sections of an application.
      See Also:
    • TYPE_LEVEL1

      public static final long TYPE_LEVEL1
      Defines a "low-detail" trace point. Some trace implementations prefer the notion of a "trace level," in which level 1 implies minimal detail, level 2 implies more detail and level 3 implies the most detail. In such a system, these three types would be used exclusively.
      See Also:
    • TYPE_LEVEL2

      public static final long TYPE_LEVEL2
      Defines a "medium-detail" trace point. Some trace implementations prefer the notion of a "trace level," in which level 1 implies minimal detail, level 2 implies more detail and level 3 implies the most detail. In such a system, these three types would be used exclusively.
      See Also:
    • TYPE_LEVEL3

      public static final long TYPE_LEVEL3
      Defines a "high-detail" trace point. Some trace implementations prefer the notion of a "trace level," in which level 1 implies minimal detail, level 2 implies more detail and level 3 implies the most detail. In such a system, these three types would be used exclusively.
      See Also:
  • Constructor Details

  • Method Details

    • Help

      public static void Help()
    • getInstance

      public static Debug getInstance(String option)
      Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be the same as option.
    • getInstance

      public static Debug getInstance(String option, String prefix)
      Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be prefix.
    • isOn

      public static boolean isOn(String option)
      True if the system property "security.debug" contains the string "option".
    • data

      public void data(long type, Object loggingClass, String loggingMethod, byte[] data)
    • entry

      public void entry(long type, Object loggingClass, String loggingMethod)
    • entry

      public void entry(long type, Object loggingClass, String loggingMethod, Object parm1)
    • entry

      public void entry(long type, Object loggingClass, String loggingMethod, Object parm1, Object parm2)
    • entry

      public void entry(long type, Object loggingClass, String loggingMethod, Object[] parms)
    • exception

      public void exception(long type, Object loggingClass, String loggingMethod, Throwable throwable)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, byte retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, short retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, int retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, long retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, float retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, double retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, char retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, boolean retValue)
    • exit

      public void exit(long type, Object loggingClass, String loggingMethod, Object retValue)
    • stackTrace

      public void stackTrace(long type, Object loggingClass, String loggingMethod)
    • stackTrace

      public void stackTrace(long type, Object loggingClass, String loggingMethod, String text)
    • text

      public void text(long type, Object loggingClass, String loggingMethod, String text)
    • text

      public void text(long type, Object loggingClass, String loggingMethod, String text, Object parm1)
    • text

      public void text(long type, Object loggingClass, String loggingMethod, String text, Object parm1, Object parm2)
    • text

      public void text(long type, Object loggingClass, String loggingMethod, String text, Object[] parms)
    • toHexString

      public static String toHexString(BigInteger b)
      return a hexadecimal printed representation of the specified BigInteger object. the value is formatted to fit on lines of at least 75 characters, with embedded newlines. Words are separated for readability, with eight words (32 bytes) per line.
    • toString

      public static String toString(byte[] b)
    • longToLevel

      public static Level longToLevel(long type)
    • safeLongToInt

      public static int safeLongToInt(long l)