Package com.alibaba.toolkit.util.enumeration

Examples of com.alibaba.toolkit.util.enumeration.Enum$EnumType


            throws ResourceBundleCreateException {
        String id = (String) resourceNode.selectObject(ResourceBundleConstant.XPATH_RESOURCE_ID);

        // ���ָ����enum����, ���Դ�enumֵ��Ϊresource key.
        if (enumType != null) {
            Enum enumObj = Enum.getEnumByName(enumType, (String) id);

            if (enumObj == null) {
                throw new ResourceBundleCreateException(ResourceBundleConstant.RB_ENUM_ID_NOT_FOUND,
                                                        new Object[] {
                    id,
                    enumType.getName()
                }, null);
            }

            id = enumObj.toString();
        }

        Object value = null;
        String type = resourceNode.getName();
View Full Code Here


    protected void initResource(Node resourceNode, Class enumType) throws ResourceBundleCreateException {
        String id = (String) resourceNode.selectObject(ResourceBundleConstant.XPATH_RESOURCE_ID);

        // 如果指定了enum属性, 则以此enum值作为resource key.
        if (enumType != null) {
            Enum enumObj = Enum.getEnumByName(enumType, id);

            if (enumObj == null) {
                throw new ResourceBundleCreateException(ResourceBundleConstant.RB_ENUM_ID_NOT_FOUND, new Object[] { id,
                                                                                                                    enumType.getName() }, null);
            }

            id = enumObj.toString();
        }

        Object value = null;
        String type = resourceNode.getName();
View Full Code Here

            throws ResourceBundleCreateException {
        String id = (String) resourceNode.selectObject(ResourceBundleConstant.XPATH_RESOURCE_ID);

        // ���ָ����enum����, ���Դ�enumֵ��Ϊresource key.
        if (enumType != null) {
            Enum enumObj = Enum.getEnumByName(enumType, (String) id);

            if (enumObj == null) {
                throw new ResourceBundleCreateException(ResourceBundleConstant.RB_ENUM_ID_NOT_FOUND,
                                                        new Object[] {
                    id,
                    enumType.getName()
                }, null);
            }

            id = enumObj.toString();
        }

        Object value = null;
        String type = resourceNode.getName();
View Full Code Here

TOP

Related Classes of com.alibaba.toolkit.util.enumeration.Enum$EnumType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.