Examples of BoundEnumOption


Examples of org.codehaus.preon.annotation.BoundEnumOption

            Field[] fields = enumType.getFields();
            for (Field field : fields) {
                if (field.isEnumConstant()) {
                    try {
                        field.setAccessible(true);
                        BoundEnumOption annotation = field
                                .getAnnotation(BoundEnumOption.class);
                        if (annotation == null) {
                            result.put(null, (T) field.get(null));
                        } else {
                            result.put(annotation.value(), (T) field.get(null));
                        }
                    }
                    catch (IllegalAccessException iae) {
                        iae.printStackTrace(); // Should never happen.
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.