Search in sources :

Example 1 with SenderMethodMetaInfo

use of act.mail.meta.SenderMethodMetaInfo in project actframework by actframework.

the class MailerEnhancer method visitMethod.

@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
    MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
    SenderMethodMetaInfo info = methodInfo(name, access);
    if (null == info) {
        return mv;
    }
    logger.debug(">>>About to enhance mailer method: %s", name);
    return new SenderEnhancer(mv, info, access, name, desc, signature, exceptions);
}
Also used : SenderMethodMetaInfo(act.mail.meta.SenderMethodMetaInfo) MethodVisitor(act.asm.MethodVisitor)

Example 2 with SenderMethodMetaInfo

use of act.mail.meta.SenderMethodMetaInfo in project actframework by actframework.

the class MailerEnhancer method methodInfo.

private SenderMethodMetaInfo methodInfo(String name, int access) {
    if (isPublic(access) && !isConstructor(name)) {
        MailerClassMetaInfo ccInfo = classInfoHolder.mailerClassMetaInfo(className);
        if (null == ccInfo) {
            return null;
        }
        SenderMethodMetaInfo info = ccInfo.sender(name);
        if (null != info) {
            return info;
        }
        return ccInfo.sender(name);
    } else {
        return null;
    }
}
Also used : SenderMethodMetaInfo(act.mail.meta.SenderMethodMetaInfo) MailerClassMetaInfo(act.mail.meta.MailerClassMetaInfo)

Aggregations

SenderMethodMetaInfo (act.mail.meta.SenderMethodMetaInfo)2 MethodVisitor (act.asm.MethodVisitor)1 MailerClassMetaInfo (act.mail.meta.MailerClassMetaInfo)1