Package org.jboss.beans.info.spi

Examples of org.jboss.beans.info.spi.PropertyInfo


         catch(Exception e)
         {
            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());
            }
         }
         catch(Exception e)
         {
            log.debug("Failed to get property value for bean: "+beanInfo.getName()
                  +", property: "+propertyInfo.getName(), e);
            mvalue = metaValueFactory.create(null, propertyInfo.getType());
            return mvalue;
         }
      }
      catch(InstanceNotFoundException e)
      {
View Full Code Here


            mappedType = metaMapper.mapToType();
            plainValue = metaMapper.unwrapMetaValue(value);
         }
         else
         {
            PropertyInfo propertyInfo = beanInfo.getProperty(name);
            plainValue = metaValueFactory.unwrap(value, propertyInfo.getType());
         }

         if (attributeValue == null)
         {
            String aname = mapAttributeName(md, name);
View Full Code Here

         {
            annotation = (ManagementProperty) reference.getAnnotations().get(ManagementProperty.class.getName());
         }
         else
         {
            PropertyInfo propertyInfo = reference.getField(Fields.PROPERTY_INFO, PropertyInfo.class);
            annotation = (ManagementProperty) propertyInfo.getAnnotation(ManagementProperty.class.getName());
         }
         if(isDebug() && annotation == null)
         {
            log.debug("@ManagedProperty not present: " + otherName);
            continue;
View Full Code Here

         return configurator.getClassInfo(type, cl);
      }
      // check properties
      KernelControllerContext context = visitor.getControllerContext();
      BeanInfo beanInfo = context.getBeanInfo();
      PropertyInfo pi = beanInfo.getProperty(getName());
      return applyCollectionOrMapCheck(pi.getType());
   }
View Full Code Here

    * @param metaData the property metadata
    * @throws Throwable for any error
    */
   public static void configure(boolean trace, Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
   {
      PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType());
      configure(trace, object, ainfo, cl, metaData);
   }
View Full Code Here

    * @throws Throwable for any error
    */
   public static void unconfigure(Object object, ClassLoader cl, BeanInfo info, PropertyMetaData metaData) throws Throwable
   {
      boolean trace = log.isTraceEnabled();
      PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType());
      unconfigure(trace, object, ainfo, metaData);
   }
View Full Code Here

         log.trace("Resolving property on bean info=" + info + " name=" + name);

      if (cl == null)
         cl = info.getClassInfo().getType().getClassLoader();

      PropertyInfo ainfo = info.getProperty(name);
      ClassInfo classInfo = info.getClassInfo();
      TypeInfoFactory tif = classInfo.getTypeInfoFactory();
      if (tif == null)
         throw new IllegalArgumentException("TypeInfoFactory is null: " + classInfo);

      // check for possible progression
      String[] typeNames = {type};
      TypeInfo[] typeInfos = {ainfo.getType()};
      if (equals(typeNames, typeInfos) || isAssignable(tif, cl, typeNames, typeInfos))
      {
         return ainfo;
      }
View Full Code Here

   {
      Set<AnnotationMetaData> propertyAnnotations = propertyMetaData.getAnnotations();
      if (propertyAnnotations == null || propertyAnnotations.size() == 0)
         return;

      PropertyInfo propertyInfo = beanInfo.getProperty(propertyMetaData.getName());
      // method annotations
      MethodInfo methodInfo = propertyInfo.getGetter();
      if (methodInfo != null)
         updateAnnotations(repository, classloader, mutable, context, methodInfo, propertyAnnotations, add);
      methodInfo = propertyInfo.getSetter();
      if (methodInfo != null)
         updateAnnotations(repository, classloader, mutable, context, methodInfo, propertyAnnotations, add);
      // field annotations
      FieldInfo fieldInfo = propertyInfo.getFieldInfo();
      if (fieldInfo != null)
         updateAnnotations(repository, classloader, mutable, context, fieldInfo, propertyAnnotations, add);
   }
View Full Code Here

   }

   public Object execute() throws Throwable
   {
      String name = property.getName();
      PropertyInfo propertyInfo = BeanInfoUtil.getPropertyInfo(beanInfo, target, name);
      TypeInfo propertyTypeInfo = propertyInfo.getType();
      TypeInfo typeInfo = propertyTypeInfo;
      if (typeInfo == null)
         typeInfo = getTypeInfo();

      if (nullify)
      {
         if (typeInfo != null)
         {
            if (typeInfo.isPrimitive() == false)
            {
               try
               {
                  if (propertyTypeInfo != null)
                     beanInfo.setProperty(target, name, null);
                  else // e.g. NestedPropertyInfo
                     nullifyByMatchingType(propertyInfo.getUpperName(), typeInfo);
               }
               catch (Throwable t)
               {
                  if (log.isTraceEnabled())
                     log.trace("Ignored for " + target + "." + name, t);
View Full Code Here

      {
         for (Map.Entry<String, ValueMetaData> entry : properties.entrySet())
         {
            String property = entry.getKey();
            ValueMetaData vmd = entry.getValue();
            PropertyInfo pi = info.getProperty(property);
            pi.set(result, vmd.getValue(pi.getType(), loader));
         }
      }
      invokeLifecycle("create", create, info, loader, result);
      invokeLifecycle("start", start, info, loader, result);
      return result;
View Full Code Here

TOP

Related Classes of org.jboss.beans.info.spi.PropertyInfo

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.