public InterceptorMetadata<?> apply(InterceptorReference<?> from) { return InterceptorMetadataUtils.readMetadataForInterceptorClass(from); } });
public InterceptorMetadata<?> apply(ClassMetadata<?> from) { return InterceptorMetadataUtils.readMetadataForTargetClass(from); } });
public static InterceptorMetadata readMetadataForTargetClass(ClassMetadata<?> classMetadata) { return new SimpleInterceptorMetadata(ClassMetadataInterceptorReference.of(classMetadata), true, buildMethodMap(classMetadata, true)); }
LOG.warn(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "does not have a void return type"); LOG.warn(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "is defined on the target class and does not have 0 arguments"); LOG.warn(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "does not have exactly one parameter"); LOG.warn(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "its single argument is not a " + InvocationContext.class.getName()); LOG.warn(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "does not return a " + OBJECT_CLASS_NAME); LOG.debug(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "does not have exactly 1 parameter"); LOG.debug(getStandardIgnoredMessage(interceptionType, method.getJavaMethod()) + "does not have a " + InvocationContext.class.getName() + " parameter ");
if (isInterceptorMethod(interceptionType, method, forTargetClass))
public static InterceptorMetadata readMetadataForInterceptorClass(InterceptorReference<?> interceptorReference) { return new SimpleInterceptorMetadata(interceptorReference, false, buildMethodMap(interceptorReference.getClassMetadata(), false)); }
public InterceptorMethodHandler(Object targetInstance, ClassMetadata<?> targetClassMetadata, InterceptionModel<ClassMetadata<?>, ?> interceptionModel, InterceptorInstantiator<?,?> interceptorInstantiator, InvocationContextFactory invocationContextFactory ) { this.targetInstance = targetInstance; this.invocationContextFactory = invocationContextFactory; if (interceptionModel == null) { throw new IllegalArgumentException("Interception model must not be null"); } if (interceptorInstantiator == null) { throw new IllegalArgumentException("Interception handler factory must not be null"); } this.interceptionModel = interceptionModel; for (InterceptorMetadata interceptorMetadata : this.interceptionModel.getAllInterceptors()) { interceptorHandlerInstances.put(interceptorMetadata, interceptorInstantiator.createFor(interceptorMetadata.getInterceptorReference())); } targetClassInterceptorMetadata = InterceptorMetadataUtils.readMetadataForTargetClass(targetClassMetadata); }