1 29 30 package com.caucho.jmx; 31 32 import javax.management.ObjectName ; 33 import java.lang.reflect.Method ; 34 35 38 class UnmarshallMBean extends Unmarshall { 39 private final Method _method; 40 41 protected UnmarshallMBean(Method method) 42 { 43 _method = method; 44 } 45 46 49 Object unmarshall(Object value) 50 { 51 if (value == null) 52 return value; 53 54 try { 55 return (ObjectName ) _method.invoke(value, (Object []) null); 56 } catch (RuntimeException e) { 57 throw e; 58 } catch (Exception e) { 59 throw new RuntimeException (e); 60 } 61 } 62 } 63 | Popular Tags |