114 reputation
27
bio website dp4j.com
location Bolzano, Italy
age
visits member for 3 years, 7 months
seen Jul 30 '12 at 21:16

Author of dp4j.jar, which lets you test access private methods in Java without writing any reflection API code. The necessary reflection code is injected by dp4j at compile-time. So you only write:

@Test
public void aTest(){
  PrivateConstructor pc = new PrivateConstructor("Hello!");

Instead of:

import java.lang.reflect.*;

@Test
public void aTest() throws IllegalAccessException, NoSuchMethodException
, InvocationTargetException, InstantiationException {
    Constructor pcInit = PrivateConstructor.class.getDeclaredConstructor(String.class);
    pcInit.setAccessible(true);
    PrivateConstructor pc = (PrivateConstructor) pcInit.newInstance("Hello!");

Check it out at www.dp4j.com


Sep
24
awarded  Autobiographer
May
25
awarded  Notable Question
Dec
6
awarded  Notable Question
Mar
6
awarded  Popular Question
Dec
19
awarded  Popular Question
Jul
30
comment How to connect my macbook to a Wi-Fi network?
the Wi-Fi window reads no network selected (and also from Join other network...).
Jul
30
comment How to connect my macbook to a Wi-Fi network?
Didn't work either. It's a broadcasting network. Other macbooks find it.
Jul
30
asked How to connect my macbook to a Wi-Fi network?
Jul
14
awarded  Editor
Mar
4
answered How to show more fonts in Preview?
Mar
2
comment How to show more fonts in Preview?
I had looked there too: screencast.com/t/eQ3f0wUu
Mar
2
comment How to show more fonts in Preview?
huh? Where is that?
Mar
2
asked How to show more fonts in Preview?
Feb
20
asked How to restore Airport settings?
Feb
19
awarded  Supporter
Feb
19
awarded  Scholar
Feb
19
accepted Reinstall Office 2011 without dmg?
Feb
18
comment Reinstall Office 2011 without dmg?
Yes, on Time Machine
Feb
18
asked Reinstall Office 2011 without dmg?
Jan
18
comment How can I remove a portion of from the middle of a movie?
no i want to remove that portion