Skip to content

Instantly share code, notes, and snippets.

View davidecavestro's full-sized avatar

Davide Cavestro davidecavestro

View GitHub Profile
@mojavelinux
mojavelinux / AsciiDoc.java
Created March 3, 2012 00:10
Execute AsciiDoc from Java using the Jython Interpreter
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.
*
@grignaak
grignaak / ClassKey.java
Created November 22, 2011 05:40
An basic base implementation of the RoleObjectPattern
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;