Skip to content

Instantly share code, notes, and snippets.

@groovy.transform.EqualsAndHashCode
class Relation {
def entityUUID
}
def rows = [
[entityUUID: "uuid 1"],
[entityUUID: "uuid 2"]
]
#!/bin/bash
find . -name '*' -type f -print0 | xargs --null grep -n "$1" --color=always
#!/usr/bin/env groovy
/*
* A very simple script to create a Builder from a Java source code file. The
* builder contains a method for each private field in a class and may be created
* on a subdirectory "builder" from the package of the class passed as parameter.
*
* It is a quick-and-dirty script; not expected to be a full parser.
*
* Accepts a file name and an optional "--create" param:
import java.util.concurrent.*
interface SingleResultCallback<T> {
void onResult(T result, MongoException m)
}
interface MongoFuture<T> extends java.util.concurrent.Future {
void register(SingleResultCallback s)
}
@will-lp
will-lp / gist:9386502
Last active August 29, 2015 13:57
Metaclass inheritance
class A {
def foo() { 'foo' }
}
class B extends A {
def bar() { 'bar' }
}
A.metaClass.foobar { 'foobar' }