arohner/clj-wallhack


A clojure library for bypassing java protected fields

Language: Clojure


Introduction

A library for bypassing private & protect fields & methods on java classes. Extracted from old contrib. Derived from work by hiredman.

Installation

[clj-wallhack "1.0.1"]

Usage

Getting a field

(wall.hack/field foo.bar :field obj)

This returns the private/protected field named "field", declared in class "foo.bar" on instance obj. obj is an instanceof (or descendant of) class foo.bar. field can be anything named (a string, symbol or keyword).

Calling a method

(wall.hack/method foo.bar :aMethodCall [Integer Double] obj 3 5.0)

This calls the private/protected method "aMethodCall" on obj. The method is declared in class foo.bar. obj is an instance of, or descendant of class foo.bar. the call takes a seq of classes that correspond to the method's signature, and an equal number of &rest arguments.

Pass nil instead of obj for static method calls.

Project Statistics

Sourcerank 4
Repository Size 110 KB
Stars 44
Forks 2
Watchers 5
Open issues 0
Dependencies 0
Contributors 3
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Allen Rohner Kevin Downey Tim McCormack

Packages Referencing this Repo

clj-wallhack:clj-wallhack
a library for bypassing private/protected fields and methods on Java classes
This package is no longer available on Maven
clj-wallhack
a library for bypassing private/protected fields and methods on Java classes
Latest release 1.0 - Updated - 44 stars

Something wrong with this page? Make a suggestion

Last synced: 2024-08-05 03:41:07 UTC

Login to resync this repository