public class MapNestedEntryPropertyGetterPropertyProvidedDynamic extends MapNestedEntryPropertyGetterBase
eventAdapterService, fragmentType, propertyMap
Constructor and Description |
---|
MapNestedEntryPropertyGetterPropertyProvidedDynamic(String propertyMap,
EventType fragmentType,
EventAdapterService eventAdapterService,
EventPropertyGetter nestedGetter) |
Modifier and Type | Method and Description |
---|---|
CodegenExpression |
codegenEventBeanExists(CodegenExpression beanExpression,
CodegenContext context) |
CodegenExpression |
codegenUnderlyingExists(CodegenExpression underlyingExpression,
CodegenContext context) |
Object |
handleNestedValue(Object value) |
CodegenExpression |
handleNestedValueCodegen(CodegenExpression valueExpression,
CodegenContext context) |
Object |
handleNestedValueFragment(Object value) |
CodegenExpression |
handleNestedValueFragmentCodegen(CodegenExpression name,
CodegenContext context) |
boolean |
isExistsProperty(EventBean eventBean)
Returns true if the property exists, or false if the type does not have such a property.
|
codegenEventBeanFragment, codegenEventBeanGet, codegenUnderlyingFragment, codegenUnderlyingGet, get, getFragment, getMap, isMapExistsProperty
public MapNestedEntryPropertyGetterPropertyProvidedDynamic(String propertyMap, EventType fragmentType, EventAdapterService eventAdapterService, EventPropertyGetter nestedGetter)
public boolean isExistsProperty(EventBean eventBean)
EventPropertyGetter
Useful for dynamic properties of the syntax "property?" and the dynamic nested/indexed/mapped versions. Dynamic nested properties follow the syntax "property?.nested" which is equivalent to "property?.nested?". If any of the properties in the path of a dynamic nested property return null, the dynamic nested property does not exists and the method returns false.
For non-dynamic properties, this method always returns true since a getter would not be available unless
isExistsProperty
in interface EventPropertyGetter
isExistsProperty
in class MapNestedEntryPropertyGetterBase
eventBean
- is the event to check if the dynamic property existspublic Object handleNestedValue(Object value)
handleNestedValue
in class MapNestedEntryPropertyGetterBase
public Object handleNestedValueFragment(Object value)
handleNestedValueFragment
in class MapNestedEntryPropertyGetterBase
public CodegenExpression handleNestedValueCodegen(CodegenExpression valueExpression, CodegenContext context)
handleNestedValueCodegen
in class MapNestedEntryPropertyGetterBase
public CodegenExpression handleNestedValueFragmentCodegen(CodegenExpression name, CodegenContext context)
handleNestedValueFragmentCodegen
in class MapNestedEntryPropertyGetterBase
public CodegenExpression codegenEventBeanExists(CodegenExpression beanExpression, CodegenContext context)
codegenEventBeanExists
in interface EventPropertyGetterSPI
codegenEventBeanExists
in class MapNestedEntryPropertyGetterBase
public CodegenExpression codegenUnderlyingExists(CodegenExpression underlyingExpression, CodegenContext context)
codegenUnderlyingExists
in interface EventPropertyGetterSPI
codegenUnderlyingExists
in class MapNestedEntryPropertyGetterBase