UNPKG

node-web-mvc

Version:
30 lines (29 loc) 1.11 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Javascript_1 = __importDefault(require("../../interface/Javascript")); const Tracer_1 = __importDefault(require("../../servlets/annotations/annotation/Tracer")); class MethodInvocationProceedingJoinPoint { constructor(invocation, proxy) { this.methodInvocation = invocation; this.proxy = proxy; } getArgs() { return this.methodInvocation.getArguments(); } getThis() { return this.proxy; } getTarget() { return this.methodInvocation.getThis(); } getSignature() { const id = Tracer_1.default.getFullName(this.getTarget().constructor); const handler = this.methodInvocation.getMethod().handler; const parameters = Javascript_1.default.resolveParameters(handler); return `any ${id}.${handler.name}(${parameters.join(', ')})`; } } exports.default = MethodInvocationProceedingJoinPoint;