Package org.apache.commons.lang.enums

Examples of org.apache.commons.lang.enums.Enum


     */
    public void setAsText(String text) throws IllegalArgumentException {
        if (this.allowEmpty && !StringUtils.hasText(text)) {
            setValue(null);
        } else {
            Enum eNum = EnumUtils.getEnum(enumClass, text);
            if (eNum != null) {
                setValue(eNum);
            } else {
                throw new IllegalArgumentException("Invalid enum name: " + text);
            }
View Full Code Here


            if (Enum.class.isAssignableFrom(clazz)) {
                Iterator iter = EnumUtils.iterator(clazz);
                if (iter != null) {
                    apacheEnumDone = true;
                    while (iter.hasNext()) {
                        Enum element = (Enum) iter.next();
                        String stringValue = clazz.getName() + "." + element.getName();
                        generateItem(contentHandler, stringValue);
                    }
                }
            }
            // If it's not an apache enum or we didn't manage to read the enum list, then proceed with common method.
View Full Code Here

            if (Enum.class.isAssignableFrom(clazz)) {
                Iterator iter = EnumUtils.iterator(clazz);
                if (iter != null) {
                    apacheEnumDone = true;
                    while (iter.hasNext()) {
                        Enum element = (Enum) iter.next();
                        String stringValue = clazz.getName() + "." + element.getName();
                        generateItem(contentHandler, stringValue);
                    }
                }
            }
            // If it's not an apache enum or we didn't manage to read the enum list, then proceed with common method.
View Full Code Here

            if (Enum.class.isAssignableFrom(clazz)) {
                Iterator iter = EnumUtils.iterator(clazz);
                if (iter != null) {
                    apacheEnumDone = true;
                    while (iter.hasNext()) {
                        Enum element = (Enum) iter.next();
                        String stringValue = clazz.getName() + "." + element.getName();
                        generateItem(contentHandler, stringValue);
                    }
                }
            }
            // If it's not an apache enum or we didn't manage to read the enum list, then proceed with common method.
View Full Code Here

            if (Enum.class.isAssignableFrom(clazz)) {
                Iterator iter = EnumUtils.iterator(clazz);
                if (iter != null) {
                    apacheEnumDone = true;
                    while (iter.hasNext()) {
                        Enum element = (Enum) iter.next();
                        String stringValue = clazz.getName() + "." + element.getName();
                        generateItem(contentHandler, stringValue);
                    }
                }
            }
            // If it's not an apache enum or we didn't manage to read the enum list, then proceed with common method.
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.enums.Enum

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.