1 22 package org.jboss.mx.mxbean; 23 24 import javax.management.openmbean.CompositeType ; 25 26 import org.jboss.util.collection.WeakClassCache; 27 28 34 public class CompositeTypeMetaDataFactory extends WeakClassCache 35 { 36 37 private static final CompositeTypeMetaDataFactory SINGLETON = new CompositeTypeMetaDataFactory(); 38 39 45 public static CompositeType getCompositeType(Class <?> clazz) 46 { 47 CompositeTypeMetaData metaData = getCompositeTypeMetaData(clazz); 48 return metaData.getCompositeType(); 49 } 50 51 57 public static CompositeTypeMetaData getCompositeTypeMetaData(Class <?> clazz) 58 { 59 return (CompositeTypeMetaData) SINGLETON.get(clazz); 60 } 61 62 65 private CompositeTypeMetaDataFactory() 66 { 67 } 68 69 protected Object instantiate(Class clazz) 70 { 71 return new CompositeTypeMetaData(clazz); 72 } 73 74 protected void generate(Class clazz, Object object) 75 { 76 CompositeTypeMetaData metaData = (CompositeTypeMetaData) object; 77 metaData.generate(); 78 } 79 } 80 | Popular Tags |