Java Stream Close closeIncludeGuard(String name, PrintWriter writer)

Here you can find the source of closeIncludeGuard(String name, PrintWriter writer)

Description

Typical C include guard footer from fully qualified like Strings

License

LGPL

Parameter

Parameter Description
name The fully qualified name of the element to guard.
writer The PrintWriter to write in.

Declaration

public static void closeIncludeGuard(String name, PrintWriter writer) 

Method Source Code


//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();
    }
}

Related

  1. closeIgnoreIOEx(ByteArrayOutputStream baos)
  2. closeIgnoringException(final Closeable closeable)
  3. closeIgnoringExceptions(Closeable c)
  4. closeIgnoringExceptions(Closeable c)
  5. closeImage()
  6. closeInput(InputStream src)
  7. closeInputStream(DataInputStream di)
  8. closeInputStream(InputStream in)
  9. closeInputStream(InputStream inp)