Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.kie.workbench.common.services.datamodel.backend.server.builder.util;
 
Utilities for handling Java Annotations
 
 public class AnnotationUtils {

    
Retrieve the value of an Annotation's attribute

Parameters:
annotation
attributeName
Returns:
    public static String getAnnotationAttributeValuefinal Annotation annotation,
                                                      final String attributeName ) {
        String value = null;
        if ( annotation != null ) {
            try {
                value = annotation.annotationType().getMethodattributeName ).invokeannotation ).toString();
            } catch ( Exception ex ) {
                //Swallow
            }
        }
        return value;
    }
New to GrepCode? Check out our FAQ X