23 * questions. 24 */ 25 package java.beans; 26 27 import java.lang.reflect.AccessibleObject; 28 import java.lang.reflect.Array; 29 import java.lang.reflect.Constructor; 30 import java.lang.reflect.InvocationTargetException; 31 import java.lang.reflect.Method; 32 import java.security.AccessControlContext; 33 import java.security.AccessController; 34 import java.security.PrivilegedActionException; 35 import java.security.PrivilegedExceptionAction; 36 37 import com.sun.beans.finder.ClassFinder; 38 import com.sun.beans.finder.ConstructorFinder; 39 import com.sun.beans.finder.MethodFinder; 40 import sun.reflect.misc.MethodUtil; 41 42 /** 43 * A <code>Statement</code> object represents a primitive statement 44 * in which a single method is applied to a target and 45 * a set of arguments - as in <code>"a.setFoo(b)"</code>. 46 * Note that where this example uses names 47 * to denote the target and its argument, a statement 48 * object does not require a name space and is constructed with 49 * the values themselves. 50 * The statement object associates the named method 51 * with its environment as a simple set of values: 52 * the target and an array of argument values. 53 * 54 * @since 1.4 55 * 56 * @author Philip Milne 57 */ 58 public class Statement { 59 60 private static Object[] emptyArray = new Object[]{}; 61 62 static ExceptionListener defaultExceptionListener = new ExceptionListener() { 63 public void exceptionThrown(Exception e) { 64 System.err.println(e); 65 // e.printStackTrace(); | 23 * questions. 24 */ 25 package java.beans; 26 27 import java.lang.reflect.AccessibleObject; 28 import java.lang.reflect.Array; 29 import java.lang.reflect.Constructor; 30 import java.lang.reflect.InvocationTargetException; 31 import java.lang.reflect.Method; 32 import java.security.AccessControlContext; 33 import java.security.AccessController; 34 import java.security.PrivilegedActionException; 35 import java.security.PrivilegedExceptionAction; 36 37 import com.sun.beans.finder.ClassFinder; 38 import com.sun.beans.finder.ConstructorFinder; 39 import com.sun.beans.finder.MethodFinder; 40 import sun.reflect.misc.MethodUtil; 41 42 /** 43 * A {@code Statement} object represents a primitive statement 44 * in which a single method is applied to a target and 45 * a set of arguments - as in {@code "a.setFoo(b)"}. 46 * Note that where this example uses names 47 * to denote the target and its argument, a statement 48 * object does not require a name space and is constructed with 49 * the values themselves. 50 * The statement object associates the named method 51 * with its environment as a simple set of values: 52 * the target and an array of argument values. 53 * 54 * @since 1.4 55 * 56 * @author Philip Milne 57 */ 58 public class Statement { 59 60 private static Object[] emptyArray = new Object[]{}; 61 62 static ExceptionListener defaultExceptionListener = new ExceptionListener() { 63 public void exceptionThrown(Exception e) { 64 System.err.println(e); 65 // e.printStackTrace(); |