01: package de.schlund.pfixcore.util;
02:
03: import java.lang.reflect.Field;
04: import java.lang.reflect.Modifier;
05:
06: /**
07: * Describe class FlyWeightChecker here.
08: *
09: *
10: * Created: Mon May 29 22:54:29 2006
11: *
12: * @author <a href="mailto:jtl@schlund.de">Jens Lautenbacher</a>
13: * @version 1.0
14: */
15: public class FlyWeightChecker {
16:
17: /**
18: * Creates a new <code>FlyWeightChecker</code> instance.
19: *
20: */
21: static public boolean check(Object obj) {
22: Field[] fields = obj.getClass().getDeclaredFields();
23: for (Field field : fields) {
24: int mod = field.getModifiers();
25: if (!Modifier.isStatic(mod) && !Modifier.isFinal(mod)) {
26: return false;
27: }
28: }
29: return true;
30: }
31: }
|