public class ReflectionUtils extends Object
Constructor and Description |
---|
ReflectionUtils() |
Modifier and Type | Method and Description |
---|---|
static Method |
getGetter(Object o,
String fieldName)
Returns the method of a given object which is the getter-method of a given field
whose name is expected to be like getFieldname.
|
static Method |
getSetter(Object o,
String fieldName)
Returns the method of a given object which is the setter-method of a given field
whose name is expected to be like setFieldname.
|
public static Method getGetter(Object o, String fieldName)
o
- The object containing the getter-method.fieldName
- The field whose getter-method is desiredpublic static Method getSetter(Object o, String fieldName)
o
- The object containing the setter-method.fieldName
- The field whose setter-method is desiredCopyright © 2017. All rights reserved.