Here you can find the source of closeIncludeGuard(String name, PrintWriter writer)
Parameter | Description |
---|---|
name | The fully qualified name of the element to guard. |
writer | The PrintWriter to write in. |
public static void closeIncludeGuard(String name, PrintWriter writer)
//package com.java2s; //License from project: LGPL import java.io.PrintWriter; public class Main { /**//from ww w.java 2 s .c om * Typical C include guard footer from fully qualified like Strings * @param name The fully qualified name of the element to guard. * @param writer The PrintWriter to write in. */ public static void closeIncludeGuard(String name, PrintWriter writer) { final String macroName = name.replace(".", "_").toUpperCase(); writer.println(); writer.println("#endif /* " + macroName + " */"); writer.println(); } }