public ProcessSyntheticAnnotatedTypeImpl(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { super(beanManager, annotatedTypeContext.getAnnotatedType(), ProcessSyntheticAnnotatedType.class); this.source = annotatedTypeContext.getExtension(); }
public ProcessSyntheticAnnotatedTypeImpl(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { super(beanManager, annotatedTypeContext.getAnnotatedType(), ProcessSyntheticAnnotatedType.class); this.source = annotatedTypeContext.getExtension(); }
public ProcessSyntheticAnnotatedTypeImpl(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { super(beanManager, annotatedTypeContext.getAnnotatedType(), ProcessSyntheticAnnotatedType.class); this.source = annotatedTypeContext.getExtension(); }
public ProcessSyntheticAnnotatedTypeImpl(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { super(beanManager, annotatedTypeContext.getAnnotatedType(), ProcessSyntheticAnnotatedType.class); this.source = annotatedTypeContext.getExtension(); }
public ProcessSyntheticAnnotatedTypeImpl(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { super(beanManager, annotatedTypeContext.getAnnotatedType(), ProcessSyntheticAnnotatedType.class); this.source = annotatedTypeContext.getExtension(); }
public ProcessSyntheticAnnotatedTypeImpl(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { super(beanManager, annotatedTypeContext.getAnnotatedType(), ProcessSyntheticAnnotatedType.class); this.source = annotatedTypeContext.getExtension(); }
public void processAnnotatedTypes() { Set<SlimAnnotatedTypeContext<?>> classesToBeAdded = new HashSet<SlimAnnotatedTypeContext<?>>(); Set<SlimAnnotatedTypeContext<?>> classesToBeRemoved = new HashSet<SlimAnnotatedTypeContext<?>>(); for (SlimAnnotatedTypeContext<?> annotatedTypeContext : getEnvironment().getAnnotatedTypes()) { SlimAnnotatedType<?> annotatedType = annotatedTypeContext.getAnnotatedType(); final ProcessAnnotatedTypeImpl<?> event = containerLifecycleEvents.fireProcessAnnotatedType(getManager(), annotatedTypeContext); // process the result if (event != null) { if (event.isVeto()) { getEnvironment().vetoJavaClass(annotatedType.getJavaClass()); classesToBeRemoved.add(annotatedTypeContext); } else { boolean dirty = event.isDirty(); if (dirty) { classesToBeRemoved.add(annotatedTypeContext); // remove the original class classesToBeAdded.add(SlimAnnotatedTypeContext.of(event.getResultingAnnotatedType(), annotatedTypeContext.getExtension())); } processPriority(event.getResultingAnnotatedType()); } } else { processPriority(annotatedType); } } getEnvironment().removeAnnotatedTypes(classesToBeRemoved); getEnvironment().addAnnotatedTypes(classesToBeAdded); }
public void processAnnotatedTypes() { Set<SlimAnnotatedTypeContext<?>> classesToBeAdded = new HashSet<SlimAnnotatedTypeContext<?>>(); Set<SlimAnnotatedTypeContext<?>> classesToBeRemoved = new HashSet<SlimAnnotatedTypeContext<?>>(); for (SlimAnnotatedTypeContext<?> annotatedTypeContext : getEnvironment().getAnnotatedTypes()) { SlimAnnotatedType<?> annotatedType = annotatedTypeContext.getAnnotatedType(); final ProcessAnnotatedTypeImpl<?> event = containerLifecycleEvents.fireProcessAnnotatedType(getManager(), annotatedTypeContext); // process the result if (event != null) { if (event.isVeto()) { getEnvironment().vetoJavaClass(annotatedType.getJavaClass()); classesToBeRemoved.add(annotatedTypeContext); } else { boolean dirty = event.isDirty(); if (dirty) { classesToBeRemoved.add(annotatedTypeContext); // remove the original class classesToBeAdded.add(SlimAnnotatedTypeContext.of(event.getResultingAnnotatedType(), annotatedTypeContext.getExtension())); } processPriority(event.getResultingAnnotatedType()); } } else { processPriority(annotatedType); } } getEnvironment().removeAnnotatedTypes(classesToBeRemoved); getEnvironment().addAnnotatedTypes(classesToBeAdded); }
public void processAnnotatedTypes() { Set<SlimAnnotatedTypeContext<?>> classesToBeAdded = new HashSet<SlimAnnotatedTypeContext<?>>(); Set<SlimAnnotatedTypeContext<?>> classesToBeRemoved = new HashSet<SlimAnnotatedTypeContext<?>>(); for (SlimAnnotatedTypeContext<?> annotatedTypeContext : getEnvironment().getAnnotatedTypes()) { SlimAnnotatedType<?> annotatedType = annotatedTypeContext.getAnnotatedType(); final ProcessAnnotatedTypeImpl<?> event = containerLifecycleEvents.fireProcessAnnotatedType(getManager(), annotatedTypeContext); // process the result if (event != null) { if (event.isVeto()) { getEnvironment().vetoJavaClass(annotatedType.getJavaClass()); classesToBeRemoved.add(annotatedTypeContext); } else { boolean dirty = event.isDirty(); if (dirty) { classesToBeRemoved.add(annotatedTypeContext); // remove the original class classesToBeAdded.add(SlimAnnotatedTypeContext.of(event.getResultingAnnotatedType(), annotatedTypeContext.getExtension())); } processPriority(event.getResultingAnnotatedType()); } } else { processPriority(annotatedType); } } getEnvironment().removeAnnotatedTypes(classesToBeRemoved); getEnvironment().addAnnotatedTypes(classesToBeAdded); }
public void processAnnotatedTypes() { Set<SlimAnnotatedTypeContext<?>> classesToBeAdded = new HashSet<SlimAnnotatedTypeContext<?>>(); Set<SlimAnnotatedTypeContext<?>> classesToBeRemoved = new HashSet<SlimAnnotatedTypeContext<?>>(); for (SlimAnnotatedTypeContext<?> annotatedTypeContext : getEnvironment().getAnnotatedTypes()) { SlimAnnotatedType<?> annotatedType = annotatedTypeContext.getAnnotatedType(); final ProcessAnnotatedTypeImpl<?> event = containerLifecycleEvents.fireProcessAnnotatedType(getManager(), annotatedTypeContext); // process the result if (event != null) { if (event.isVeto()) { getEnvironment().vetoJavaClass(annotatedType.getJavaClass()); classesToBeRemoved.add(annotatedTypeContext); } else { boolean dirty = event.isDirty(); if (dirty) { classesToBeRemoved.add(annotatedTypeContext); // remove the original class classesToBeAdded.add(SlimAnnotatedTypeContext.of(event.getResultingAnnotatedType(), annotatedTypeContext.getExtension())); } processPriority(event.getResultingAnnotatedType()); } } else { processPriority(annotatedType); } } getEnvironment().removeAnnotatedTypes(classesToBeRemoved); getEnvironment().addAnnotatedTypes(classesToBeAdded); }
public void processAnnotatedTypes() { Set<SlimAnnotatedTypeContext<?>> classesToBeAdded = new HashSet<SlimAnnotatedTypeContext<?>>(); Set<SlimAnnotatedTypeContext<?>> classesToBeRemoved = new HashSet<SlimAnnotatedTypeContext<?>>(); for (SlimAnnotatedTypeContext<?> annotatedTypeContext : getEnvironment().getAnnotatedTypes()) { SlimAnnotatedType<?> annotatedType = annotatedTypeContext.getAnnotatedType(); final ProcessAnnotatedTypeImpl<?> event = containerLifecycleEvents.fireProcessAnnotatedType(getManager(), annotatedTypeContext); // process the result if (event != null) { if (event.isVeto()) { getEnvironment().vetoJavaClass(annotatedType.getJavaClass()); classesToBeRemoved.add(annotatedTypeContext); } else { boolean dirty = event.isDirty(); if (dirty) { classesToBeRemoved.add(annotatedTypeContext); // remove the original class classesToBeAdded.add(SlimAnnotatedTypeContext.of(event.getResultingAnnotatedType(), annotatedTypeContext.getExtension())); } processPriority(event.getResultingAnnotatedType()); } } else { processPriority(annotatedType); } } getEnvironment().removeAnnotatedTypes(classesToBeRemoved); getEnvironment().addAnnotatedTypes(classesToBeAdded); }
public void processAnnotatedTypes() { Set<SlimAnnotatedTypeContext<?>> classesToBeAdded = new HashSet<SlimAnnotatedTypeContext<?>>(); Set<SlimAnnotatedTypeContext<?>> classesToBeRemoved = new HashSet<SlimAnnotatedTypeContext<?>>(); for (SlimAnnotatedTypeContext<?> annotatedTypeContext : getEnvironment().getAnnotatedTypes()) { SlimAnnotatedType<?> annotatedType = annotatedTypeContext.getAnnotatedType(); final ProcessAnnotatedTypeImpl<?> event = containerLifecycleEvents.fireProcessAnnotatedType(getManager(), annotatedTypeContext); // process the result if (event != null) { if (event.isVeto()) { getEnvironment().vetoJavaClass(annotatedType.getJavaClass()); classesToBeRemoved.add(annotatedTypeContext); } else { boolean dirty = event.isDirty(); if (dirty) { classesToBeRemoved.add(annotatedTypeContext); // remove the original class classesToBeAdded.add(SlimAnnotatedTypeContext.of(event.getResultingAnnotatedType(), annotatedTypeContext.getExtension())); } processPriority(event.getResultingAnnotatedType()); } } else { processPriority(annotatedType); } } getEnvironment().removeAnnotatedTypes(classesToBeRemoved); getEnvironment().addAnnotatedTypes(classesToBeAdded); }
public <T> ProcessAnnotatedTypeImpl<T> fireProcessAnnotatedType(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { if (!isProcessAnnotatedTypeObserved()) { return null; } final Set<ContainerLifecycleEventObserverMethod<?>> observers = annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(); final SlimAnnotatedType<T> annotatedType = annotatedTypeContext.getAnnotatedType(); // if the fast resolver resolved an empty set of observer methods, skip this event if (observers != null && observers.isEmpty()) { BootstrapLogger.LOG.patSkipped(annotatedType); return null; } ProcessAnnotatedTypeImpl<T> event = null; if (annotatedTypeContext.getExtension() == null) { event = new ProcessAnnotatedTypeImpl<T>(beanManager, annotatedType); } else { event = new ProcessSyntheticAnnotatedTypeImpl<T>(beanManager, annotatedTypeContext); } if (observers == null) { BootstrapLogger.LOG.patDefaultResolver(annotatedType); fireProcessAnnotatedType(event, beanManager); } else { BootstrapLogger.LOG.patFastResolver(annotatedType); fireProcessAnnotatedType(event, annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(), beanManager); } return event; }
public <T> ProcessAnnotatedTypeImpl<T> fireProcessAnnotatedType(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { if (!isProcessAnnotatedTypeObserved()) { return null; } final Set<ExtensionObserverMethodImpl<?, ?>> observers = annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(); final SlimAnnotatedType<T> annotatedType = annotatedTypeContext.getAnnotatedType(); // if the fast resolver resolved an empty set of observer methods, skip this event if (observers != null && observers.isEmpty()) { BootstrapLogger.LOG.patSkipped(annotatedType); return null; } ProcessAnnotatedTypeImpl<T> event = null; if (annotatedTypeContext.getExtension() == null) { event = new ProcessAnnotatedTypeImpl<T>(beanManager, annotatedType); } else { event = new ProcessSyntheticAnnotatedTypeImpl<T>(beanManager, annotatedTypeContext); } if (observers == null) { BootstrapLogger.LOG.patDefaultResolver(annotatedType); fireProcessAnnotatedType(event, beanManager); } else { BootstrapLogger.LOG.patFastResolver(annotatedType); fireProcessAnnotatedType(event, annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers()); } return event; }
public <T> ProcessAnnotatedTypeImpl<T> fireProcessAnnotatedType(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { if (!isProcessAnnotatedTypeObserved()) { return null; } final Set<ContainerLifecycleEventObserverMethod<?>> observers = annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(); final SlimAnnotatedType<T> annotatedType = annotatedTypeContext.getAnnotatedType(); // if the fast resolver resolved an empty set of observer methods, skip this event if (observers != null && observers.isEmpty()) { BootstrapLogger.LOG.patSkipped(annotatedType); return null; } ProcessAnnotatedTypeImpl<T> event = null; if (annotatedTypeContext.getExtension() == null) { event = new ProcessAnnotatedTypeImpl<T>(beanManager, annotatedType); } else { event = new ProcessSyntheticAnnotatedTypeImpl<T>(beanManager, annotatedTypeContext); } if (observers == null) { BootstrapLogger.LOG.patDefaultResolver(annotatedType); fireProcessAnnotatedType(event, beanManager); } else { BootstrapLogger.LOG.patFastResolver(annotatedType); fireProcessAnnotatedType(event, annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(), beanManager); } return event; }
public <T> ProcessAnnotatedTypeImpl<T> fireProcessAnnotatedType(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { if (!isProcessAnnotatedTypeObserved()) { return null; } final Set<ContainerLifecycleEventObserverMethod<?>> observers = annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(); final SlimAnnotatedType<T> annotatedType = annotatedTypeContext.getAnnotatedType(); // if the fast resolver resolved an empty set of observer methods, skip this event if (observers != null && observers.isEmpty()) { BootstrapLogger.LOG.patSkipped(annotatedType); return null; } ProcessAnnotatedTypeImpl<T> event = null; if (annotatedTypeContext.getExtension() == null) { event = new ProcessAnnotatedTypeImpl<T>(beanManager, annotatedType); } else { event = new ProcessSyntheticAnnotatedTypeImpl<T>(beanManager, annotatedTypeContext); } if (observers == null) { BootstrapLogger.LOG.patDefaultResolver(annotatedType); fireProcessAnnotatedType(event, beanManager); } else { BootstrapLogger.LOG.patFastResolver(annotatedType); fireProcessAnnotatedType(event, annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(), beanManager); } return event; }
public <T> ProcessAnnotatedTypeImpl<T> fireProcessAnnotatedType(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { if (!isProcessAnnotatedTypeObserved()) { return null; } final Set<ContainerLifecycleEventObserverMethod<?>> observers = annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(); final SlimAnnotatedType<T> annotatedType = annotatedTypeContext.getAnnotatedType(); // if the fast resolver resolved an empty set of observer methods, skip this event if (observers != null && observers.isEmpty()) { BootstrapLogger.LOG.patSkipped(annotatedType); return null; } ProcessAnnotatedTypeImpl<T> event = null; if (annotatedTypeContext.getExtension() == null) { event = new ProcessAnnotatedTypeImpl<T>(beanManager, annotatedType); } else { event = new ProcessSyntheticAnnotatedTypeImpl<T>(beanManager, annotatedTypeContext); } if (observers == null) { BootstrapLogger.LOG.patDefaultResolver(annotatedType); fireProcessAnnotatedType(event, beanManager); } else { BootstrapLogger.LOG.patFastResolver(annotatedType); fireProcessAnnotatedType(event, annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(), beanManager); } return event; }
public <T> ProcessAnnotatedTypeImpl<T> fireProcessAnnotatedType(BeanManagerImpl beanManager, SlimAnnotatedTypeContext<T> annotatedTypeContext) { if (!isProcessAnnotatedTypeObserved()) { return null; } final Set<ContainerLifecycleEventObserverMethod<?>> observers = annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(); final SlimAnnotatedType<T> annotatedType = annotatedTypeContext.getAnnotatedType(); // if the fast resolver resolved an empty set of observer methods, skip this event if (observers != null && observers.isEmpty()) { BootstrapLogger.LOG.patSkipped(annotatedType); return null; } ProcessAnnotatedTypeImpl<T> event = null; if (annotatedTypeContext.getExtension() == null) { event = new ProcessAnnotatedTypeImpl<T>(beanManager, annotatedType); } else { event = new ProcessSyntheticAnnotatedTypeImpl<T>(beanManager, annotatedTypeContext); } if (observers == null) { BootstrapLogger.LOG.patDefaultResolver(annotatedType); fireProcessAnnotatedType(event, beanManager); } else { BootstrapLogger.LOG.patFastResolver(annotatedType); fireProcessAnnotatedType(event, annotatedTypeContext.getResolvedProcessAnnotatedTypeObservers(), beanManager); } return event; }