FileDocCategorySizeDatePackage
ConditionalCompile.javaAPI DocExample2533Sun Dec 14 22:47:40 GMT 2003oreilly.hcj.finalstory

ConditionalCompile

public class ConditionalCompile extends Object
Platform for syntax checking conditional compilation. Note that for the user to actually see the effect of conditional compilation, they would have to look at the actual class file generated for this class. I am merely using this class to check syntax for the book.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.3 $

Fields Summary
private static final Logger
LOGGER
Logger instance.
private static final boolean
doLogging
Logging selector.
Constructors Summary
Methods Summary
public voidprojectVariables()
__UNDOCUMENTED__

		if (DevelopmentMode.hcj_finalstory) {
			// ... do conditional code.
		}
	
public static voidsomeMethod()
Normal method.


	   	 
	    
		// Do some set up code. 
		LOGGER.debug("Set up complete, beginning phases.");
		// do first part. 
		LOGGER.debug("phase1 complete");
		// do second part. 
		LOGGER.debug("phase2 complete");
		// do third part. 
		LOGGER.debug("phase3 complete");
		// do finalization part. 
		LOGGER.debug("phase4 complete");
		// Operation Completed
		LOGGER.debug("All phases completed successfully");
	
public static voidsomeMethodBetter()
Normal method.

		// Do some set up code. 
		if (doLogging) {
			LOGGER.debug("Set up complete, beginning phases.");
		}

		// do first part. 
		if (doLogging) {
			LOGGER.debug("phase1 complete");
		}

		// do second part. 
		if (doLogging) {
			LOGGER.debug("phase2 complete");
		}

		// do third part. 
		if (doLogging) {
			LOGGER.debug("phase3 complete");
		}

		// do finalization part. 
		if (doLogging) {
			LOGGER.debug("phase4 complete");
		}

		// Operation Completed
		if (doLogging) {
			LOGGER.debug("All phases completed successfully");
		}