|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpanmx.util.BeanUtil
public final class BeanUtil
Class with utility functions for working with beans. This class SHOULD NOT be used outside the PanMX package as it is likely to change without notice.
| Constructor Summary | |
|---|---|
BeanUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.reflect.Method |
getAccessor(java.lang.Class type,
java.lang.String name)
Return the accessor method for attribute with specified name. |
static java.lang.String |
getAttributeName(java.lang.reflect.Method method)
Return name of attribute assuming method is a mutator or accesor. |
static java.lang.reflect.Method |
getMutator(java.lang.Class type,
java.lang.String name,
java.lang.Class attributeType,
boolean mustBePublic)
Return the mutator method for attribute with specified name and type. |
static java.lang.String[] |
getSignature(java.lang.reflect.Method method)
Return the signature of method as an array of strings. |
static boolean |
isAccessor(java.lang.reflect.Method method)
Return true if method matches naming convention for accessor. |
static boolean |
isAttributeMethod(java.lang.reflect.Method method)
Return true if method is either an accessor or a mutator. |
static boolean |
isMutator(java.lang.reflect.Method method)
Return true if method matches naming convention for mutator. |
static java.lang.String |
makeFullyQualifiedName(java.lang.reflect.Method method)
Make a fully qualified method name for specified method. |
static java.lang.String |
makeFullyQualifiedName(java.lang.String actionName,
java.lang.String[] signature)
Make a fully qualified method name from specified parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanUtil()
| Method Detail |
|---|
public static boolean isAttributeMethod(java.lang.reflect.Method method)
method - the method.
public static boolean isAccessor(java.lang.reflect.Method method)
method - the method.
public static boolean isMutator(java.lang.reflect.Method method)
method - the method.
public static java.lang.String getAttributeName(java.lang.reflect.Method method)
method - the method.
public static java.lang.reflect.Method getAccessor(java.lang.Class type,
java.lang.String name)
throws javax.management.openmbean.OpenDataException
type - the type to retrieve method from.name - the name of the attribute.
javax.management.openmbean.OpenDataException - if unable to find accessor method.
public static java.lang.reflect.Method getMutator(java.lang.Class type,
java.lang.String name,
java.lang.Class attributeType,
boolean mustBePublic)
throws javax.management.openmbean.OpenDataException
type - the type to retrieve method from.name - the name of the attribute.attributeType - the attribute attributeType.
javax.management.openmbean.OpenDataException - if unable to find mutator method.public static java.lang.String[] getSignature(java.lang.reflect.Method method)
method - the method.
public static java.lang.String makeFullyQualifiedName(java.lang.reflect.Method method)
method - the method.
public static java.lang.String makeFullyQualifiedName(java.lang.String actionName,
java.lang.String[] signature)
actionName - the name of method.signature - the types of each parameter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||