static {
   try {
     java.lang.reflect.Field f = (EntityList.class).getDeclaredFields()[1];
     f.setAccessible(true);
     classToStringMapping = (Map) (f.get(null));
   } catch (Exception ex) {
     System.out.println(ex);
   }
 }
 static {
   java.lang.reflect.Field[] fields =
       (java.lang.reflect.Field[])
           ArrayUtils.addAll(
               SpatialSearchRequestParams.class.getDeclaredFields(),
               SearchRequestParams.class.getDeclaredFields());
   for (java.lang.reflect.Field field : fields) {
     defaultParams.add(field.getName());
   }
 }
Exemple #3
0
 public static void setStatsMap(HashMap<String, TableStats> s) {
   try {
     java.lang.reflect.Field statsMapF = TableStats.class.getDeclaredField("statsMap");
     statsMapF.setAccessible(true);
     statsMapF.set(null, s);
   } catch (NoSuchFieldException e) {
     e.printStackTrace();
   } catch (SecurityException e) {
     e.printStackTrace();
   } catch (IllegalArgumentException e) {
     e.printStackTrace();
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   }
 }
Exemple #4
0
    public boolean follow(Object o, Class c, java.lang.reflect.Field f) {

      if (_reachableStoppers.contains(c)) return false;

      if (f != null && _reachableStoppers.contains(f.getType())) return false;

      return super.follow(o, c, f);
    }
Exemple #5
0
 public static UText forfield(Furnace fnd, final Object obj, String fn) {
   final java.lang.reflect.Field f;
   try {
     f = obj.getClass().getField(fn);
   } catch (NoSuchFieldException e) {
     throw (new RuntimeException(e));
   }
   if (f.getType() != String.class) throw (new RuntimeException("Not a string field: " + f));
   return (new UText(fnd) {
     public String text() {
       try {
         return ((String) f.get(obj));
       } catch (IllegalAccessException e) {
         throw (new RuntimeException(e));
       }
     }
   });
 }