Code example for Method

Methods: getAnnotation

0
    } 
 
    String getMessageTemplateKey(Class<?> beanClass) {
        try { 
            Method m = beanClass.getMethod(propertyName);
            MessageTemplateKey mtk = m.getAnnotation(MessageTemplateKey.class);
            if (mtk != null)
                return mtk.value();
 
            mtk = beanClass.getAnnotation(MessageTemplateKey.class);
            return mtk != null ? mtk.value() : null;
        } catch (Exception e) {
            throw new RuntimeException(e);
        } 
    } 
 
    public boolean isCascaded() { 
        return false; 
    } 
 
    public String getPropertyName() {