public abstract class BaseNativePropertyGetter extends Object implements EventPropertyGetterSPI
Constructor and Description |
---|
BaseNativePropertyGetter(EventAdapterService eventAdapterService,
Class returnType,
Class genericType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CodegenExpression |
eventBeanFragmentCodegen(CodegenExpression beanExpression,
CodegenContext context) |
abstract Class |
getBeanPropType() |
Object |
getFragment(EventBean eventBean)
|
static Object |
getFragmentDynamic(Object object,
EventAdapterService eventAdapterService)
NOTE: Code-generation-invoked method, method name and parameter order matters
Returns the fragment for dynamic properties.
|
abstract Class |
getTargetType() |
static Object |
toFragmentArray(Object[] object,
BeanEventType fragmentEventType,
EventAdapterService eventAdapterService)
NOTE: Code-generation-invoked method, method name and parameter order matters
|
static Object |
toFragmentIterable(Object object,
BeanEventType fragmentEventType,
EventAdapterService eventAdapterService)
NOTE: Code-generation-invoked method, method name and parameter order matters
Returns the fragment for dynamic properties.
|
CodegenExpression |
underlyingFragmentCodegen(CodegenExpression underlyingExpression,
CodegenContext context) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
eventBeanExistsCodegen, eventBeanGetCodegen, underlyingExistsCodegen, underlyingGetCodegen
get, isExistsProperty
public BaseNativePropertyGetter(EventAdapterService eventAdapterService, Class returnType, Class genericType)
eventAdapterService
- factory for event beans and event typesreturnType
- type of the entry returnedgenericType
- type generic parameter, if anypublic abstract Class getTargetType()
public abstract Class getBeanPropType()
public static Object toFragmentArray(Object[] object, BeanEventType fragmentEventType, EventAdapterService eventAdapterService)
object
- arrayfragmentEventType
- fragment typeeventAdapterService
- event adapterspublic static Object getFragmentDynamic(Object object, EventAdapterService eventAdapterService)
object
- to inspecteventAdapterService
- factory for event beans and event typespublic static Object toFragmentIterable(Object object, BeanEventType fragmentEventType, EventAdapterService eventAdapterService)
object
- to inspectfragmentEventType
- typeeventAdapterService
- factory for event beans and event typespublic Object getFragment(EventBean eventBean)
EventPropertyGetter
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.
getFragment
in interface EventPropertyGetter
eventBean
- is the event to get the fragment value of a propertypublic final CodegenExpression eventBeanFragmentCodegen(CodegenExpression beanExpression, CodegenContext context)
eventBeanFragmentCodegen
in interface EventPropertyGetterSPI
public final CodegenExpression underlyingFragmentCodegen(CodegenExpression underlyingExpression, CodegenContext context)
underlyingFragmentCodegen
in interface EventPropertyGetterSPI