Example #1
0
 public static Classification invokeClassificationCodeOf(Class<?> cdefType, Object code) {
   assertArgumentNotNull("cdefType", cdefType);
   assertArgumentNotNull("code", code);
   if (code == null || (code instanceof String && ((String) code).isEmpty())) {
     return null;
   }
   final BeanDesc beanDesc = BeanDescFactory.getBeanDesc(cdefType);
   final String methodName = "codeOf";
   final Method method;
   try {
     method = beanDesc.getMethod(methodName, new Class<?>[] {Object.class});
   } catch (BeanMethodNotFoundException e) {
     String msg =
         "Failed to get the method " + methodName + "() of the classification type: " + cdefType;
     throw new ClassificationCodeOfMethodNotFoundException(msg, e);
   }
   return (Classification) DfReflectionUtil.invokeStatic(method, new Object[] {code});
 }
Example #2
0
 /** <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4167874">このバグ< /a>に対する対応です。 */
 public static void disableURLCaches() {
   BeanDesc bd = BeanDescFactory.getBeanDesc(URLConnection.class);
   LdiFieldUtil.set(bd.getField("defaultUseCaches"), null, Boolean.FALSE);
 }