Package org.togglz.core.annotation

Examples of org.togglz.core.annotation.FeatureAttribute


    public static String[] getFeatureAttribute(Annotation annotation) {

        try {

            // only annotations which are annotated with @FeatureAttribute are interesting
            FeatureAttribute details = annotation.annotationType().getAnnotation(FeatureAttribute.class);
            if (details != null) {

                // this is the name of the feature attribute
                String attributeName = details.value();

                // find the method to invoke on the annotation to read the value of the feature attribute
                Method method = annotation.getClass().getMethod(details.annotationAttribute());
                if (method != null) {
                    String attributeValue = method.invoke(annotation).toString();
                    return new String[]{attributeName, attributeValue};
                }
View Full Code Here

TOP

Related Classes of org.togglz.core.annotation.FeatureAttribute

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.