Package org.jboss.metatype.spi.values

Examples of org.jboss.metatype.spi.values.MetaMapper


         {
            log.debug("Failed to get value from mbean for: "+name, e);
         }

         PropertyInfo propertyInfo = beanInfo.getProperty(name);
         MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
         try
         {
            if(metaMapper != null)
            {
               mvalue = metaMapper.createMetaValue(property.getMetaType(), value);
            }
            else
            {
               mvalue = metaValueFactory.create(value, propertyInfo.getType());
            }
View Full Code Here


         // Unwrap the value before, so that we can recreate empty values
         Object plainValue = null;
         // Look for a MetaMapper
         MetaType propertyType = property.getMetaType();
         MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
         Type mappedType = null;
         if(metaMapper != null)
         {
            mappedType = metaMapper.mapToType();
            plainValue = metaMapper.unwrapMetaValue(value);
         }
         else
         {
            PropertyInfo propertyInfo = beanInfo.getProperty(name);
            plainValue = metaValueFactory.unwrap(value, propertyInfo.getType());
View Full Code Here

         MetaValue mvalue = null;
         if(value != null)
         {
            if(prop != null)
            {
               MetaMapper mapper = prop.getTransientAttachment(MetaMapper.class);
               if(mapper != null)
                  mvalue = mapper.createMetaValue(prop.getMetaType(), value);
               else
                  mvalue = create(value);
            }
            else
            {
View Full Code Here

      {
         ManagedProperty prop = AbstractRuntimeComponentDispatcher.getActiveProperty();
         Object uvalue = null;
         if(prop != null)
         {
            MetaMapper mapper = prop.getTransientAttachment(MetaMapper.class);
            if(mapper != null)
               uvalue = mapper.unwrapMetaValue(value);
            else
               uvalue = unwrap(value);
         }
         else
         {
View Full Code Here

         Object value = mbeanServer.invoke(new ObjectName(componentName.toString()), methodName, args, sig);
         MetaValue mvalue = null;
         if (value != null)
         {
            // Look for a return type MetaMapper
            MetaMapper returnTypeMapper = op.getTransientAttachment(MetaMapper.class);
            if (returnTypeMapper != null)
               mvalue = returnTypeMapper.createMetaValue(op.getReturnType(), value);
            else
               mvalue = create(value);
         }
         return mvalue;
      }
View Full Code Here

         MetaValue mvalue = null;
         if(value != null)
         {
            if(prop != null)
            {
               MetaMapper mapper = prop.getTransientAttachment(MetaMapper.class);
               if(mapper != null)
                  mvalue = mapper.createMetaValue(prop.getMetaType(), value);
               else
                  mvalue = create(value);                 
            }
            else
            {
View Full Code Here

      {
         ManagedProperty prop = AbstractRuntimeComponentDispatcher.getActiveProperty();
         Object uvalue = null;
         if(prop != null)
         {
            MetaMapper mapper = prop.getTransientAttachment(MetaMapper.class);
            if(mapper != null)
               uvalue = mapper.unwrapMetaValue(value);
            else
               uvalue = unwrap(value);
         }
         else
         {
View Full Code Here

         Object value = bus.invoke(componentName, methodName, args, sig);
         MetaValue mvalue = null;
         if (value != null)
         {
            // Look for a return type MetaMapper
            MetaMapper returnTypeMapper = op.getTransientAttachment(MetaMapper.class);
            if (returnTypeMapper != null)
               mvalue = returnTypeMapper.createMetaValue(op.getReturnType(), value);
            else
               mvalue = create(value);
         }
         return mvalue;
      }
View Full Code Here

      if (value == null)
         return null;

      MetaType propertyType = property.getMetaType();
      // Look for a MetaMapper
      MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
      if(metaMapper != null)
      {
         MetaValue mvalue = metaMapper.createMetaValue(propertyType, value);
         return mvalue;
      }

      // Otherwise use the MetaValueFactory
      if (AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE == propertyType)
View Full Code Here

   protected Object unwrapValue(BeanInfo beanInfo, ManagedProperty property, MetaValue value)
   {
      String name = getPropertyName(property);
      PropertyInfo propertyInfo = beanInfo.getProperty(name);
      // Look for a property MetaMapper
      MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
      if(metaMapper != null)
      {
         return metaMapper.unwrapMetaValue(value);
      }
      return metaValueFactory.unwrap(value, propertyInfo.getType());
   }
View Full Code Here

TOP

Related Classes of org.jboss.metatype.spi.values.MetaMapper

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.