[jboss-cvs] jboss-seam/src/main/org/jboss/seam/util ...

Gavin King gavin.king at jboss.com
Wed Feb 14 00:46:29 EST 2007


  User: gavin   
  Date: 07/02/14 00:46:29

  Modified:    src/main/org/jboss/seam/util  Reflections.java
  Log:
  introduced meta-model for non-component objects
  
  Revision  Changes    Path
  1.18      +20 -1     jboss-seam/src/main/org/jboss/seam/util/Reflections.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Reflections.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/util/Reflections.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- Reflections.java	28 Jan 2007 21:42:34 -0000	1.17
  +++ Reflections.java	14 Feb 2007 05:46:29 -0000	1.18
  @@ -1,4 +1,4 @@
  -//$Id: Reflections.java,v 1.17 2007/01/28 21:42:34 gavin Exp $
  +//$Id: Reflections.java,v 1.18 2007/02/14 05:46:29 gavin Exp $
   package org.jboss.seam.util;
   
   import java.beans.Introspector;
  @@ -76,6 +76,25 @@
         }
      }
      
  +   public static Object getAndWrap(Field field, Object target)
  +   {
  +      try
  +      {
  +         return get(field, target);
  +      }
  +      catch (Exception e)
  +      {
  +         if (e instanceof RuntimeException)
  +         {
  +            throw (RuntimeException) e;
  +         }
  +         else
  +         {
  +            throw new IllegalArgumentException("exception setting: " + field.getName(), e);
  +         }
  +      }
  +   }
  +   
      public static void setAndWrap(Field field, Object target, Object value)
      {
         try
  
  
  



More information about the jboss-cvs-commits mailing list