(original) (raw)

/* * This java source file is placed into the public domain. * * The orginal author is Ceki Gulcu, QOS.ch * * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN * THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, * ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE * USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ package box; /** * A no brainer implementation of Box returning a number. This * number is set at compilation time by Ant. * * @author Ceki Gülcü */ public class BoxImpl implements Box { /** * Create an instance of BoxImpl and print it. */ static public void main(String[] args) { Box box = new BoxImpl(); System.out.println("BoxImpl version is "+box.get()); } /** * The appropriate Ant task replaces @V@ with an integer constant. */ public int get() { return @V@; } /** * Print this instance as a string. */ public void doOp() { System.out.println(this); } /** * Returns this instance's string representation. */ public String toString() { return "BoxImpl("+get()+")"; } }