Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn wall-hack-method
- "params is a vector of class which correspond to the arguments to the method
- obj is nil for static methods, the instance object otherwise
- the method name is given as a symbol or a keyword (something Named)"
- [class-name name- params obj & args]
- (-> class-name (.getDeclaredMethod (name name-) (into-array Class params))
- (doto (.setAccessible true))
- (.invoke obj (into-array Object args))))
Add Comment
Please, Sign In to add comment