本文整理匯總了Java中com.espertech.esper.event.bean.BeanEventPropertyGetter類的典型用法代碼示例。如果您正苦於以下問題:Java BeanEventPropertyGetter類的具體用法?Java BeanEventPropertyGetter怎麽用?Java BeanEventPropertyGetter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BeanEventPropertyGetter類屬於com.espertech.esper.event.bean包,在下文中一共展示了BeanEventPropertyGetter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleGetterTrailingChain
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
private Object handleGetterTrailingChain(Object result) {
for (int i = 1; i < getterChain.length; i++) {
if (result == null) {
return null;
}
EventPropertyGetter getter = getterChain[i];
if (result instanceof EventBean) {
result = getter.get((EventBean) result);
} else if (getter instanceof BeanEventPropertyGetter) {
result = ((BeanEventPropertyGetter) getter).getBeanProp(result);
} else if (result instanceof Map && getter instanceof MapEventPropertyGetter) {
result = ((MapEventPropertyGetter) getter).getMap((Map) result);
} else {
return null;
}
}
return result;
}
示例2: handleGetterTrailingChainCodegen
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
private CodegenMethodNode handleGetterTrailingChainCodegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {
CodegenBlock block = codegenMethodScope.makeChild(Object.class, this.getClass(), codegenClassScope).addParam(Object.class, "result").getBlock();
for (int i = 1; i < getterChain.length; i++) {
block.ifRefNullReturnNull("result");
EventPropertyGetterSPI getter = getterChain[i];
CodegenBlock blockBean = block.ifInstanceOf("result", EventBean.class);
blockBean.assignRef("result", getter.eventBeanGetCodegen(cast(EventBean.class, ref("result")), codegenMethodScope, codegenClassScope));
if (getter instanceof BeanEventPropertyGetter) {
Class type = ((BeanEventPropertyGetter) getter).getTargetType();
blockBean.ifElse()
.assignRef("result", getter.underlyingGetCodegen(cast(type, ref("result")), codegenMethodScope, codegenClassScope))
.blockEnd();
} else if (getter instanceof MapEventPropertyGetter) {
blockBean.ifElse()
.ifRefNotTypeReturnConst("result", Map.class, null)
.assignRef("result", getter.underlyingGetCodegen(cast(Map.class, ref("result")), codegenMethodScope, codegenClassScope))
.blockEnd();
} else {
blockBean.ifElse().blockReturn(constantNull());
}
}
return block.methodReturn(ref("result"));
}
示例3: getBeanArrayValue
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public static Object getBeanArrayValue(BeanEventPropertyGetter nestedGetter, Object value, int index) {
if (value == null) {
return null;
}
if (!value.getClass().isArray()) {
return null;
}
if (Array.getLength(value) <= index) {
return null;
}
Object arrayItem = Array.get(value, index);
if (arrayItem == null) {
return null;
}
return nestedGetter.getBeanProp(arrayItem);
}
示例4: handleGetterTrailingChain
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
private Object handleGetterTrailingChain(Object result) {
for (int i = 1; i < getterChain.length; i++)
{
if (result == null) {
return null;
}
EventPropertyGetter getter = getterChain[i];
if (result instanceof EventBean) {
result = getter.get((EventBean) result);
}
else if (getter instanceof BeanEventPropertyGetter) {
result = ((BeanEventPropertyGetter) getter).getBeanProp(result);
}
else if (result instanceof Map && getter instanceof MapEventPropertyGetter) {
result = ((MapEventPropertyGetter) getter).getMap((Map)result);
}
else {
return null;
}
}
return result;
}
示例5: getBeanArrayValue
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public static Object getBeanArrayValue(BeanEventPropertyGetter nestedGetter, Object value, int index) {
if (value == null)
{
return null;
}
if (!value.getClass().isArray())
{
return null;
}
if (Array.getLength(value) <= index)
{
return null;
}
Object arrayItem = Array.get(value, index);
if (arrayItem == null)
{
return null;
}
return nestedGetter.getBeanProp(arrayItem);
}
示例6: handleIsExistsTrailingChain
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
private boolean handleIsExistsTrailingChain(Object result) {
for (int i = 1; i < getterChain.length; i++) {
if (result == null) {
return false;
}
EventPropertyGetter getter = getterChain[i];
if (i == getterChain.length - 1) {
if (getter instanceof BeanEventPropertyGetter) {
return ((BeanEventPropertyGetter) getter).isBeanExistsProperty(result);
} else if (result instanceof Map && getter instanceof MapEventPropertyGetter) {
return ((MapEventPropertyGetter) getter).isMapExistsProperty((Map) result);
} else if (result instanceof EventBean) {
return getter.isExistsProperty((EventBean) result);
} else {
return false;
}
}
if (getter instanceof BeanEventPropertyGetter) {
result = ((BeanEventPropertyGetter) getter).getBeanProp(result);
} else if (result instanceof Map && getter instanceof MapEventPropertyGetter) {
result = ((MapEventPropertyGetter) getter).getMap((Map) result);
} else if (result instanceof EventBean) {
result = getter.get((EventBean) result);
} else {
return false;
}
}
return false;
}
示例7: getBeanArrayValueCodegen
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public static CodegenMethodNode getBeanArrayValueCodegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope, BeanEventPropertyGetter nestedGetter, int index) {
return codegenMethodScope.makeChild(Object.class, BaseNestableEventUtil.class, codegenClassScope).addParam(Object.class, "value").getBlock()
.ifRefNullReturnNull("value")
.ifConditionReturnConst(not(exprDotMethodChain(ref("value")).add("getClass").add("isArray")), null)
.ifConditionReturnConst(relational(staticMethod(Array.class, "getLength", ref("value")), LE, constant(index)), null)
.declareVar(Object.class, "arrayItem", staticMethod(Array.class, "get", ref("value"), constant(index)))
.ifRefNullReturnNull("arrayItem")
.methodReturn(nestedGetter.underlyingGetCodegen(cast(nestedGetter.getTargetType(), ref("arrayItem")), codegenMethodScope, codegenClassScope));
}
示例8: handleIsExistsTrailingChain
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
private boolean handleIsExistsTrailingChain(Object result) {
for (int i = 1; i < getterChain.length; i++)
{
if (result == null) {
return false;
}
EventPropertyGetter getter = getterChain[i];
if (i == getterChain.length - 1) {
if (getter instanceof BeanEventPropertyGetter) {
return ((BeanEventPropertyGetter) getter).isBeanExistsProperty(result);
}
else if (result instanceof Map && getter instanceof MapEventPropertyGetter) {
return ((MapEventPropertyGetter) getter).isMapExistsProperty((Map)result);
}
else if (result instanceof EventBean) {
return getter.isExistsProperty((EventBean) result);
}
else {
return false;
}
}
if (getter instanceof BeanEventPropertyGetter) {
result = ((BeanEventPropertyGetter) getter).getBeanProp(result);
}
else if (result instanceof Map && getter instanceof MapEventPropertyGetter) {
result = ((MapEventPropertyGetter) getter).getMap((Map)result);
}
else if (result instanceof EventBean) {
result = getter.get((EventBean) result);
}
else {
return false;
}
}
return false;
}
示例9: getGetterIndexedEntryPOJO
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetterSPI getGetterIndexedEntryPOJO(String propertyNameAtomic, int index, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class propertyTypeGetter) {
return new MapArrayPOJOBeanEntryIndexedPropertyGetter(propertyNameAtomic, index, nestedGetter, eventAdapterService, propertyTypeGetter);
}
示例10: getGetterNestedPOJOProp
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetterSPI getGetterNestedPOJOProp(String propertyName, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class nestedReturnType, Class nestedComponentType) {
return new MapPOJOEntryPropertyGetter(propertyName, nestedGetter, eventAdapterService, nestedReturnType, nestedComponentType);
}
示例11: getGetterIndexedEntryPOJO
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetterSPI getGetterIndexedEntryPOJO(String propertyNameAtomic, int index, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class propertyTypeGetter) {
int propertyIndex = getAssertIndex(propertyNameAtomic);
return new ObjectArrayArrayPOJOBeanEntryIndexedPropertyGetter(propertyIndex, index, nestedGetter, eventAdapterService, propertyTypeGetter);
}
示例12: getGetterNestedPOJOProp
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetterSPI getGetterNestedPOJOProp(String propertyName, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class nestedReturnType, Class nestedComponentType) {
int index = getAssertIndex(propertyName);
return new ObjectArrayPOJOEntryPropertyGetter(index, nestedGetter, eventAdapterService, nestedReturnType, nestedComponentType);
}
示例13: getGetterIndexedEntryPOJO
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetter getGetterIndexedEntryPOJO(String propertyNameAtomic, int index, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class propertyTypeGetter) {
return new MapArrayPOJOBeanEntryIndexedPropertyGetter(propertyNameAtomic, index, nestedGetter, eventAdapterService, propertyTypeGetter);
}
示例14: getGetterNestedPOJOProp
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetter getGetterNestedPOJOProp(String propertyName, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class nestedReturnType) {
return new MapPOJOEntryPropertyGetter(propertyName, nestedGetter, eventAdapterService, nestedReturnType);
}
示例15: getGetterIndexedEntryPOJO
import com.espertech.esper.event.bean.BeanEventPropertyGetter; //導入依賴的package包/類
public EventPropertyGetter getGetterIndexedEntryPOJO(String propertyNameAtomic, int index, BeanEventPropertyGetter nestedGetter, EventAdapterService eventAdapterService, Class propertyTypeGetter) {
int propertyIndex = getAssertIndex(propertyNameAtomic);
return new ObjectArrayArrayPOJOBeanEntryIndexedPropertyGetter(propertyIndex, index, nestedGetter, eventAdapterService, propertyTypeGetter);
}