// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.lang.reflect.*;

public aspect HackImpl {
    declare parents: Dummy implements Hack;
    public void Hack.setV(int v) {
        try {
            Field field = getClass().getDeclaredField("v");
            field.setAccessible(true);
            field.setInt(this, v);
        } catch (NoSuchFieldException nsfe) {
            nsfe.printStackTrace();
        } catch (IllegalAccessException iae) {
            iae.printStackTrace();
        }
    }
}
