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); }