當前位置: 首頁>>代碼示例>>Java>>正文


Java BeanEventPropertyGetter類代碼示例

本文整理匯總了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;
    }
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:20,代碼來源:MapNestedPropertyGetterMixedType.java

示例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"));
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:24,代碼來源:MapNestedPropertyGetterMixedType.java

示例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);
    }
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:19,代碼來源:BaseNestableEventUtil.java

示例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;
    }
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:24,代碼來源:MapNestedPropertyGetterMixedType.java

示例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);
    }
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:23,代碼來源:BaseNestableEventUtil.java

示例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;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:33,代碼來源:MapNestedPropertyGetterMixedType.java

示例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));
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:10,代碼來源:BaseNestableEventUtil.java

示例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;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:40,代碼來源:MapNestedPropertyGetterMixedType.java

示例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);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:4,代碼來源:EventTypeNestableGetterFactoryMap.java

示例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);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:4,代碼來源:EventTypeNestableGetterFactoryMap.java

示例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);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:5,代碼來源:EventTypeNestableGetterFactoryObjectArray.java

示例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);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:5,代碼來源:EventTypeNestableGetterFactoryObjectArray.java

示例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);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:4,代碼來源:EventTypeNestableGetterFactoryMap.java

示例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);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:4,代碼來源:EventTypeNestableGetterFactoryMap.java

示例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);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:5,代碼來源:EventTypeNestableGetterFactoryObjectArray.java


注:本文中的com.espertech.esper.event.bean.BeanEventPropertyGetter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。