Wow... Kiyotaka Oku's fork of this shows how to do it in one line :-)
The other day, I saw Harold Cooper's One-line tree in Python via autovivication, and wondered if the same thing was possible in Groovy.
Wow... Kiyotaka Oku's fork of this shows how to do it in one line :-)
The other day, I saw Harold Cooper's One-line tree in Python via autovivication, and wondered if the same thing was possible in Groovy.
| import java.io.*; | |
| import javax.script.*; | |
| import org.python.core.PySystemState; | |
| import org.python.core.PyString; | |
| import org.python.util.PythonInterpreter; | |
| /** | |
| * This class executes the AsciiDoc python scripts (asciidoc.py and a2x.py) from | |
| * Java using the Jython interpreter. | |
| * |
| package net.deardeuff.roleobject; | |
| import com.google.common.base.Preconditions; | |
| /** | |
| * A Key based on a Class | |
| */ | |
| public final class ClassKey<T> implements View.Key<T> { | |
| private final Class<T> delegate; | |