private boolean isInterceptionCandidate() { return !isInterceptor() && !isDecorator() && !Modifier.isAbstract(getType().getJavaClass().getModifiers()); }
private void replaceAnnotatedType(AnnotatedType<X> type) { if (!this.originalAnnotatedType.getJavaClass().equals(type.getJavaClass())) { throw BootstrapLogger.LOG.annotatedTypeJavaClassMismatch(this.annotatedType.getJavaClass(), type.getJavaClass()); } AnnotatedTypeValidator.validateAnnotatedType(type); this.annotatedType = type; }
private void replaceAnnotatedType(AnnotatedType<X> type) { if (!this.originalAnnotatedType.getJavaClass().equals(type.getJavaClass())) { throw BootstrapLogger.LOG.annotatedTypeJavaClassMismatch(this.annotatedType.getJavaClass(), type.getJavaClass()); } AnnotatedTypeValidator.validateAnnotatedType(type); this.annotatedType = type; }
private void replaceAnnotatedType(AnnotatedType<X> type) { if (!this.originalAnnotatedType.getJavaClass().equals(type.getJavaClass())) { throw BootstrapLogger.LOG.annotatedTypeJavaClassMismatch(this.annotatedType.getJavaClass(), type.getJavaClass()); } AnnotatedTypeValidator.validateAnnotatedType(type); this.annotatedType = type; }
private void replaceAnnotatedType(AnnotatedType<X> type) { if (!this.originalAnnotatedType.getJavaClass().equals(type.getJavaClass())) { throw BootstrapLogger.LOG.annotatedTypeJavaClassMismatch(this.annotatedType.getJavaClass(), type.getJavaClass()); } AnnotatedTypeValidator.validateAnnotatedType(type); this.annotatedType = type; }
public static ProcessAnnotatedTypeEventResolvable forProcessSyntheticAnnotatedType(SlimAnnotatedType<?> annotatedType, RequiredAnnotationDiscovery discovery) { ParameterizedType type1 = new ParameterizedTypeImpl(ProcessAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); ParameterizedType type2 = new ParameterizedTypeImpl(ProcessSyntheticAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); return new ProcessAnnotatedTypeEventResolvable(Sets.<Type> newHashSet(Object.class, type1, type2), annotatedType, discovery); }
@Override protected void preSpecialize() { super.preSpecialize(); Class<?> superclass = getAnnotated().getJavaClass().getSuperclass(); if (superclass == null || superclass.equals(Object.class)) { throw BeanLogger.LOG.specializingBeanMustExtendABean(this); } }
public static ProcessAnnotatedTypeEventResolvable forProcessSyntheticAnnotatedType(SlimAnnotatedType<?> annotatedType, RequiredAnnotationDiscovery discovery) { ParameterizedType type1 = new ParameterizedTypeImpl(ProcessAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); ParameterizedType type2 = new ParameterizedTypeImpl(ProcessSyntheticAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); return new ProcessAnnotatedTypeEventResolvable(Sets.<Type> newHashSet(Object.class, type1, type2), annotatedType, discovery); }
@Override protected void preSpecialize() { super.preSpecialize(); Class<?> superclass = getAnnotated().getJavaClass().getSuperclass(); if (superclass == null || superclass.equals(Object.class)) { throw BeanLogger.LOG.specializingBeanMustExtendABean(this); } }
@Override protected void preSpecialize() { super.preSpecialize(); Class<?> superclass = getAnnotated().getJavaClass().getSuperclass(); if (superclass == null || superclass.equals(Object.class)) { throw BeanLogger.LOG.specializingBeanMustExtendABean(this); } }
public static ProcessAnnotatedTypeEventResolvable forProcessSyntheticAnnotatedType(SlimAnnotatedType<?> annotatedType, RequiredAnnotationDiscovery discovery) { ParameterizedType type1 = new ParameterizedTypeImpl(ProcessAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); ParameterizedType type2 = new ParameterizedTypeImpl(ProcessSyntheticAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); return new ProcessAnnotatedTypeEventResolvable(Sets.<Type> newHashSet(Object.class, type1, type2), annotatedType, discovery); }
@Override protected void preSpecialize() { super.preSpecialize(); Class<?> superclass = getAnnotated().getJavaClass().getSuperclass(); if (superclass == null || superclass.equals(Object.class)) { throw BeanLogger.LOG.specializingBeanMustExtendABean(this); } }
@Override public void setAnnotatedType(AnnotatedType<X> type) { checkWithinObserverNotification(); if (type == null) { throw BootstrapLogger.LOG.annotationTypeNull(this); } if (!this.originalAnnotatedType.getJavaClass().equals(type.getJavaClass())) { throw BootstrapLogger.LOG.annotatedTypeJavaClassMismatch(this.annotatedType.getJavaClass(), type.getJavaClass()); } AnnotatedTypeValidator.validateAnnotatedType(type); BootstrapLogger.LOG.setAnnotatedTypeCalled(getReceiver(), annotatedType, type); this.annotatedType = type; }
public static <A extends Annotation> EnhancedAnnotation<A> create(SlimAnnotatedType<A> annotatedType, ClassTransformer classTransformer) { Class<A> annotationType = annotatedType.getJavaClass(); Map<Class<? extends Annotation>, Annotation> annotationMap = new HashMap<Class<? extends Annotation>, Annotation>(); annotationMap.putAll(buildAnnotationMap(annotatedType.getAnnotations())); annotationMap.putAll(buildAnnotationMap(classTransformer.getTypeStore().get(annotationType))); // Annotations and declared annotations are the same for annotation type return new EnhancedAnnotationImpl<A>(annotatedType, annotationMap, annotationMap, classTransformer); }
public static <A extends Annotation> EnhancedAnnotation<A> create(SlimAnnotatedType<A> annotatedType, ClassTransformer classTransformer) { Class<A> annotationType = annotatedType.getJavaClass(); Map<Class<? extends Annotation>, Annotation> annotationMap = new HashMap<Class<? extends Annotation>, Annotation>(); annotationMap.putAll(buildAnnotationMap(annotatedType.getAnnotations())); annotationMap.putAll(buildAnnotationMap(classTransformer.getTypeStore().get(annotationType))); // Annotations and declared annotations are the same for annotation type return new EnhancedAnnotationImpl<A>(annotatedType, annotationMap, annotationMap, classTransformer); }
public static <A extends Annotation> EnhancedAnnotation<A> create(SlimAnnotatedType<A> annotatedType, ClassTransformer classTransformer) { Class<A> annotationType = annotatedType.getJavaClass(); Map<Class<? extends Annotation>, Annotation> annotationMap = new HashMap<Class<? extends Annotation>, Annotation>(); annotationMap.putAll(buildAnnotationMap(annotatedType.getAnnotations())); annotationMap.putAll(buildAnnotationMap(classTransformer.getTypeStore().get(annotationType))); // Annotations and declared annotations are the same for annotation type return new EnhancedAnnotationImpl<A>(annotatedType, annotationMap, annotationMap, classTransformer); }
public static ProcessAnnotatedTypeEventResolvable forProcessAnnotatedType(SlimAnnotatedType<?> annotatedType, RequiredAnnotationDiscovery discovery) { ParameterizedType type = new ParameterizedTypeImpl(ProcessAnnotatedType.class, new Type[] { annotatedType.getJavaClass() }, null); return new ProcessAnnotatedTypeEventResolvable(Sets.<Type> newHashSet(Object.class, type), annotatedType, discovery); }
public static <T> EnhancedAnnotatedType<T> of(SlimAnnotatedType<T> annotatedType, ClassTransformer classTransformer) { if (annotatedType instanceof BackedAnnotatedType<?>) { return new EnhancedAnnotatedTypeImpl<T>(annotatedType, buildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(classTransformer.getReflectionCache().getDeclaredAnnotations(annotatedType.getJavaClass())), classTransformer); } else { return new EnhancedAnnotatedTypeImpl<T>(annotatedType, buildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(annotatedType.getAnnotations()), classTransformer); } }
public static <T> EnhancedAnnotatedType<T> of(SlimAnnotatedType<T> annotatedType, ClassTransformer classTransformer) { if (annotatedType instanceof BackedAnnotatedType<?>) { return new EnhancedAnnotatedTypeImpl<T>(annotatedType, buildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(classTransformer.getReflectionCache().getDeclaredAnnotations(annotatedType.getJavaClass())), classTransformer); } else { return new EnhancedAnnotatedTypeImpl<T>(annotatedType, buildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(annotatedType.getAnnotations()), classTransformer); } }
public static <T> EnhancedAnnotatedType<T> of(SlimAnnotatedType<T> annotatedType, ClassTransformer classTransformer) { if (annotatedType instanceof BackedAnnotatedType<?>) { return new EnhancedAnnotatedTypeImpl<T>(annotatedType, buildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(classTransformer.getReflectionCache().getDeclaredAnnotations(annotatedType.getJavaClass())), classTransformer); } else { return new EnhancedAnnotatedTypeImpl<T>(annotatedType, buildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(annotatedType.getAnnotations()), classTransformer); } }