|
JHotDraw 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.util.Methods
public class Methods
Methods contains convenience methods for method invocations using java.lang.reflect.
| Method Summary | |
|---|---|
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName)
Invokes the specified accessible parameterless method if it exists. |
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName,
boolean newValue)
Invokes the specified setter method if it exists. |
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class[] clazz,
java.lang.Object... newValue)
Invokes the specified setter method if it exists. |
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class clazz,
java.lang.Object newValue)
Invokes the specified setter method if it exists. |
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName,
float newValue)
Invokes the specified setter method if it exists. |
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName,
int newValue)
Invokes the specified method if it exists. |
static java.lang.Object |
invoke(java.lang.Object obj,
java.lang.String methodName,
java.lang.String stringParameter)
Invokes the specified accessible method with a string parameter if it exists. |
static boolean |
invokeGetter(java.lang.Object obj,
java.lang.String methodName,
boolean defaultValue)
Invokes the specified getter method if it exists. |
static int |
invokeGetter(java.lang.Object obj,
java.lang.String methodName,
int defaultValue)
Invokes the specified getter method if it exists. |
static long |
invokeGetter(java.lang.Object obj,
java.lang.String methodName,
long defaultValue)
Invokes the specified getter method if it exists. |
static java.lang.Object |
invokeGetter(java.lang.Object obj,
java.lang.String methodName,
java.lang.Object defaultValue)
Invokes the specified getter method if it exists. |
static void |
invokeIfExists(java.lang.Object obj,
java.lang.String methodName)
Invokes the specified setter method if it exists. |
static void |
invokeIfExists(java.lang.Object obj,
java.lang.String methodName,
boolean newValue)
Invokes the specified method if it exists. |
static void |
invokeIfExists(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class clazz,
java.lang.Object newValue)
Invokes the specified setter method if it exists. |
static void |
invokeIfExists(java.lang.Object obj,
java.lang.String methodName,
float newValue)
Invokes the specified setter method if it exists. |
static void |
invokeIfExistsWithEnum(java.lang.Object obj,
java.lang.String methodName,
java.lang.String enumClassName,
java.lang.String enumValueName)
Invokes the specified setter method if it exists. |
static java.lang.Object |
invokeStatic(java.lang.Class clazz,
java.lang.String methodName)
Invokes the specified accessible parameterless method if it exists. |
static java.lang.Object |
invokeStatic(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class[] types,
java.lang.Object[] values)
Invokes the specified parameterless method if it exists. |
static java.lang.Object |
invokeStatic(java.lang.String clazz,
java.lang.String methodName)
Invokes the specified accessible parameterless method if it exists. |
static java.lang.Object |
invokeStatic(java.lang.String clazz,
java.lang.String methodName,
java.lang.Class[] types,
java.lang.Object[] values)
Invokes the specified parameterless method if it exists. |
static java.lang.Object |
invokeStatic(java.lang.String clazz,
java.lang.String methodName,
java.lang.Class[] types,
java.lang.Object[] values,
java.lang.Object defaultValue)
Invokes the specified parameterless method if it exists. |
static boolean |
invokeStaticGetter(java.lang.Class clazz,
java.lang.String methodName,
boolean defaultValue)
Invokes the specified getter method if it exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName,
java.lang.String stringParameter)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.stringParameter - The String parameter
java.lang.NoSuchMethodException
public static java.lang.Object invokeStatic(java.lang.Class clazz,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
clazz - The class on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invokeStatic(java.lang.String clazz,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
clazz - The class on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invokeStatic(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class[] types,
java.lang.Object[] values)
throws java.lang.NoSuchMethodException
clazz - The class on which to invoke the method.methodName - The name of the method.types - The parameter types.values - The parameter values.
java.lang.NoSuchMethodException
public static java.lang.Object invokeStatic(java.lang.String clazz,
java.lang.String methodName,
java.lang.Class[] types,
java.lang.Object[] values)
throws java.lang.NoSuchMethodException
clazz - The class on which to invoke the method.methodName - The name of the method.types - The parameter types.values - The parameter values.
java.lang.NoSuchMethodException
public static java.lang.Object invokeStatic(java.lang.String clazz,
java.lang.String methodName,
java.lang.Class[] types,
java.lang.Object[] values,
java.lang.Object defaultValue)
clazz - The class on which to invoke the method.methodName - The name of the method.types - The parameter types.values - The parameter values.defaultValue - The default value.
public static int invokeGetter(java.lang.Object obj,
java.lang.String methodName,
int defaultValue)
obj - The object on which to invoke the method.methodName - The name of the method.defaultValue - This value is returned, if the method does not exist.
public static long invokeGetter(java.lang.Object obj,
java.lang.String methodName,
long defaultValue)
obj - The object on which to invoke the method.methodName - The name of the method.defaultValue - This value is returned, if the method does not exist.
public static boolean invokeGetter(java.lang.Object obj,
java.lang.String methodName,
boolean defaultValue)
obj - The object on which to invoke the method.methodName - The name of the method.defaultValue - This value is returned, if the method does not exist.
public static java.lang.Object invokeGetter(java.lang.Object obj,
java.lang.String methodName,
java.lang.Object defaultValue)
obj - The object on which to invoke the method.methodName - The name of the method.defaultValue - This value is returned, if the method does not exist.
public static boolean invokeStaticGetter(java.lang.Class clazz,
java.lang.String methodName,
boolean defaultValue)
clazz - The object on which to invoke the method.methodName - The name of the method.defaultValue - This value is returned, if the method does not exist.
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName,
boolean newValue)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName,
int newValue)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName,
float newValue)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class clazz,
java.lang.Object newValue)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static java.lang.Object invoke(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class[] clazz,
java.lang.Object... newValue)
throws java.lang.NoSuchMethodException
obj - The object on which to invoke the method.methodName - The name of the method.
java.lang.NoSuchMethodException
public static void invokeIfExists(java.lang.Object obj,
java.lang.String methodName)
obj - The object on which to invoke the method.methodName - The name of the method.
public static void invokeIfExists(java.lang.Object obj,
java.lang.String methodName,
float newValue)
obj - The object on which to invoke the method.methodName - The name of the method.
public static void invokeIfExists(java.lang.Object obj,
java.lang.String methodName,
boolean newValue)
obj - The object on which to invoke the method.methodName - The name of the method.
public static void invokeIfExists(java.lang.Object obj,
java.lang.String methodName,
java.lang.Class clazz,
java.lang.Object newValue)
obj - The object on which to invoke the method.methodName - The name of the method.
public static void invokeIfExistsWithEnum(java.lang.Object obj,
java.lang.String methodName,
java.lang.String enumClassName,
java.lang.String enumValueName)
obj - The object on which to invoke the method.methodName - The name of the method.
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||