one file template implementation of java