1 /*
2 * This file is part of Pease Plate Template Engine.
3 *
4 * Pease Plate Template Engine is free software: you can redistribute
5 * it and/or modify it under the terms of the GNU Lesser General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or any later version.
8 *
9 * Pease Plate Template Engine is distributed in the hope that it
10 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
11 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with Pease Plate Template Engine. If not, see
16 * <http://www.gnu.org/licenses/>.
17 *
18 * Copyright (c) 2008 Manfred HANTSCHEL
19 */
20 package org.peaseplate.internal.chunk;
21
22 import java.io.IOException;
23 import java.io.Writer;
24
25 import org.peaseplate.TemplateException;
26 import org.peaseplate.chunk.AbstractChunk;
27 import org.peaseplate.internal.BuildContext;
28 import org.peaseplate.locator.TemplateLocator;
29
30 public final class VoidChunk extends AbstractChunk {
31
32 public VoidChunk(TemplateLocator locator, int line, int column) {
33 super(locator, line, column);
34 }
35
36 /**
37 * @see org.peaseplate.chunk.Chunk#isVisible()
38 */
39 public boolean isVisible() {
40 return false;
41 }
42
43 /**
44 * @see org.peaseplate.chunk.Chunk#isEssential()
45 */
46 public boolean isEssential() {
47 return false;
48 }
49
50 /**
51 * @see org.peaseplate.chunk.Chunk#render(org.peaseplate.internal.BuildContext, java.io.Writer)
52 */
53 public void render(BuildContext context, Writer writer) throws TemplateException, IOException {
54 // intentionally left blank
55 }
56
57 /**
58 * @see java.lang.Object#toString()
59 */
60 @Override
61 public String toString() {
62 return "VoidChunk";
63 }
64
65 }