PIRL.Strings

## Class strip_DEBUG

- java.lang.Object
- - PIRL.Strings.strip_DEBUG

    public class strip_DEBUG
    extends Object

strip_DEBUG is a filter utility to remove "DEBUG" sections from source code files.

Use:

>             java strip_DEBUG [<source filename>]

Since Java does not provide preprocessor capabilities, debugging code sections can not be surrounded by #ifdef statements as they are in C/C++. For Java, then, the in-line code debugging technique assumed here is the use of a "DEBUG" marker to identify sequences of code that are only used for debugging purposes. This utility strips "DEBUG" sequences from a source code file.

A "DEBUG" sequence is identified by an expression containing the "DEBUG" marker. All source code lines containing the expression are stripped from the resultant output. The expression may be may be a variable or variable list which includes all members of the list, a method which includes the entire method definition, a conditional which includes the expression or expression block following the conditional, or any other expression. When expressions are stripped the entirertiy of all lines containing the expression are removed; thus "DEBUG" expressions must not be mixed with other expressions on the same line(s).

N.B.: The "DEBUG" string that is immediately preceded by a whitespace character, end of line sequence or left parenthesis character is taken to be contained in a "DEBUG" expression. Thus comments containing the unquoted word "DEBUG" will be mistaken for part of an expression resulting in incorrectly stripping the line on which "DEBUG" occurs and the expression following the comment (unless the commend contains characters that can misinterpreted as the end of an expression). The "DEBUG"

The sripped file is written to stdout. If no source filename is specified, it is read from stdin.

### Field Summary

Fields
`static String` `ID`

### Constructor Summary

Constructors
Constructor and Description
`strip_DEBUG()`

### Method Summary

Methods
`static void` `main(String[] arguments)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### ID

    public static final String ID

See Also:
  Constant Field Values

### Constructor Detail

#### strip_DEBUG

    public strip_DEBUG()

### Method Detail

#### main

    public static void main(String[] arguments)