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};
}