Refine search
public static MethodSignature of(AnnotatedMethod<?> method) { if (method instanceof EnhancedAnnotatedMethod<?, ?>) { return Reflections.<EnhancedAnnotatedMethod<?, ?>>cast(method).getSignature(); } return new MethodSignatureImpl(method); }
@Override public String toString() { return new StringBuffer().append("method ").append(getMethodName()).append(Arrays.toString(parameterTypes).replace('[', '(').replace(']', ')')).toString(); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (!interceptionModel.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method));
/** * Constructor * <p/> * Initializes the superclass with the built annotation map, sets the method * and declaring class abstraction and detects the actual type arguments * * @param method The underlying method * @param declaringClass The declaring class abstraction */ private EnhancedAnnotatedMethodImpl(AnnotatedMethod<X> annotatedMethod, Map<Class<? extends Annotation>, Annotation> annotationMap, Map<Class<? extends Annotation>, Annotation> declaredAnnotationMap, EnhancedAnnotatedType<X> declaringClass, ClassTransformer classTransformer) { super(annotatedMethod, annotationMap, declaredAnnotationMap, classTransformer, declaringClass); this.slim = annotatedMethod; ArrayList<EnhancedAnnotatedParameter<?, X>> parameters = new ArrayList<EnhancedAnnotatedParameter<?, X>>(annotatedMethod.getParameters().size()); validateParameterCount(annotatedMethod); for (AnnotatedParameter<X> annotatedParameter : annotatedMethod.getParameters()) { EnhancedAnnotatedParameter<?, X> parameter = EnhancedAnnotatedParameterImpl.of(annotatedParameter, this, classTransformer); parameters.add(parameter); } this.parameters = immutableListView(parameters); String propertyName = Reflections.getPropertyName(getDelegate()); if (propertyName == null) { this.propertyName = getName(); } else { this.propertyName = propertyName; } this.signature = new MethodSignatureImpl(this); }
Class<?> cls = getBeanType(); while (cls != null) { Set<BridgeMethod> declaredBridgeMethods = new HashSet<BridgeMethod>(); for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) { final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method); && !bridgeMethodsContainsMethod(processedBridgeMethods, methodSignature, method.getGenericReturnType(), Modifier.isAbstract(method.getModifiers()))) { try { final MethodInformation methodInfo = new RuntimeMethodInformation(method); createDelegateMethod(proxyClassType, method, methodInfo); MethodSignature signature = new MethodSignatureImpl(method); if (enhancedMethodSignatures.contains(signature) && !bridgeMethodsContainsMethod(processedBridgeMethods, signature, null, Modifier.isAbstract(method.getModifiers()))) { try { MethodInformation methodInfo = new RuntimeMethodInformation(method); if (interceptedMethodSignatures.contains(signature) && Reflections.isDefault(method)) { createDelegateMethod(proxyClassType, method, methodInfo); BeanLogger.LOG.addingMethodToProxy(method); } else { if (Reflections.isDefault(method)) { createDelegateMethod(proxyClassType, method, methodInfo); } else {
for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) { final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method); MethodSignature signature = new MethodSignatureImpl(method); if (interceptedMethodSignatures.contains(signature) && Reflections.isDefault(method)) {
public Set<MethodSignature> getLocalBusinessMethodSignatures() { Set<MethodSignature> businessMethodSignatures = new HashSet<MethodSignature>(); for (BusinessInterfaceDescriptor<?> businessInterfaceDescriptor : ejbDescriptor.getLocalBusinessInterfaces()) { for (Method m : businessInterfaceDescriptor.getInterface().getMethods()) { businessMethodSignatures.add(new MethodSignatureImpl(m)); } } return Collections.unmodifiableSet(businessMethodSignatures); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (!interceptionModel.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method));
/** * Constructor * <p/> * Initializes the superclass with the built annotation map, sets the method * and declaring class abstraction and detects the actual type arguments * * @param method The underlying method * @param declaringClass The declaring class abstraction */ private EnhancedAnnotatedMethodImpl(AnnotatedMethod<X> annotatedMethod, Map<Class<? extends Annotation>, Annotation> annotationMap, Map<Class<? extends Annotation>, Annotation> declaredAnnotationMap, EnhancedAnnotatedType<X> declaringClass, ClassTransformer classTransformer) { super(annotatedMethod, annotationMap, declaredAnnotationMap, classTransformer, declaringClass); this.slim = annotatedMethod; ArrayList<EnhancedAnnotatedParameter<?, X>> parameters = new ArrayList<EnhancedAnnotatedParameter<?, X>>(annotatedMethod.getParameters().size()); validateParameterCount(annotatedMethod); for (AnnotatedParameter<X> annotatedParameter : annotatedMethod.getParameters()) { EnhancedAnnotatedParameter<?, X> parameter = EnhancedAnnotatedParameterImpl.of(annotatedParameter, this, classTransformer); parameters.add(parameter); } this.parameters = immutableListView(parameters); String propertyName = Reflections.getPropertyName(getDelegate()); if (propertyName == null) { this.propertyName = getName(); } else { this.propertyName = propertyName; } this.signature = new MethodSignatureImpl(this); }
Class<?> cls = getBeanType(); while (cls != null) { Set<BridgeMethod> declaredBridgeMethods = new HashSet<BridgeMethod>(); for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) { final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method); && !bridgeMethodsContainsMethod(processedBridgeMethods, methodSignature, method.getGenericReturnType(), Modifier.isAbstract(method.getModifiers()))) { try { final MethodInformation methodInfo = new RuntimeMethodInformation(method); createDelegateMethod(proxyClassType, method, methodInfo); MethodSignature signature = new MethodSignatureImpl(method); if (enhancedMethodSignatures.contains(signature) && !bridgeMethodsContainsMethod(processedBridgeMethods, signature, null, Modifier.isAbstract(method.getModifiers()))) { try { MethodInformation methodInfo = new RuntimeMethodInformation(method); if (interceptedMethodSignatures.contains(signature) && Reflections.isDefault(method)) { createDelegateMethod(proxyClassType, method, methodInfo); BeanLogger.LOG.addingMethodToProxy(method); } else { if (Reflections.isDefault(method)) { createDelegateMethod(proxyClassType, method, methodInfo); } else {
for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) { final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method); MethodSignature signature = new MethodSignatureImpl(method); if (interceptedMethodSignatures.contains(signature) && Reflections.isDefault(method)) {
public Set<MethodSignature> getRemoteBusinessMethodSignatures() { Set<MethodSignature> businessMethodSignatures = new HashSet<MethodSignature>(); for (BusinessInterfaceDescriptor<?> businessInterfaceDescriptor : ejbDescriptor.getRemoteBusinessInterfaces()) { for (Method m : businessInterfaceDescriptor.getInterface().getMethods()) { businessMethodSignatures.add(new MethodSignatureImpl(m)); } } return Collections.unmodifiableSet(businessMethodSignatures); }
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, Bean<?> bean, BeanManagerImpl manager) { Set<InterceptionModel> models = getInterceptionModelsForType(type, manager, bean); Set<MethodSignature> enhancedMethodSignatures = new HashSet<MethodSignature>(); Set<MethodSignature> interceptedMethodSignatures = (models == null) ? enhancedMethodSignatures : new HashSet<MethodSignature>(); for (AnnotatedMethod<?> method : Beans.getInterceptableMethods(type)) { enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (models != null) { for (InterceptionModel model : models) { if (!model.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method)); break; } } } } Set<Type> types = null; if (bean == null) { types = Collections.<Type>singleton(type.getJavaClass()); } else { types = bean.getTypes(); } return new InterceptedSubclassFactory<T>(manager.getContextId(), type.getJavaClass(), types, bean, enhancedMethodSignatures, interceptedMethodSignatures).getProxyClass(); }
enhancedMethodSignatures.add(MethodSignatureImpl.of(method)); if (!interceptionModel.getInterceptors(InterceptionType.AROUND_INVOKE, method.getJavaMember()).isEmpty()) { interceptedMethodSignatures.add(MethodSignatureImpl.of(method));
/** * Constructor * <p/> * Initializes the superclass with the built annotation map, sets the method * and declaring class abstraction and detects the actual type arguments * * @param method The underlying method * @param declaringClass The declaring class abstraction */ private EnhancedAnnotatedMethodImpl(AnnotatedMethod<X> annotatedMethod, Map<Class<? extends Annotation>, Annotation> annotationMap, Map<Class<? extends Annotation>, Annotation> declaredAnnotationMap, EnhancedAnnotatedType<X> declaringClass, ClassTransformer classTransformer) { super(annotatedMethod, annotationMap, declaredAnnotationMap, classTransformer, declaringClass); this.slim = annotatedMethod; ArrayList<EnhancedAnnotatedParameter<?, X>> parameters = new ArrayList<EnhancedAnnotatedParameter<?, X>>(annotatedMethod.getParameters().size()); validateParameterCount(annotatedMethod); for (AnnotatedParameter<X> annotatedParameter : annotatedMethod.getParameters()) { EnhancedAnnotatedParameter<?, X> parameter = EnhancedAnnotatedParameterImpl.of(annotatedParameter, this, classTransformer); parameters.add(parameter); } this.parameters = immutableListView(parameters); String propertyName = Reflections.getPropertyName(getDelegate()); if (propertyName == null) { this.propertyName = getName(); } else { this.propertyName = propertyName; } this.signature = new MethodSignatureImpl(this); }
Class<?> cls = getBeanType(); while (cls != null) { Set<BridgeMethod> declaredBridgeMethods = new HashSet<BridgeMethod>(); for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) { final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method); && !bridgeMethodsContainsMethod(processedBridgeMethods, methodSignature, method.getGenericReturnType(), Modifier.isAbstract(method.getModifiers()))) { try { final MethodInformation methodInfo = new RuntimeMethodInformation(method); createDelegateMethod(proxyClassType, method, methodInfo); MethodSignature signature = new MethodSignatureImpl(method); if (enhancedMethodSignatures.contains(signature) && !bridgeMethodsContainsMethod(processedBridgeMethods, signature, null, Modifier.isAbstract(method.getModifiers()))) { try { MethodInformation methodInfo = new RuntimeMethodInformation(method); if (interceptedMethodSignatures.contains(signature) && Reflections.isDefault(method)) { createDelegateMethod(proxyClassType, method, methodInfo); BeanLogger.LOG.addingMethodToProxy(method); } else { if (Reflections.isDefault(method)) { createDelegateMethod(proxyClassType, method, methodInfo); } else {
public static MethodSignature of(AnnotatedMethod<?> method) { if (method instanceof EnhancedAnnotatedMethod<?, ?>) { return Reflections.<EnhancedAnnotatedMethod<?, ?>>cast(method).getSignature(); } return new MethodSignatureImpl(method); }
for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(cls))) { final MethodSignatureImpl methodSignature = new MethodSignatureImpl(method); MethodSignature signature = new MethodSignatureImpl(method); if (interceptedMethodSignatures.contains(signature) && Reflections.isDefault(method)) {