mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-21 02:35:53 +10:00
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@574 84d0f5b1-2673-498c-a247-62c4ff18d310
16 lines
415 B
Java
16 lines
415 B
Java
package com.profiler.util;
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
public class ReflectionUtils {
|
|
public static Field findField(Class targetClass, String fieldName) {
|
|
Field[] declaredFields = targetClass.getDeclaredFields();
|
|
for (Field f : declaredFields) {
|
|
if (f.getName().equals(fieldName)) {
|
|
return f;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|