Package org.jboss.beans.info.plugins

Examples of org.jboss.beans.info.plugins.DefaultPropertyInfo


               AnnotationValue[][] paramAnnotations = new AnnotationValue[1][];
               setterAnnotations = getExpectedAnnotations(setter.getParameterAnnotations()[0]);
               paramAnnotations[0] = setterAnnotations.toArray(new AnnotationValue[setterAnnotations.size()]);
               setterInfo = new MethodInfoImpl(null, setter.getName(), PrimitiveInfo.VOID, new TypeInfo[] { type }, paramAnnotations, null, setter.getModifiers(), declaringType);
            }
            properties.put(lowerName, new DefaultPropertyInfo(lowerName, name, type, getterInfo, setterInfo, annotations));
         }
      }
      if (setters.isEmpty() == false)
      {
         for (Iterator<Map.Entry<String, List<Method>>> i = setters.entrySet().iterator(); i.hasNext();)
         {
            Map.Entry<String, List<Method>> entry = i.next();
            String name = entry.getKey();
            List<Method> setterList = entry.getValue();
            // TODO JBMICROCONT-125 Maybe should just create duplicate propertyInfo and let the configurator guess?
            if (setterList.size() == 1)
            {
               Method setter = setterList.get(0);
               Type pinfo = setter.getGenericParameterTypes()[0];
               TypeInfo type = factory.getTypeInfo(pinfo);
               String lowerName = getLowerPropertyName(name);
               Set<AnnotationValue> setterAnnotations = getExpectedAnnotations(setter.getAnnotations());
               AnnotationValue[] annotations = setterAnnotations.toArray(new AnnotationValue[setterAnnotations.size()]);
               ClassInfo declaringType = (ClassInfo) factory.getTypeInfo(setter.getDeclaringClass());
               AnnotationValue[][] paramAnnotations = new AnnotationValue[1][];
               setterAnnotations = getExpectedAnnotations(setter.getParameterAnnotations()[0]);
               paramAnnotations[0] = setterAnnotations.toArray(new AnnotationValue[setterAnnotations.size()]);
               MethodInfo setterInfo = new MethodInfoImpl(null, setter.getName(), PrimitiveInfo.VOID, new TypeInfo[] { type }, paramAnnotations, null, setter.getModifiers(), declaringType);
               properties.put(lowerName, new DefaultPropertyInfo(lowerName, name, type, null, setterInfo, annotations));
            }
         }
      }
      if (mode != BeanAccessMode.STANDARD)
      {
View Full Code Here


            String name = method.getName();
            ClassInfo declaringType = (ClassInfo) factory.getTypeInfo(method.getDeclaringClass());
            Set<AnnotationValue> getterAnnotations = getExpectedAnnotations(method.getAnnotations());
            AnnotationValue[] annotations = getterAnnotations.toArray(new AnnotationValue[getterAnnotations.size()]);
            MethodInfo getter = new MethodInfoImpl(null, name, returnType, new TypeInfo[0], new AnnotationValue[0][], null, method.getModifiers(), declaringType);
            properties.add(new DefaultPropertyInfo(name, name, returnType, getter, null, annotations));
         }
      }
      return properties;
   }
View Full Code Here

TOP

Related Classes of org.jboss.beans.info.plugins.DefaultPropertyInfo

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.