Package org.jboss.beans.metadata.plugins

Examples of org.jboss.beans.metadata.plugins.AbstractMapMetaData


   /** The interceptor */
   public static final MapEntryInterceptor INTERCEPTOR = new MapEntryInterceptor();

   public void add(Object parent, Object child, QName name)
   {
      AbstractMapMetaData map = (AbstractMapMetaData) parent;
      MapEntry entry = (MapEntry) child;
      AbstractValueMetaData entryKey = (AbstractValueMetaData) entry.key;
      if (entryKey == null)
         throw new IllegalArgumentException("No key in map entry");
      AbstractValueMetaData entryValue = (AbstractValueMetaData) entry.value;
      if (entryValue == null)
         throw new IllegalArgumentException("No value in map entry");
      map.put((MetaDataVisitorNode) entryKey.getValue(), (MetaDataVisitorNode) entryValue.getValue());
   }
View Full Code Here


      super(MapValue.class);
   }

   public ValueMetaData createValueMetaData(MapValue annotation)
   {
      AbstractMapMetaData map = new AbstractMapMetaData();
      if (isAttributePresent(annotation.clazz()))
         map.setType(annotation.clazz());
      if (isAttributePresent(annotation.keyClass()))
         map.setKeyType(annotation.keyClass());
      if (isAttributePresent(annotation.valueClass()))
         map.setValueType(annotation.valueClass());
      for(EntryValue entry : annotation.value())
      {
         map.put(createValueMetaData(entry.key()), createValueMetaData(entry.value()));
      }
      return map;
   }
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.plugins.AbstractMapMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.