Code example for Annotation

Methods: annotationType

0
        return (Integer) Utils.invoke(annotation, regexpMethod, 0);
    } 
 
    void addHook(Annotation annotation, Method method) {
        mObjectFactory.addClass(method.getDeclaringClass());
        if (annotation.annotationType().equals(Before.class)) {
            String[] tagExpressions = ((Before) annotation).value();
            int timeout = ((Before) annotation).timeout();
            mGlue.addBeforeHook(new JavaHookDefinition(method, tagExpressions, ((Before) annotation).order(), timeout, mObjectFactory));
        } else { 
            String[] tagExpressions = ((After) annotation).value();
            int timeout = ((After) annotation).timeout();
            mGlue.addAfterHook(new JavaHookDefinition(method, tagExpressions, ((After) annotation).order(), timeout, mObjectFactory));
        } 
    } 
}