| Preprocesses content of file replacing all conditional blocks.
/*nbif someswitch
// PART A
nbelse*/
// PART B
/*nbend*/
If someswitch is off, nothing will be changed, so part A will be
commented-out and part B will be active. If someswitch is on,
the code will be changed to:
/*nbif someswitch*/
// PART A
/*nbelse
// PART B
/*nbend*/
So that part A is active and part B is commented-out.
You can also use a block without an else:
/*nbif someswitch
// PART A
/*nbend*/
With the switch off, it will again be left as is, i.e. commented-out. With the switch
on, you will get:
/*nbif someswitch*/
// PART A
/*nbend*/
where the interior section is now active.
Intent of this preprocessor is to permit incompatible API changes to made in source
code, while creating a variant binary compatibility kit without the changes or with
more conservative changes. It should not be used as a general-purpose Java
preprocessor, we are not C++ programmers here!
author: Jaroslav Tulach, Jesse Glick |