Class ConverterBeanUtils


  • public final class ConverterBeanUtils
    extends java.lang.Object
    Convert wrapper to Jmeter CLasses utils.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getAlias​(java.lang.reflect.AccessibleObject accessibleObject)
      get Alias of field or Method.
      static <T extends java.lang.annotation.Annotation>
      T
      getAnnotation​(java.lang.reflect.AccessibleObject accessibleObject, java.lang.Class<T> annotation)
      is field/method will be converted as property.
      static java.util.List<java.lang.reflect.AccessibleObject> getAttributeOnly​(java.util.List<java.lang.reflect.AccessibleObject> accessibleObjects)
      filter Fields to be converted as attribute on XML.
      static java.lang.Object getEnumValue​(java.lang.Object object)
      get num value.
      static java.util.List<java.lang.reflect.Field> getFields​(java.lang.Object source)
      get All field on object, duplicate field on class and super class will get the field on class.
      static java.util.List<java.lang.reflect.Method> getMethods​(java.lang.Object source)
      get All Method to be considered as field an will be included in XML , duplicate method on class and super class will get the method on class.
      static java.lang.String getPropertyAlias​(java.lang.Object value, java.lang.Class<?> clazz)
      get Property Alias (intProp,stringProp,longProp ..
      static java.lang.Class<?> getPropertyType​(java.lang.reflect.AccessibleObject accessibleObject)
      get Property class type.
      static java.util.List<java.lang.Class<?>> getSuperClasses​(java.lang.Class<?> clazz)
      get super classes of class, include it self.
      static java.lang.Object getValue​(java.lang.reflect.AccessibleObject field, java.lang.Object source)
      get value of field or Method.
      static boolean isAtomic​(java.lang.reflect.AccessibleObject accessibleObject)
      is field is atomic.
      static boolean isAttribute​(java.lang.reflect.AccessibleObject accessibleObject)
      is field/method will be converted as attribute.
      static boolean isCollection​(java.lang.reflect.AccessibleObject field)
      is field/method will be converted as collection.
      static boolean isProperty​(java.lang.reflect.AccessibleObject accessibleObject)
      is field/method will be converted as property.
      static boolean shouldSkip​(java.lang.Object source, java.lang.reflect.AccessibleObject accessibleObject)
      Should skip field from XML conversion.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getMethods

        public static java.util.List<java.lang.reflect.Method> getMethods​(java.lang.Object source)
        get All Method to be considered as field an will be included in XML , duplicate method on class and super class will get the method on class. if method with the same name on sub class is not considered as field method on super -class will be hidden.
        Parameters:
        source - object to be parsed.
        Returns:
        list of methods.
      • getFields

        public static java.util.List<java.lang.reflect.Field> getFields​(java.lang.Object source)
        get All field on object, duplicate field on class and super class will get the field on class.
        Parameters:
        source - object to be parsed.
        Returns:
        list all field.
      • isProperty

        public static boolean isProperty​(java.lang.reflect.AccessibleObject accessibleObject)
        is field/method will be converted as property.
      • isAtomic

        public static boolean isAtomic​(java.lang.reflect.AccessibleObject accessibleObject)
        is field is atomic.
      • getAnnotation

        public static <T extends java.lang.annotation.Annotation> T getAnnotation​(java.lang.reflect.AccessibleObject accessibleObject,
                                                                                  java.lang.Class<T> annotation)
        is field/method will be converted as property.
      • getSuperClasses

        public static java.util.List<java.lang.Class<?>> getSuperClasses​(java.lang.Class<?> clazz)
        get super classes of class, include it self. Object is not included.
        Parameters:
        clazz - class input.
        Returns:
        list of super classes
      • isCollection

        public static boolean isCollection​(java.lang.reflect.AccessibleObject field)
        is field/method will be converted as collection.
      • getValue

        public static java.lang.Object getValue​(java.lang.reflect.AccessibleObject field,
                                                java.lang.Object source)
        get value of field or Method.
      • getAlias

        public static java.lang.String getAlias​(java.lang.reflect.AccessibleObject accessibleObject)
        get Alias of field or Method.
      • getPropertyType

        public static java.lang.Class<?> getPropertyType​(java.lang.reflect.AccessibleObject accessibleObject)
        get Property class type.
      • getPropertyAlias

        public static java.lang.String getPropertyAlias​(java.lang.Object value,
                                                        java.lang.Class<?> clazz)
        get Property Alias (intProp,stringProp,longProp .. ).
      • getEnumValue

        public static java.lang.Object getEnumValue​(java.lang.Object object)
        get num value. call value() method if present, else call toString.
      • shouldSkip

        public static boolean shouldSkip​(java.lang.Object source,
                                         java.lang.reflect.AccessibleObject accessibleObject)
        Should skip field from XML conversion.
      • getAttributeOnly

        public static java.util.List<java.lang.reflect.AccessibleObject> getAttributeOnly​(java.util.List<java.lang.reflect.AccessibleObject> accessibleObjects)
        filter Fields to be converted as attribute on XML.
      • isAttribute

        public static boolean isAttribute​(java.lang.reflect.AccessibleObject accessibleObject)
        is field/method will be converted as attribute.