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
Base getter for native fragments.
-
Field Summary
Fields inherited from interface com.espertech.esper.common.client.EventPropertyValueGetter
EPTYPE, EPTYPEARRAY
-
Constructor Summary
ConstructorDescriptionBaseNativePropertyGetter
(EventBeanTypedEventFactory eventBeanTypedEventFactory, BeanEventTypeFactory beanEventTypeFactory, EPTypeClass type) -
Method Summary
Modifier and TypeMethodDescriptionfinal CodegenExpression
eventBeanFragmentCodegen
(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) final Object
getFragment
(EventBean eventBean) 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.getFragmentFromValue
(Object valueReturnedByGet) abstract EPTypeClass
static Object
toFragmentArray
(Object[] object, BeanEventType fragmentEventType, EventBeanTypedEventFactory eventBeanTypedEventFactory) NOTE: Code-generation-invoked method, method name and parameter order mattersstatic 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.final CodegenExpression
underlyingFragmentCodegen
(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.espertech.esper.common.client.EventPropertyGetter
isExistsProperty
Methods inherited from interface com.espertech.esper.common.internal.event.core.EventPropertyGetterSPI
eventBeanExistsCodegen, underlyingExistsCodegen, underlyingGetCodegen
Methods inherited from interface com.espertech.esper.common.client.EventPropertyValueGetter
get
Methods inherited from interface com.espertech.esper.common.internal.event.core.EventPropertyValueGetterForge
eventBeanGetCodegen
-
Field Details
-
returnType
-
isFragmentable
protected boolean isFragmentable
-
-
Constructor Details
-
BaseNativePropertyGetter
public BaseNativePropertyGetter(EventBeanTypedEventFactory eventBeanTypedEventFactory, BeanEventTypeFactory beanEventTypeFactory, EPTypeClass type)
-
-
Method Details
-
getTargetType
-
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
- arrayfragmentEventType
- fragment typeeventBeanTypedEventFactory
- 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 inspecteventBeanTypedEventFactory
- factory for event beans and event typesbeanEventTypeFactory
- 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 inspectfragmentEventType
- typeeventBeanTypedEventFactory
- factory for event beans and event types- Returns:
- fragment
-
getFragment
Description copied from interface:EventPropertyGetter
ReturnsEventBean
or array ofEventBean
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 theEventBean
instance(s) returned by this method can be determined byEventType.getFragmentType(String)
. UseEventPropertyDescriptor
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 interfaceEventPropertyGetter
- 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
-
eventBeanFragmentCodegen
public final CodegenExpression eventBeanFragmentCodegen(CodegenExpression beanExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
eventBeanFragmentCodegen
in interfaceEventPropertyGetterSPI
-
underlyingFragmentCodegen
public final CodegenExpression underlyingFragmentCodegen(CodegenExpression underlyingExpression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) - Specified by:
underlyingFragmentCodegen
in interfaceEventPropertyGetterSPI
-