Class DefaultBeanIntrospector

java.lang.Object
jadex.common.transformation.traverser.DefaultBeanIntrospector
All Implemented Interfaces:
IBeanIntrospector

public class DefaultBeanIntrospector extends Object implements IBeanIntrospector
Introspector for Java beans. It uses the reflection to build up a map with property infos (name, read/write method, etc.)
  • Field Details

  • Constructor Details

    • DefaultBeanIntrospector

      public DefaultBeanIntrospector()
      Create a new introspector.
    • DefaultBeanIntrospector

      public DefaultBeanIntrospector(int lrusize)
      Create a new introspector.
  • Method Details

    • getBeanConstructor

      public MethodHandle getBeanConstructor(Class<?> clazz, boolean includemethods, boolean includefields)
      Get the bean constructor for a specific clazz.
      Specified by:
      getBeanConstructor in interface IBeanIntrospector
    • getBeanProperties

      public Map<String,BeanProperty> getBeanProperties(Class<?> clazz, boolean includemethods, boolean includefields)
      Get the bean properties for a specific clazz.
      Specified by:
      getBeanProperties in interface IBeanIntrospector
      Parameters:
      clazz - The class to inspect.
      Returns:
      The map of properties (name -> BeanProperty).
    • getBeanClassInfo

      protected DefaultBeanIntrospector.BeanClassInfo getBeanClassInfo(Class<?> clazz, boolean includemethods, boolean includefields)
    • createBeanProperty

      protected BeanProperty createBeanProperty(String name, Class<?> type, Method getter, Method setter, Class<?> settertype, Type generictype)
      Creates a bean property based on getter/setter.
      Parameters:
      name - Property name
      type - Property type.
      getter - The getter method.
      setter - The setter method.
      settertype - The type used by the setter.
      Returns:
      The bean property.
    • createBeanProperty

      protected BeanProperty createBeanProperty(String name, Field field, boolean anonclass)
      Creates a bean property based on a field.
      Parameters:
      name - Property name
      field - The field.
      Returns:
      The bean property.