diff --git a/examples/CallStaticMethods.java b/examples/CallStaticMethods.java index d9cb879..5b67668 100644 --- a/examples/CallStaticMethods.java +++ b/examples/CallStaticMethods.java @@ -25,6 +25,7 @@ public static void main(String[] args) { // call a void method ReflectionHelper.callStaticVoidMethod("printStuff", CallStaticMethods.class); // the ints default to Integer.class, so this requires a little more work +// as of f3336a1004584e8bf453f3b1d249703173b45d90 this is no longer nessassary! It will remain in the example though. int i = ReflectionHelper.callStaticIntMethod("addIntegers", CallStaticMethods.class, new Class[]{int.class, int.class}, new Object[]{4, 5}); System.out.println(i); // call a method with a return of an object diff --git a/examples/SetStaticFields.java b/examples/SetStaticFields.java index da25992..bd4964f 100644 --- a/examples/SetStaticFields.java +++ b/examples/SetStaticFields.java @@ -24,6 +24,7 @@ public static void main(String[] args) { print(anObject.s); // now lets set some new values, even though they are private +// this isn't a good example because we are in the same class, but it will work if they are private elsewhere. ReflectionHelper.setStaticObject("Hello CHANGED World", "text", SetStaticFields.class); ReflectionHelper.setStaticInt(5555, "integer", SetStaticFields.class); ReflectionHelper.setStaticObject(new AnObject("This is a changed object"), "anObject", SetStaticFields.class);