Class BaseNativePropertyGetter

java.lang.Object
com.espertech.esper.common.internal.event.bean.getter.BaseNativePropertyGetter
All Implemented Interfaces:
EventPropertyGetter, EventPropertyValueGetter, EventPropertyGetterSPI, EventPropertyValueGetterForge
Direct Known Subclasses:
ArrayFieldPropertyGetter, ArrayMethodPropertyGetter, IterableFieldPropertyGetter, IterableMethodPropertyGetter, JsonGetterIndexedEntryPOJOProvided, JsonGetterIndexedProvidedBaseNative, JsonGetterNestedPOJOPropProvided, KeyedMapFieldPropertyGetter, KeyedMapMethodPropertyGetter, KeyedMethodPropertyGetter, ListFieldPropertyGetter, ListMethodPropertyGetter, MapArrayPOJOBeanEntryIndexedPropertyGetter, MapArrayPOJOEntryIndexedPropertyGetter, MapPOJOEntryPropertyGetter, NestedPropertyGetter, ObjectArrayArrayPOJOBeanEntryIndexedPropertyGetter, ObjectArrayArrayPOJOEntryIndexedPropertyGetter, ObjectArrayPOJOEntryPropertyGetter, ReflectionPropFieldGetter, ReflectionPropMethodGetter

public abstract class BaseNativePropertyGetter extends Object implements EventPropertyGetterSPI
Base getter for native fragments.
  • Field Details

    • returnType

      protected final EPTypeClass returnType
    • isFragmentable

      protected boolean isFragmentable
  • Constructor Details

  • Method Details

    • getTargetType

      public abstract EPTypeClass getTargetType()
    • getBeanPropType

      public EPTypeClass getBeanPropType()
    • toFragmentArray

      public static Object toFragmentArray(Object[] object, BeanEventType fragmentEventType, EventBeanTypedEventFactory eventBeanTypedEventFactory)
      NOTE: Code-generation-invoked method, method name and parameter order matters
      Parameters:
      object - array
      fragmentEventType - fragment type
      eventBeanTypedEventFactory - event adapters
      Returns:
      array
    • getFragmentDynamic

      public static Object getFragmentDynamic(Object object, EventBeanTypedEventFactory eventBeanTypedEventFactory, BeanEventTypeFactory beanEventTypeFactory)
      NOTE: Code-generation-invoked method, method name and parameter order matters Returns the fragment for dynamic properties.
      Parameters:
      object - to inspect
      eventBeanTypedEventFactory - factory for event beans and event types
      beanEventTypeFactory - bean factory
      Returns:
      fragment
    • toFragmentIterable

      public static Object toFragmentIterable(Object object, BeanEventType fragmentEventType, EventBeanTypedEventFactory eventBeanTypedEventFactory)
      NOTE: Code-generation-invoked method, method name and parameter order matters Returns the fragment for dynamic properties.
      Parameters:
      object - to inspect
      fragmentEventType - type
      eventBeanTypedEventFactory - factory for event beans and event types
      Returns:
      fragment
    • getFragment

      public final Object getFragment(EventBean eventBean)
      Description copied from interface: EventPropertyGetter
      Returns EventBean or array of EventBean for a property name or property expression.

      For use with properties whose value is itself an event or whose value can be represented as an event by the underlying event representation.

      The EventType of the EventBean instance(s) returned by this method can be determined by EventType.getFragmentType(String). Use EventPropertyDescriptor to obtain a list of properties that return fragments from an event type.

      Returns null if the property value is null or the property value cannot be represented as a fragment by the underlying representation.

      Specified by:
      getFragment in interface EventPropertyGetter
      Parameters:
      eventBean - is the event to get the fragment value of a property
      Returns:
      the value of a property as an EventBean or array of EventBean
    • getFragmentFromValue

      public Object getFragmentFromValue(Object valueReturnedByGet)
    • eventBeanFragmentCodegen

      public final CodegenExpression eventBeanFragmentCodegen(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
      Specified by:
      eventBeanFragmentCodegen in interface EventPropertyGetterSPI
    • underlyingFragmentCodegen

      public final CodegenExpression underlyingFragmentCodegen(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
      Specified by:
      underlyingFragmentCodegen in interface EventPropertyGetterSPI